7.5.1. Parts of the IR

Different analyses require different information about the source code of a program. For example, style checks need syntactic information, i. e. details about the actual program text, whereas static analyses often abstract from such details and consider semantic information like control flow. Therefore the IR is divided into parts which represent the information required by different analyses. In the IR scripting interface four different constants within the module ir are used to distinguish these parts:

ir.Common
ir.Logical
ir.Physical
ir.Build

For creating style checks and analyses, usually only two parts of the IR are important: the physical part (represented by the constant ir.Physical), which represents mostly textual/syntactical information about the source code, and the logical part (represented by ir.Logical), which represents semantic aspects of the program.