Horn clauses as an intermediate representation for program analysis and transformation

GRAEME GANGE, JORGE A. NAVAS, PETER SCHACHTE, HARALD SØNDERGAARD, PETER J. STUCKEY
2015 Theory and Practice of Logic Programming  
AbstractMany 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
more » ... ble 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.
doi:10.1017/s1471068415000204 fatcat:h3j4du3p4zel7n46ztv34zd3p4