DMS Software Reengineering Toolkit: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Alter: template type. | Use this bot. Report bugs. | Suggested by AManWithNoPlan | #UCB_webform 1136/2600
remove some puffery and define some sections
Line 25:
}}
 
The '''DMS Software Reengineering Toolkit'''<ref>[http://portal.acm.org/citation.cfm?id=999466&dl=GUIDE&coll=GUIDE&CFID=55567354&CFTOKEN=76359207 ''DMS: Program Transformations for Practical Scalable Software Evolution''. Proceedings International Conference on Software Engineering 2004] [http://www.semanticdesigns.com/Company/Publications/DMS-for-ICSE2004-reprint.pdf Reprint]</ref> is a proprietary set of [[program transformation]] tools available for automating custom source program analysis, modification, translation or generation of software systems for arbitrary mixtures of source languages for large scale software systems. DMS was originally motivated by a theory for maintaining designs of software called ''Design Maintenance Systems.''<ref>[http://portal.acm.org/citation.cfm?id=129859 ''Design Maintenance Systems''. Communications of the ACM 1992][http://www.semanticdesigns.com/Company/Publications/DMS-CACM-1992-baxter.pdf Reprint]
</ref> DMS and "Design Maintenance System" are registered trademarks of Semantic Designs.
 
==Usage==
DMS has been used to implement a wide variety of practical tools, include [[___domain-specific language]]s (such as code generation for factory control), test coverage<ref>[http://www.semanticdesigns.com/Company/Publications/TestCoverage.pdf Branch Coverage for Arbitrary Languages Made Easy]</ref> and profiling tools, [[Duplicate code|clone detection]],<ref>{{Cite journal |url=http://www.computer.org/portal/web/csdl/doi/10.1109/ICSM.1998.738528 |title=''Clone Detection Using Abstract Syntax Trees''. Proceedings International Conference on Software Maintenance 1998 |doi=10.1109/ICSM.1998.738528 |s2cid=12834606 |access-date=2010-11-06 |archive-url=https://web.archive.org/web/20121010231613/http://www.computer.org/portal/web/csdl/doi/10.1109/ICSM.1998.738528 |archive-date=2012-10-10 |url-status=dead }}</ref> language migration tools, C++ component reengineering.,<ref>{{cite journal|doi=10.1016/j.infsof.2006.10.012|title=Case study: Re-engineering C++ component models via automatic program transformation|year=2007|last1=Akers|first1=Robert L.|last2=Baxter|first2=Ira D.|last3=Mehlich|first3=Michael|last4=Ellis|first4=Brian J.|last5=Luecke|first5=Kenn R.|journal=Information and Software Technology|volume=49|issue=3|pages=275–291|s2cid=13219993}}</ref> and for research into difficult topics such as refactoring C++ reliably.<ref>[http://www.sbir.gov/sbirsearch/detail/373168 ''Small Business Innovation Research (DoE): Refactor++'']</ref>
 
== Features ==
 
The toolkit provides means for defining language grammars and will produce [[parser]]s which automatically construct [[abstract syntax trees]] (ASTs), and [[prettyprinter]]s to convert original or modified ASTs back into compilable source text. The parse trees capture, and the prettyprinters regenerate, complete detail about the original source program, including source position, comments, radix and format of numbers, etc., to ensure that regenerated source text is as recognizable to a programmer as the original text modulo any applied transformations.
 
DMS uses [[GLR parser|GLR]] parsing technology with semantic predicates. This enables it to handle all context-free grammars as well as most non-context-free language syntaxes, such as [[Fortran]], which requires matching of multiple DO loops with shared CONTINUE statements by label to produce ASTs for correctly nested loops as it parses. DMS has a variety of predefined language front ends, covering most real dialects of [[C (programming language)|C]] and [[C++]] including [[C++0x]], [[C Sharp (programming language)|C#]], [[Java (programming language)|Java]], [[Python (programming language)|Python]], [[PHP]], [[EGL (programming language)|EGL]], [[Fortran]], [[COBOL]], [[Visual Basic]], [[Verilog]], [[VHDL]] and some 20 or more other languages. DMS Predefinedcan languageshandle enable[[ASCII]], customizers[[ISO-8859]], to[[UTF-8]], immediately[[UTF-16]], focus[[EBCDIC]], on[[Shift-JIS]] theirand reengineeringa task rather than on the detailsvariety of the languages toMicrosoft becharacter processedencodings.
Many program analysis and transformation tools are limited to [[ASCII]] or Western European character sets such as [[ISO-8859]]; DMS can handle these as well as [[UTF-8]], [[UTF-16]], [[EBCDIC]], [[Shift-JIS]] and a variety of Microsoft character encodings.
 
DMS provides [[attribute grammar]] evaluators for computing custom analyses over ASTs, such as metrics, and including specialincludes 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]].
DMS uses [[GLR parser|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 is implemented in a [[parallel programming]] language, PARLANSE, which allows using [[symmetric multiprocessing]] to speed up large analyses and conversions.<ref>{{cite web |title=Semantic Designs: PARLANSE Parallel Programming Language for Windows Pentium/80x86 |url=http://www.semanticdesigns.com/Products/Parlanse/index.html |website=www.semanticdesigns.com}}</ref>
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]].
 
=== Rewriting ===
 
Changes to ASTs can be accomplished by both procedural methods coded in PARLANSE and source-to-source tree transformations coded as [[rewrite rule]]s using surface-syntax conditioned by any extracted program facts, using DMS's Rule Specification Language (RSL). The rewrite rule engine supporting RSL handles associative and commutative rules. A rewrite rule for C to replace a complex condition by the <code>?:</code> operator be written as:
Line 51 ⟶ 56:
 
A [http://www.semanticdesigns.com/Products/DMS/SimpleDMSDomainExample.html complete example] of a language definition and source-to-source transformation rules defined and applied is shown using high school [[algebra]] and a bit of [[calculus]] as a ___domain-specific language.
 
DMS has a variety of predefined language front ends, covering most real dialects of [[C (programming language)|C]] and [[C++]] including [[C++0x]], [[C Sharp (programming language)|C#]], [[Java (programming language)|Java]], [[Python (programming language)|Python]], [[PHP]], [[EGL (programming language)|EGL]], [[Fortran]], [[COBOL]], [[Visual Basic]], [[Verilog]], [[VHDL]] and some 20 or more other languages. Predefined languages enable customizers to immediately focus on their reengineering task rather than on the details of the languages to be processed.
 
DMS is additionally unusual in being implemented in a [[parallel programming]] language, PARLANSE, that uses [[symmetric multiprocessor]]s available on commodity [[workstations]]. This enables DMS to provide faster answers for large system analyses and conversions.
 
DMS was originally motivated by a theory for maintaining designs of software called ''Design Maintenance Systems.''<ref>[http://portal.acm.org/citation.cfm?id=129859 ''Design Maintenance Systems''. Communications of the ACM 1992][http://www.semanticdesigns.com/Company/Publications/DMS-CACM-1992-baxter.pdf Reprint]
</ref>
 
DMS and "Design Maintenance System" are registered trademarks of Semantic Designs.
 
== References ==
Line 68 ⟶ 64:
* {{youtube|C-_dw9iEzhA|Invited Google TechTalk: ''DMS: Software Tool Infrastructure''}}
* [http://www.semanticdesigns.com/Products/Services/NorthropGrummanB2.html Modernization of B-2 Spirit Bomber Software Systems] obliquely referenced by [https://web.archive.org/web/20100521002050/http://www.irconnect.com/noc/press/pages/news_releases.html?d=145810 Northrop Grumman-funded initiative that developed a cost-effective way to translate (JOVIAL) software]
* [http://www.semanticdesigns.com/Products/Parlanse/index.html PARLANSE]
* [http://www.semanticdesigns.com Semantic Designs]