I’m interested in:
-
Data structures for representing programs
-
Algorithms for translating between those representations
-
Analysis & manipulations of each representation; questions which are natural to ask/answer in each Most books I can find on compilers/PLs tend to spend most of their time on the text representation (and algorithms for translating programs out of text, i.e. parsing) and the machine-code representation (and algorithms for translating programs into machine code). For purposes of this question, I’m not particularly interested in either of these representations—they’re not very natural data structures for representing programs, and we mostly use them because we have to. I’m interested mainly in high-level "intermediate" representations. In terms of applications, I’m more interested in reasoning about about the code (e.g. control flow analysis, type checking) and manipulating the code (e.g. automated parallelization, high-level machine-independent optimization methods) rather than translating between any particular source/target format. Questions:
-
Does anybody know of a good book (or other source) that focuses on high-level "intermediate" representations of programs?
-
Is there some other question I should be asking, e.g. a different term to search for?
-
On the meta-level, where else should I look/ask this question?
A good selection of topics on static analysis is in
Some prerequisites for it and other relevant things can be picked up from
K Cooper, L Torczon. Engineering a Compiler
HR Nielson, F Nielson. Semantics with Applications: An Appetizer
The Nanopass Framework is built for that: "The nanopass framework provides a tool for writing compilers composed of several simple passes that operate over well-defined intermediate languages. The goal of this organization is both to simplify the understanding of each pass, because it is responsible for a single task, and to simplify the addition of new passes anywhere in the compiler." https://nanopass.org/ https://docs.racket-lang.org/nanopass/index.html
Not a very pointed answer, but a collection of leads: