2015
DOI: 10.1017/s1471068415000204
|View full text |Cite
|
Sign up to set email alerts
|

Horn clauses as an intermediate representation for program analysis and transformation

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 p… Show more

Help me understand this report
View preprint versions

Search citation statements

Order By: Relevance

Paper Sections

Select...
2
1
1

Citation Types

1
12
0

Year Published

2016
2016
2024
2024

Publication Types

Select...
4
4
1

Relationship

0
9

Authors

Journals

citations
Cited by 24 publications
(13 citation statements)
references
References 30 publications
1
12
0
Order By: Relevance
“…• Horn clauses are a suitable abstraction that is in between binary code and a more high-level programming language. This is in line with recent work (Gange et al 2015) in which the use of Horn Clauses as a universal intermediate language has been advocated. In that work the general idea is to compile a program (written in an arbitrary language) first into Horn clauses, then int max(int x, int y, int z) { if ((x>=y) && (x>=z)) return x; else if ((y>=x) && (y>=z)) return y; else return z; } int max(int x, int y, int z) { int max_xy; if (x>=y) max_xy = x; else max_xy = y; if (max_xy>=z) return max_xy; else return z; } .method public max(III)I .registers 5 0: if-lt v2, v3, 4 1: move v0, v2 2: if-lt v0, v4, 6 3: return v0 4: move v0, v3 5: goto 2 6: move v0, v4 7: goto 3 .end method Figure 1.…”
Section: Introductionsupporting
confidence: 89%
“…• Horn clauses are a suitable abstraction that is in between binary code and a more high-level programming language. This is in line with recent work (Gange et al 2015) in which the use of Horn Clauses as a universal intermediate language has been advocated. In that work the general idea is to compile a program (written in an arbitrary language) first into Horn clauses, then int max(int x, int y, int z) { if ((x>=y) && (x>=z)) return x; else if ((y>=x) && (y>=z)) return y; else return z; } int max(int x, int y, int z) { int max_xy; if (x>=y) max_xy = x; else max_xy = y; if (max_xy>=z) return max_xy; else return z; } .method public max(III)I .registers 5 0: if-lt v2, v3, 4 1: move v0, v2 2: if-lt v0, v4, 6 3: return v0 4: move v0, v3 5: goto 2 6: move v0, v4 7: goto 3 .end method Figure 1.…”
Section: Introductionsupporting
confidence: 89%
“…The introduced model is the first to exploit the properties of LSSA for register allocation. LSSA and similar representations have been used to establish theoretical connections between programming paradigms [2], as an intermediate form in SSA construction [5], and as a basis for intermediate-level program analysis and optimization [40].…”
Section: Modelmentioning
confidence: 99%
“…It can also be used as a common intermediate language for exchanging VCs between software verifiers [1,3,9,26] to take advantage of the many special purpose solvers that are available nowadays.…”
Section: Related Work and Conclusionmentioning
confidence: 99%