English

Horn Clauses as an Intermediate Representation for Program Analysis and Transformation

Programming Languages 2020-02-19 v1

Abstract

Many recent analyses for conventional imperative programs begin by transforming programs into logic programs, capitalising on existing LP analyses and simple LP semantics. We propose using logic programs as an intermediate program representation throughout the compilation process. With restrictions ensuring determinism and single-modedness, a logic program can easily be transformed to machine language or other low-level language, while maintaining the simple semantics that makes it suitable as a language for program analysis and transformation. We present a simple LP language that enforces determinism and single-modedness, and show that it makes a convenient program representation for analysis and transformation.

Keywords

Cite

@article{arxiv.1507.05762,
  title  = {Horn Clauses as an Intermediate Representation for Program Analysis and Transformation},
  author = {Graeme Gange and Jorge A. Navas and Peter Schachte and Harald Sondergaard and Peter J. Stuckey},
  journal= {arXiv preprint arXiv:1507.05762},
  year   = {2020}
}

Comments

To Appear in Theory and Practice of Logic Programming (TPLP), Proceedings of ICLP 2015

R2 v1 2026-06-22T10:15:32.761Z