I.ve just checked in all the changes I.ve been working on over the past few weeks. In short, Sriram.s API changes uncovered a bunch of bugs that caused the framework to return incorrect results for our for analysis composition self-tests. With these fixes all four examples work. Further, the check-ins include some new functionality that I didn.t get a chance to check in before I pulled Sriram.s API changes.

Here.s what I.ve done:
-	Added support for Parallel Composition and implemented the ParallelComposer. There are currently no analyses that can take productive advantage of parallel composition.
-	Adjusted the compositionalSelfTest.C to make it possible to specify arbitrary nesting of sequential and parallel composition. The language for specifying this is now a CFL that looks like this loosechain(analysis1, analysis2, loosepar(analysis3, analysis4), analysis5).
-	Created a special FuncResultMemLocObject to denote the memory location that holds a function.s return value. This MemLocObject is used internally and was previously the MemLocObject of the function.s definition. Sriram.s latest API changes made this choice difficult to maintain, so I created a special object for this use-case.
-	There are now two types of regions in debugging output. midLevel regions are the same as topLevel regions were before and create a new div in the HTML with its own indent and separate color. highLevel regions start a new HTML document, which makes it easier to load debug output into browers, since they tend to break on our very large debug HTML pages. The generated HTML includes a down arrow to load the separate page into the current HTML page and a right arrow to load the separate HTML page as its own tab. This API extension is currently being used to produce a separate HTML document for each analysis pass and the analysis of each function within it.
-	AbstractObject::isLive, mayEqual and mustEqual were not being managed correctly with respect to their PartEdges. Given the following composition chain: StxAnalysis -> MemAnalysis -> PartAnalysis -> ClientAnalysis, where MemAnalysis exports Expr2MemLoc and PartAnalysis implements a partition graph. Suppose the Client analysis gets a MemLocObject ml from MemAnalysis. Then it calls ml->isLive(pedge) on it. The pedge would have been created by PartAnalysis, but MemAnalysis needs to somehow deal with it, which of course it cannot.

The solution is to route all such calls through the composer. I.ve added mayEqual, mustEqual and isLive call variants to Composer and Composed Analysis and wrapped this work inside the AbstractObject::mayEqual, AbstractObject::mustEqual and AbstractObject::isLive calls by adding a ComposedAnalysis* composer parameter to them.
The attached Powerpoint describes this in more detail since this is an important mechanism that is used for almost all ChainComposer calls.
-	Removed OutOfScope_StxMemLocObject. They were useless.
-	An AbstractObjectSet may grow without bound if we keep inserting AbstractObjects that are not must-equal to any AbstractObjects already in the set (e.g. values of a variable that is incremented inside a loop). This makes necessary to perform two forms of compaction:
o	Set elements that denote the empty set or map key-value pairs where the value denotes the empty set are removed
o	Two set elements that are mayEqual to each other or two map key-value pairs where the keys are mayEqual to each other are unioned together into one (this is effectively a widening operator).
To support the above forms of compaction I did the following:
o	Extended the AbstractObject API with functions meetUpdate, isFull, isEmpty and equalSet.
o	Added isFull and isEmpty to the Lattice class since it already has setToFull and setToEmpty (AbstractObjectSets are slowly becoming more similar to Lattices).
o	Added code to Composer and ComposedAnalysis to propagate calls to meetUpdate, isFull, isEmpty and equalSet up the composition chain to the analysis that implements them for a given pair of AbstractObjects.
o	Updated all analyses that implement AbstractObjects to support these functions. For the syntactic analysis the implementation of meetUpdate a problem since the union of a NamedObject and an AliasedObject is an AliasedObject and there was no way to directly convert a NamedObject into an AliasedObject. As such, now ExprObjects, NamedObjects and AliasObjects no longer derive from MemLocObjects but are fields of an StxMemLocObject. This makes it possible to swap the identity of an StxMemLocObject dynamically as a result of meetUpdate.
o	Modified AbstractObjectSet and AbstractObjectMap to perform the first type of compaction but support for the second is not yet complete. So far I.ve only covered the cases that prevented our test codes from passing.
-	I noticed that the framework is getting quite slow (multiple minutes for a single large analysis). After some performance profiling I discovered that most of the time was spent in generating debug output. As such, I.ve configured the debug flags of all the modules to be set to 0. If you want debug output, please set them to a higher value.

Greg Bronevetsky
Lawrence Livermore National Lab
(925) 424-5756
bronevetsky@llnl.gov
http://greg.bronevetsky.com