DMS Software Reengineering Toolkit

Developer(s)Semantic Designs
Licenseproprietary
Websitewww.semanticdesigns.com/Products/DMS/DMSToolkit.html

The DMS Software Reengineering Toolkit 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.[1] DMS was originally motivated by a theory for maintaining designs of software called Design Maintenance Systems.[2] DMS and "Design Maintenance System" are registered trademarks of Semantic Designs.

Usage

DMS has been used to implement domain-specific languages (such as code generation for factory control), test coverage[3] and profiling tools, clone detection,[4] language migration tools, C++ component reengineering.,[5] and for research into difficult topics such as refactoring C++ reliably.[6]

Features

The toolkit provides means for defining language grammars and will produce parsers which automatically construct abstract syntax trees (ASTs), and prettyprinters 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 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 and C++ including C++0x, C#, Java, Python, PHP, EGL, Fortran, COBOL, Visual Basic, Verilog, VHDL and some 20 or more other languages. DMS can handle ASCII, ISO-8859, 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 includes 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 is implemented in a parallel programming language, PARLANSE, which allows using symmetric multiprocessing to speed up large analyses and conversions.[7]

Rewriting

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, 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 ?: operator be written as:

   rule simplify_conditional_assignment(v:left_hand_side,e1:expression,e2:expression,e3:expression)
        :statement->statement
   =  " if (\e1) \v=\e2; else \v=e3; " 
   -> " \v=\e1?\e2:\e3; "
   if no_side_effects(v);

Rewrite rules have names, e.g. simplify_conditional_assignment. Each rule has a "match this" and "replace by that" pattern pair separated by ->, in our example, on separate lines for readability. The patterns must correspond to language syntax categories; in this case, both patterns must be of syntax category statement also separated in sympathy with the patterns by ->. Target language (e.g., C) surface syntax is coded inside meta-quotes ", to separate rewrite-rule syntax from that of the target language. Backslashes inside meta-quotes represent domain escapes, to indicate pattern meta variables (e.g., \v, \e1, \e2) that match any language construct corresponding to the metavariable declaration in the signature line, e.g., e1 must be of syntactic category: (any) expression. If a metavariable is mentioned multiple times in the match pattern, it must match to identical subtrees; the same identically shaped v must occur in both assignments in the match pattern in this example. Metavariables in the replace pattern are replaced by the corresponding matches from the left side. A conditional clause if provides an additional condition that must be met for the rule to apply, e.g., that the matched metavariable v, being an arbitrary left-hand side, must not have a side effect (e.g., cannot be of the form of a[i++]; the no_side_effects predicate is defined by an analyzer built with other DMS mechanisms).

Achieving a complex transformation on code is accomplished by providing a number of rules that cooperate to achieve the desired effect. The ruleset is focused on portions of the program by metaprograms coded in PARLANSE.

A 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.

References

  1. ^ DMS: Program Transformations for Practical Scalable Software Evolution. Proceedings International Conference on Software Engineering 2004 Reprint
  2. ^ Design Maintenance Systems. Communications of the ACM 1992Reprint
  3. ^ Branch Coverage for Arbitrary Languages Made Easy
  4. ^ "Clone Detection Using Abstract Syntax Trees. Proceedings International Conference on Software Maintenance 1998". doi:10.1109/ICSM.1998.738528. S2CID 12834606. Archived from the original on 2012-10-10. Retrieved 2010-11-06. {{cite journal}}: Cite journal requires |journal= (help)
  5. ^ Akers, Robert L.; Baxter, Ira D.; Mehlich, Michael; Ellis, Brian J.; Luecke, Kenn R. (2007). "Case study: Re-engineering C++ component models via automatic program transformation". Information and Software Technology. 49 (3): 275–291. doi:10.1016/j.infsof.2006.10.012. S2CID 13219993.
  6. ^ Small Business Innovation Research (DoE): Refactor++
  7. ^ "Semantic Designs: PARLANSE Parallel Programming Language for Windows Pentium/80x86". www.semanticdesigns.com.

Read other articles:

Organizations based in Virginia Virginia Cooperative ExtensionTypeFederal-State-County PartnershipEstablished1914DirectorMike GutterLocationHeadquarters Blacksburg, in Virginia, United StatesAffiliationsVirginia Tech andVSUWebsitewww.ext.vt.edu Virginia Cooperative Extension provides resources and educational outreach to the Commonwealth of Virginia’s more than seven million residents in the areas of agriculture and natural resources, family and consumer sciences, community viability, and 4-H …

Fungsi tangga Heaviside yang menggunakan konvensi H ( 0 ) = 1 2 {\displaystyle H(0)={\frac {1}{2}}} Fungsi tangga Heaviside atau fungsi tangga satuan (biasanya disimbolkan dengan H, θ, u, 1, atau 𝟙) adalah fungsi diskontinu yang bernilai nol untuk bilangan negatif dan satu untuk bilangan nonnegatif. Fungsi ini dinamai dari Oliver Heaviside. Definisi Secara matematis, fungsi tangga satuan dapat didefinisikan sebagai berikut. H ( x ) = { 0   untuk   x < 0 1   untuk   x &…

The cover of the first film's DVD release Since the premiere of the anime adaptation of Eiichiro Oda's One Piece manga in 1999, Toei Animation has produced 15 feature films based on the franchise traditionally released during the Japanese school spring break since 2000.[1] Four of the films were originally shown as double features alongside other Toei film productions and thus have a running time below feature length (between 30 and 56 minutes). The first three films were shown at the To…

1937 film The Hound of the BaskervillesDirected byCarl LamacWritten byCarla von StackelbergBased onThe Hound of the Baskervilles1902 novelby Sir Arthur Conan DoyleProduced byCarl LamacRobert LeistenschneiderAnny OndraStarringPeter VossFritz OdemarFritz RaspCinematographyWilly WintersteinEdited byElla EnsinkMusic byPaul HühnProductioncompanyOndra-Lamac-FilmDistributed byBavaria FilmRelease date 12 January 1937 (1937-01-12) Running time82 minutesCountryGermanyLanguageGerman The Hou…

Building in Oak Park, IllinoisOak Park ArmsGeneral informationLocation408 S. Oak Park Avenue, Oak Park, IllinoisCoordinates41°52′52.1″N 87°47′38.2″W / 41.881139°N 87.793944°W / 41.881139; -87.793944Completed1921OpenedApril 20, 1922Design and constructionArchitect(s)Roy F. France The Oak Park Arms is a senior living retirement community focused on independent living for seniors [1] located at 408 S. Oak Park Avenue, Oak Park, Illinois. More than ten oth…

Pour les articles homonymes, voir Compagnie de Rouen. Cet article est une ébauche concernant la Nouvelle-France. Vous pouvez partager vos connaissances en l’améliorant (comment ?) selon les recommandations des projets correspondants. Compagnie de RouenCadreType Compagnie colonialePays Royaume de Francemodifier - modifier le code - modifier Wikidata Sous les auspices du prince de Condé, vice-roi de Nouvelle-France (1612-1620), Samuel de Champlain forma la Compagnie des marchands de Roue…

Heritage railway in North Yorkshire, England North Yorkshire Moors RailwayThree LNER Class A4 locomotives at Grosmont loco shed in 2008.LocaleNorth YorkshireTerminusWhitby and PickeringConnectionsNetwork Rail (at Grosmont)Commercial operationsNameNorth Eastern RailwayBuilt byGeorge StephensonOriginal gauge4 ft 8+1⁄2 in (1,435 mm) standard gaugePreserved operationsOperated byNorth Yorkshire Moors Railway Enterprises PlcStations6 (Including Whitby)Length18 miles (29 …

Halaman ini berisi artikel tentang the Philippine province. Untuk kegunaan lain, lihat Maguindanao (disambiguasi). MaguindanaoProvinsi BenderaLambangMap of the Philippines with Maguindanao highlightedCountryFilipinaRegionAutonomous Region in Muslim Mindanao (ARMM)Didirikan22 November, 1973CapitalShariff AguakPemerintahan • GubernurEsmael Mangudadatu (Liberal Party) • Wakil GubernurLester Sinsuat (Liberal Party)Luas[1] • Total5.970,53 km2 (230,523&…

City in Illinois, United StatesPontiac, IllinoisCityPontiac City Hall and Fire StationLocation of Pontiac in Livingston County, Illinois.PontiacShow map of IllinoisPontiacShow map of the United StatesCoordinates: 40°52′50″N 88°37′49″W / 40.88056°N 88.63028°W / 40.88056; -88.63028[1]CountryUnited StatesStateIllinoisCountyLivingstonGovernment • MayorBill Alvey[2]Area[3] • Total8.65 sq mi (22.40 km2)&…

Chrisbianto Arimurti Aster Kasdam XVI/ PattimuraMasa jabatan24 Agustus 2021 – 28 Oktober 2022PendahuluKolonel Arm. Hendro Agus SusenoPenggantiKolonel Inf. Hasandi LubisPamen Ahli Bid Jemen Sishanneg Sahli Pangdam XVI/PattimuraMasa jabatan26 Maret 2021 – 24 Agustus 2021PendahuluFredy SianturiPenggantiTamimi Hendra Kesuma Informasi pribadiLahir0 September 1974 (umur 49)IndonesiaAlma materAkademi Militer (1996)Karier militerPihak IndonesiaDinas/cabang TNI Angkatan Da…

 本表是動態列表,或許永遠不會完結。歡迎您參考可靠來源來查漏補缺。 潛伏於中華民國國軍中的中共間諜列表收錄根據公開資料來源,曾潛伏於中華民國國軍、被中國共產黨聲稱或承認,或者遭中華民國政府調查審判,為中華人民共和國和中國人民解放軍進行間諜行為的人物。以下列表以現今可查知時間為準,正確的間諜活動或洩漏機密時間可能早於或晚於以下所歸類…

Hémonstoir HenvoustoerHémonstoir Lokasi di Region Bretagne Hémonstoir Koordinat: 48°09′34″N 2°49′47″W / 48.1594°N 2.8297°W / 48.1594; -2.8297NegaraPrancisRegionBretagneDepartemenCôtes-d'ArmorArondisemenSaint-BrieucKantonLoudéacAntarkomuneLoudéacPemerintahan • Wali kota (2014–2020) Benoît LarvorLuas • Land114,03 km2 (542 sq mi) • Populasi2660 • Kepadatan Populasi20,47/km2 (1,2/sq mi)Ko…

Ancient Mesopotamian city Map of the Near East showing the extent of the Akkadian Empire and the general area in which Akkad was located Akkad (/ˈækæd/; also spelt Accad, Akkade, or Agade, Akkadian: 𒀀𒂵𒉈𒆠 akkadê, also 𒌵𒆠 URIKI in Sumerian during the Ur III period) was the capital of the Akkadian Empire, which was the dominant political force in Mesopotamia during a period of about 150 years in the last third of the 3rd millennium BC. Its location is unknown. In the early day…

American economist (born 1952) This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sources: Barry Eichengreen – news · newspapers · books · scholar · JSTOR (February 2015) (Learn how and when to remove this mes…

Александр Шмурнов Дата рождения 8 декабря 1966(1966-12-08) (57 лет) Место рождения Москва, СССР Страна  Россия Род деятельности спортивный журналист, телеведущий, комментатор, радиоведущий Алекса́ндр Ива́нович Шмурно́в (род. 8 декабря 1966, Москва) — российский спортивный …

Indian political election in Tripura 2024 Indian general election in Tripura ← 2019 19 April 2024 (2024-04-19) and 26 April 2024 (2024-04-26) 2029 → ← outgoing membersAll 2 Tripura seats in the Lok SabhaOpinion pollsTurnout80.92% (1.48%)   First party Second party Third party   Leader Biplab Kumar Deb Rajendra Reang Ashish Kumar Saha Party BJP CPI(M) INC Alliance NDA INDIA INDIA Leader since 2022 2024 2022 Leader'…

American jazz saxophonist (1909–1959) Lester YoungYoung (left) in 1944Background informationBirth nameLester Willis YoungAlso known asPres or PrezBorn(1909-08-27)August 27, 1909Woodville, Mississippi, U.S.DiedMarch 15, 1959(1959-03-15) (aged 49)New York City, U.S.GenresJazzOccupation(s)MusicianInstrument(s)Tenor saxophone, alto saxophone, clarinetYears active1933–1959LabelsVerveCommodoreSavoyPabloVictorMusical artist Lester Willis Young (August 27, 1909 – March 15, 1959), nicknamed Pr…

British TV sitcom (2007–2019) Gavin & StaceyGenre Sitcom Created by James Corden Ruth Jones Written by James Corden Ruth Jones Directed byChristine GernonStarring Mathew Horne Joanna Page James Corden Ruth Jones Alison Steadman Larry Lamb Melanie Walters Rob Brydon Theme music composerStephen FretwellOpening themeRun by Stephen FretwellCountry of originUnited KingdomOriginal languageEnglishNo. of series3No. of episodes21 (list of episodes)ProductionExecutive producers Henry Normal Lindsay …

Stik Pocky Pocky (ポッキーcode: ja is deprecated ) adalah stik biskuit berlapis cokelat produksi Ezaki Glico. Selain Pocky cokelat sebagai rasa orisinal, Pocky juga tersedia dalam aneka rasa, di antaranya stroberi, susu cokelat, matcha, almond, serta produk terbaru yang memiliki rasa cookies and cream, dan milk chocolate. Pocky berawal dari Butter Pretz (バタープリッツcode: ja is deprecated ), pretzel berbentuk stik yang diperkenalkan oleh Ezaki Glico pada tahun 1963.[1] Pelun…

Mysterious Ways Сингл U2с альбома Achtung Baby Дата выпуска 25 ноября 1991 Формат 7, 12, CDкомпакт-кассета Дата записи 1990—1991 Место записи STS в Дублине, Hansa Tonstudio в Берлине, Windmill Lane Studios в Дублине, Ирландия Жанры Альтернативный рок фанк-рокальтернативная танцевальная музыка Длительность 4:04 (альб…