• Home
  • Search
  • Formal compiler construction in a logical framework
  • Cite Icon18
  • https://doi.org/10.1007/s10990-006-8746-6Copy DOI Icon

Formal compiler construction in a logical framework

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

The task of designing and implementing a compiler can be a difficult and error-prone process. In this paper, we present a new approach based on the use of higher-order abstract syntax and term rewriting in a logical framework. All program transformations, from parsing to code generation, are cleanly isolated and specified as term rewrites. This has several advantages. The correctness of the compiler depends solely on a small set of rewrite rules that are written in the language of formal mathematics. In addition, the logical framework guarantees the preservation of scoping, and it automates many frequently-occurring tasks including substitution and rewriting strategies. As we show, compiler development in a logical framework can be easier than in a general-purpose language like ML, in part because of automation, and also because the framework provides extensive support for examination, validation, and debugging of the compiler transformations. The paper is organized around a case study, using the MetaPRL logical framework to compile an ML-like language to Intel x86 assembly. We also present a scoped formalization of x86 assembly in which all registers are immutable.

Similar Papers
  • Book Chapter
  • Citations27

Rewriting Logic and Maude: Concepts and Applications

  • Jan 01, 2000
  • José Meseguer
  • Book Chapter
  • Citations62

Research Directions in Rewriting Logic

  • Jan 01, 1999
  • José Meseguer
  • Research Article
  • Citations204

Twenty years of rewriting logic

  • Aug 21, 2012
  • The Journal of Logic and Algebraic Programming
  • José Meseguer
  • Supplementary Content

Modeling and Verification of Distributed Algorithms in Theorem Proving Environments

  • Mar 17, 2014
  • DepositOnce
  • Philipp Küfner +1
  • Research Article
  • Citations1

Comparing Higher-Order Encodings in Logical Frameworks and Tile Logic

  • Jun 01, 2002
  • Electronic Notes in Theoretical Computer Science
  • Roberto Bruni +3
  • Journal Issue
  • Citations4

Proceedings 5th International Workshop on Logical Frameworks and Meta-languages: Theory and Practice

  • Sep 11, 2010
  • Electronic Proceedings in Theoretical Computer Science
  • Karl Crary +1
  • Front Matter

Preface: Volume 59, Issue 4

  • Nov 01, 2001
  • Electronic Notes in Theoretical Computer Science
  • Mark Van Den Brand +1
  • Front Matter

Preface: Volume 36

  • Jan 01, 2000
  • Electronic Notes in Theoretical Computer Science
  • Kokichi Futatsugi
  • Research Article
  • Citations2

Term rewriting and its application to recognizing handwritten Hindu numerals

  • Jul 01, 2001
  • Journal of Experimental & Theoretical Artificial Intelligence
  • Ashraf Elnagar +2
  • Book Chapter
  • Citations16

An Approach to Fast Arrays in Haskell

  • Jan 01, 2003
  • Manuel M T Chakravarty +1
  • Research Article
  • Citations7

Knowledge augmented policy conflict analysis for services collaboration

  • Mar 11, 2014
  • Knowledge-Based Systems
  • Zhengping Wu +1
  • Research Article
  • Citations22

Two Case Studies of Semantics Execution in Maude: CCS and LOTOS

  • Sep 01, 2005
  • Formal Methods in System Design
  • Alberto Verdejo +1
  • Book Chapter

Relationships between Actions Performed by Institutional Agents, Human Agents or Software Agents

  • Jan 01, 2010
  • Robert Demolombe
  • Conference Article
  • Citations13

Developing the evaluation framework of technology foresight program: lesson learned from European countries

  • Oct 01, 2009
  • S.S Li +2
  • Book Chapter
  • Citations2

Deep logic program transformation using abstract interpretation

  • Jan 01, 1992
  • Dmitri Yu Boulanger
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.