Code Generation via Higher-Order Rewrite Systems [chapter]

Florian Haftmann, Tobias Nipkow
2010 Lecture Notes in Computer Science  
We present the meta-theory behind the code generation facilities of Isabelle/HOL. To bridge the gap between the source (higherorder logic with type classes) and the many possible targets (functional programming languages), we introduce an intermediate language, Mini-Haskell. To relate the source and the intermediate language, both are given a semantics in terms of higher-order rewrite systems (HRSs). In a second step, type classes are removed from Mini-Haskell programs by means of a dictionary
more » ... ranslation; we prove the correctness of this step. Building on equational logic also directly supports a simple but powerful algorithm and data refinement concept. Supported by DFG project NI 491/10-1.
doi:10.1007/978-3-642-12251-4_9 fatcat:7fodjrhahbacjdudw5kjlh4kae