1 / 9

The CERES compiler generator at DIKU (1982-84)

The CERES compiler generator at DIKU (1982-84). Neil Fest, Aug. 2007. p. p. L → M N. Languages and compilers. Defn . A programming language L is a partial function L : A ( A * A ). We use the notation L-programs to mean Dom( L ).

sharla
Download Presentation

The CERES compiler generator at DIKU (1982-84)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The CERES compiler generator at DIKU (1982-84) Neil Fest, Aug. 2007

  2. p p L→ M N Languages and compilers • Defn. A programming languageL is a partial function L: A (A* A). We use the notation L-programs to mean Dom(L). • Defn. Let L, M and N be programming languages. Then =n N-programs L = M○ (N(n)). L p i = M (N n p) i

  3. Ld→ T T Compiler generation • Assume a set LangDef  A of so-called language definitions and a function which maps every d LangDef to Ld, the language defined by d. • Compiler generation problem: how do we transform d into a compiler comp  ?

  4. Ld→ T T Compiler generator • Definition A T-program cocom is called a compiler generator if Dom(T(cocom))= LangDef and  d  LangDef, Tcocomd 

  5. → T T → T T Ld→ T  Ld→ T  Ld→ T T Every compiler generator is a compiler • Definition A programming language  with -programs = LangDef is said to be an implicit compiler defining language (i.c.d.l.) if  d  LangDef, d  . • Theorem Let cocom be a compiler generator. Then there exits at least one i.c.d.l.  which satisfies cocom  . Note that compiler generation is then just compilation: Proof hint:  = T o (T cocom) d comp cocom

  6. → T  • → T  • → T  • → T T Defining  in itself • Let us say that an i.c.d.l.  is consistent, if there exists a definition  such that L = . • If such a  exists, then   and one can generate at compiler generator by: cocom 

  7. Small and beautiful • : 2400 bytes (itself generated) • cocom: 6166 bytes (generated)

  8. → T  The connection to partial evaluation • Let  be defined by (d, p, x1,…,xn)= Ld p (x1,…,xn) • Lemma (Jones&Tofte 83/84?,unpublished):   -programs:  is a autoprojector for (, T) iff  implicit compiler defining language  for (,T) with  

  9. → T  The connection to partial evaluation • Let  be defined by (d, p, x1,…,xn)= Ld p (x1,…,xn) • Lemma (Jones&Tofte 83/84?,unpublished): mix  -programs: mix is a partial evaluator for (, T) iff  metacompiling language  for (,T) with mix 

More Related