Cake: a tool for adaptation of object code Stephen Kell - - PowerPoint PPT Presentation

cake a tool for adaptation of object code
SMART_READER_LITE
LIVE PREVIEW

Cake: a tool for adaptation of object code Stephen Kell - - PowerPoint PPT Presentation

Cake: a tool for adaptation of object code Stephen Kell Stephen.Kell@cl.cam.ac.uk Computer Laboratory Cake. . . p.1/6 Starting point: Cakes big picture foo.o foo.o xyzzy.o bar.o plugh.o new programming languages mismatch


slide-1
SLIDE 1

Cake: a tool for adaptation of object code

Stephen Kell

Stephen.Kell@cl.cam.ac.uk

Computer Laboratory

  • Cake. . . – p.1/6
slide-2
SLIDE 2

Starting point: Cake’s big picture

foo.o foo.o bar.o xyzzy.o plugh.o

new programming languages → mismatch decentralised development → mismatch unanticipated composition → mismatch

  • Cake. . . – p.2/6
slide-3
SLIDE 3

Cake in one slide Cake is

a language expressing compositions of software a productive tool for overcoming mismatch

  • perating on binaries

a black-box approach designed around practical experience

  • ngoing work
  • Cake. . . – p.3/6
slide-4
SLIDE 4

Wanted: a tool for helping with tasks like... Unanticipated composition: port feature P from app X to Y Case study: Konqueror + ROX-Filer Evolution: link client version 1 against library version 2 Case study: gtk-theme-switch

  • Cake. . . – p.4/6
slide-5
SLIDE 5

A taste of the Cake language Two mismatched structures...

struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... GtkWindowType type; guint window has focus:1; }; struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... gchar ∗wm role; guint type :4; /∗ GtkWindowType ∗/ guint has focus :1; };

  • Cake. . . – p.5/6
slide-6
SLIDE 6

A taste of the Cake language Two mismatched structures...

struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... GtkWindowType type; guint window has focus:1; }; struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... gchar ∗wm role; guint type :4; /∗ GtkWindowType ∗/ guint has focus :1; }; switch12 ↔ libgtk20 { values GtkWindow ↔ GtkWindow {

  • Cake. . . – p.5/6
slide-7
SLIDE 7

A taste of the Cake language Two mismatched structures...

struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... GtkWindowType type; guint window has focus:1; }; struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... gchar ∗wm role; guint type :4; /∗ GtkWindowType ∗/ guint has focus :1; }; switch12 ↔ libgtk20 { values GtkWindow ↔ GtkWindow { void → .wm role;

  • Cake. . . – p.5/6
slide-8
SLIDE 8

A taste of the Cake language Two mismatched structures...

struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... GtkWindowType type; guint window has focus:1; }; struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... gchar ∗wm role; guint type :4; /∗ GtkWindowType ∗/ guint has focus :1; }; switch12 ↔ libgtk20 { values GtkWindow ↔ GtkWindow { void → .wm role; .type as .GtkWindowType <−−> .type as .GtkWindowType;

  • Cake. . . – p.5/6
slide-9
SLIDE 9

A taste of the Cake language Two mismatched structures...

struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... GtkWindowType type; guint window has focus:1; }; struct GtkWindow { GtkBin bin; gchar ∗ title ; // ... gchar ∗wm role; guint type :4; /∗ GtkWindowType ∗/ guint has focus :1; }; switch12 ↔ libgtk20 { values GtkWindow ↔ GtkWindow { void → .wm role; .type as .GtkWindowType <−−> .type as .GtkWindowType; .window has focus ↔ . has focus ; } }

  • Cake. . . – p.5/6
slide-10
SLIDE 10

Status and questions Status:

case-studies: done, hand-written glue code Gtk+ glue generation is partly automated compiler: current work ... runtime library: most developed piece used in the Gtk+ case study

Thanks for your attention. Any questions?

  • Cake. . . – p.6/6