Composing the uncomposable
Some work, work-in-progress and ideas. Stephen Kell
stephen.kell@cs.ox.ac.uk
- Composing. . . – p.1/68
Composing the uncomposable Some work, work-in-progress and ideas. - - PowerPoint PPT Presentation
Composing the uncomposable Some work, work-in-progress and ideas. Stephen Kell stephen.kell@cs.ox.ac.uk Composing. . . p.1/68 Theres something about software... Software is expensive and inflexible . Tools assume: ground-up
stephen.kell@cs.ox.ac.uk
A B A′ B A′′ A B
glue code
A
%(
+"
%(
+"
%(
+"
mpeg2_init() → dec fopen("...", "rb") →f mpeg2_info(dec) →info mpeg2_parse(dec) →STATE_BUFFER avcodec_init() →() av_register_all() →() av_open_file(...) →avf av_find_stream_info(avf) →() avcodec_find_decoder(...) →dc av_codec_open(...) →()
int seek( struct puffs usermount ∗pu, puffs cookie t opc, off t
{ kauth cred t cred; int rv; cred = cred create (pcr ); VLE(opc); rv = RUMP VOP SEEK(
VUL(opc); cred destroy (cred ); return rv; } int remove(struct puffs usermount ∗pu, puffs cookie t opc, puffs cookie t targ , struct puffs cn ∗pcn) { struct componentname ∗cn; int rv; cn = makecn(pcn); VLE(opc); rump vp incref(opc); VLE(targ); rump vp incref( targ ); rv = RUMP VOP REMOVE(
AUL(opc); AUL(targ); freecn (cn, 0); return rv; }
// rules concerning functions p2k node seek( , vn, oldoff , newoff, cred) − →RUMP VOP SEEK(vn, oldoff, newoff, cred); p2k node remove( , vn as vnode bump, tgtvn as vnode bump, cn) − →RUMP VOP REMOVE(vn, tgtvn, cn); // rules concerning values values puffs cookie t − →({VLE(that); that}) vnode; values puffs cookie t ← −({VUL(that); that}) vnode; values vnode bump − →({VLE(that); rump vp incref(that); that}) vnode; // also bump refcount values vnode bump ← −vnode; // unlock not required values puffs cred (cred create(this ))− → kauth cred; values puffs cred ← −(cred destroy(this)) kauth cred; values puffs cn (makecn(this))− → component name; values puffs cn ← −(freecn(this, 0)) component name;
DW AT name : point 39: DW TAG member DW AT name : x DW AT type : <0x52> DW AT location: (DW OP plus uconst: 0 45: DW TAG member DW AT name : y DW AT type : <0x52> DW AT location: (DW OP plus uconst: 8 52: DW TAG base type DW AT byte size : 8 DW AT encoding : 4 ( float )