DMS Software Reengineering Toolkit: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 10:
DMS uses [[GLR]] parsing technology, enabling it to handle all practical context-free grammars. Semantic predicates extend this capability to interesting non-context-free grammars ([[Fortran]] requires matching of multiple DO loops with shared CONTINUE statements by label; GLR with semantic predicates enables the DMS Fortran parser to produce ASTs for correctly nested loops as it parses).
 
DMS provides [[attribute grammar]] evaluators for computing custom analyses over ASTs, such as metrics, and including special support for [[symbol table]] construction. Other program facts can be extracted by built-in control- and data- [[flow analysis]] engines, local and global [[pointer analysis]], whole-program [[call graph]] extraction, and symbolic range analysis by [[abstract interpretation]].
 
Changes to ASTs can be accomplished by both procedural methods coded in PARLANSE and source-to-source tree transformations coded as rewrite rules using surface-syntax conditioned by any extracted program facts. The rewrite rule engine handles associative and commutative rules. A rewrite rule for C to replace a complex condition by the '''?:''' operator be written as: