Commit Graph

7 Commits

Author SHA1 Message Date
Andrea Gussoni 929c0c4cdf Flattening for AST
Implemented the flattening also for the AST trees, taking also care of
adjusting the pointers to the new BBNode in the `root` `RegionCFG`.
2019-02-11 12:18:44 +01:00
Andrea Gussoni 2e9ff8449f Improved debugging messages 2019-02-05 10:17:47 +01:00
Andrea Gussoni c70b6f1097 Implemented de-optimization on RegionCFGTree
Now, during the simplification of short-circuits the so called
`de-optimization` is also applied to the corresponding `RegionCFGTree`.

This allows us to avoid loss of information during the iterative
refinement phase, which basically divides for ever the existencies of
two nodes that have been cloned starting from a single original one.
2019-01-25 13:45:03 +01:00
Andrea Gussoni 7de353785e Implemented conditional node list for IfNode
After short-circuit simplification, we can have that a conditional node
corresponds to more than one `BasicBlockNode`.

This change reflects this fact, and takes care of merging blocks during
short-circuit simplification, and of representing this change in the
serialization.
2019-01-25 13:32:29 +01:00
Andrea Gussoni 9876e514d5 Improved isEqual operator with deep comparison
Now the `isEqual` operator does what we call a `deep` comparison,
meaning for every type of `ASTNode` it recursively check if the
structures of the AST tree originating in that node can be considered
equivalent (e.g., two sequence nodes are considered equal if every node
they contain is in turn equal).

This operator gives more space to the short-circuit simplification,
which relies heavily on the `isEqual` operator.
2019-01-22 19:16:48 +01:00
Pietro Fezzardi 5805679ead RestructureCFGPass: fix use of include directory 2019-01-15 16:57:15 +01:00
Andrea Gussoni 06717a6185 Import RestructureCFGPass from revamb branch
Import the RestructureCFGPass from the `feature/the-comb` branch on the
`revamb` repository.
2019-01-14 15:45:08 +01:00