Skip to content

Essentials of Compilation: An Incremental Approach in Haskell

License

Notifications You must be signed in to change notification settings

keilambda/eocia-haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Essentials of Compilation: An Incremental Approach in Haskell

Minimal compiler targeting both Linux and macOS/Darwin platforms. Implements compilation using an incremental approach1 2 from LVar language to x86_64 assembly (AT&T syntax).

Languages

  • LVar: Expression-based language with integer literals, arithmetic and let-bindings
  • LVarMon: LVar but in Monadic Normal Form3 4
  • CVar: Statement-based three-address code intermediate language
  • X86Var: X86 intermediate language with variables
  • X86Int: Target assembly language

Features

  • Expression simplification via partial evaluation
  • Stack-based variable allocation
  • Instruction selection with peephole optimization
  • Proper stack frame management
  • Call ABI compliance (Linux, Darwin)

Current status

  • Implementing Register allocation

License

BSD-3-Clause

Footnotes

  1. https://github.com/IUCompilerCourse/Essentials-of-Compilation

  2. http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf

  3. https://www.cs.cmu.edu/~crary/819-f09/Moggi91.pdf

  4. https://link.springer.com/chapter/10.1007/3-540-36579-6_6

About

Essentials of Compilation: An Incremental Approach in Haskell

Resources

License

Stars

Watchers

Forks