previous_group previous up next next_group
Previous: 2. Presentation Up: 2. Presentation Next: 2. Scoping:

1. HQ Classes:

HQ is designed using Java with classes representing abstract objects. Six abstract domains' equivalent objects to HQ's classes are summarized in 4_tab:HQ_comparison_abstract_objects, knowing that non-relational domains break most of transformer analyses. The NA stands for not available.

The HQSet class represents abstract sets. An instance of the HQSet class, henceforth called HQSet for short, is equivalent to a polyhedron, an octagon, a set of Presburger formulae, or a list of polyhedra, i.e. a union. Each HQSet represents a set of points that belongs to a multi-dimensional space. Each dimension space can be represented by different names or different numbers. Those dimensions are associated to variables; thus every dimension is sometimes considered as a variable, depending on the context. Each dimension is represented by an instance of the HQVariable class. The space and the mapping between dimensions and variables are abstracted by the HQBasis class.

We have decided to define the HQBasis class for many reasons, but the most important one is that it permits a flexible dimension name management. As such, when program variables are passed from the analyzer to its abstract domain engine, that is to say our HQ implementation, their names are forwarded, too. This helps not only the debugging at the engine's level but also at the analyzer's level, since the origin of every variable is known. Precisely, the HQBasis class is similar to $C^3$'s base object, which permits an easy debugging since variable names as strings are given by the analyzer PIPS instead of fixed numbers, as in other libraries.

The HQConstraint class represents an abstract constraint. Every abstract constraint is affine and equivalent to a polyhedral constraint, or an octagonal constraint, or a Presburger formula, with the comparative connectors such as $<$, $\leq$, $>$, $\geq$ and $=$ [*].

Equivalent to an affine expression is a HQExpression, which is in fact a HQConstraint but without any comparative connector.

Since a polyhedron can be represented by a constraint system or a generating system, we consider that an octagon or a set of Presburger formulae can be properly represented by an instance of the HQSysCon or/and HQSysGen class, where each HQSysCon instance consists of several HQConstraint instances, and each HQSysGen instance consists of generating elements of type HQGenerator.


previous_group previous up next next_group
Previous: 2. Presentation Up: 2. Presentation Next: 2. Scoping:
Nguyen Que Duong
2006-09-16