DMS: Software Tool Infrastructure

Google TechTalks · 20K views · 2010 · 59:37

Open on YouTube

Compilers, interpreters & program analysisSoftware architecture & designtalk

Why Stack Overflow recommends it

Stack Overflow users link it when answering questions about comparing ASTs, structural diffs, program transformation and static analysis, since it comes from a well-known local parsing expert.

Recommended by 2 people across 2 different months, 2011 to 2015.

What it is

A Google Tech Talk by Ira Baxter introducing the DMS Software Reengineering Toolkit, a general purpose source code analysis and transformation system with front ends for C, C++, C#, Java, Python, COBOL and more. It covers the infrastructure behind such tools and applications like automated conversion of B-2 bomber mission software and large-scale C++ architecture restructuring.

What people said

Recommends Bart Kiers · 2011-12 · Stack Overflow · on “API to compare AST?”

It's easy to get the AST of source files, it's another story to find out the similarities between them :). On of the local parsing gurus here at stackoverflow, Ira Baxter [LINK] , talks about this in a Google Tech Talk [this video] where he mentions that his software does this.

Recommends Ira Baxter · 2014-12 · Stack Overflow · on “Techniques for static code analysis in detecting integer overflows”

I'd expect Frama-C [LINK] to provide such a capability. Frama-C is focused on C source code, but I don't know if it is dialect-sensitive or specific. I believe it uses abstract interpretation to model values. I don't know if it specifically checks for overflows. Our DMS Software Reengineering Toolkit [LINK] has variety of langauge front ends, including most major dialects of C. It provides control and data flow analysis, and also abstract interpretation for computing ranges, as foundations on which you can build an answer. My Google Tech Talk on DMS [this video] at about 0:28:30 specifically talks about how one can use DMS's abstract interpretation on value ranges to detect overflow (of an index

Cites Bart Kiers · 2011-08 · Stack Overflow · on “tunable diff algorithm”

Too bad. The idea is not mine I must confess. I got it from a Google Tech Talk [this video] of one of the users from SO: Ira Baxter [LINK] .

Cites amirouche · 2014-04 · Stack Overflow · on “What kinds of patterns could I enforce on the code to make it easier to translate to another programming language?”

I will second @EliBendersky point of view regarding using ast.parse instead of parser (which I did not know about before). I also warmly recommend you to review his blog. I used ast.parse to do Python->JavaScript translator (@ [LINK] ). I've come up with Pythonium design by somewhat reviewing other implementations and trying them on my own. I forked Pythonium from [LINK] which I also started, It's actually a complete rewrite . The overall design is inspired from PyPy and [LINK] paper. Everything I tried, from beginning to the best solution, even if it looks like Pythonium marketing it really isn't (don't hesitate to tell me if something doesn't seem correct to the netiquette): Implement Pyth

Cites Ira Baxter · 2014-10 · Stack Overflow · on “Build transformation engine based on rules”

Some people try to do this kind of thing with regular expressions. It doesn't work; regular expressions can't handle context-free matching. The right answer is Program Transformation Systems [LINK] . These are tools that parse source, build ASTs, and let one write code transformations in source syntax, very much as OP has shown. While there is a ton of theory (see scholar.google.com with the term program transformation ), building these tools is fairly difficult. Just the notion of parsing code fragments (as OP has hinted at) requires some pretty interesting twists in parsing machinery. I've been in this space since the 1980s, and seen the tools listed at Wikipedia built over the last 15-20

Cites jxramos · 2015-03 · Stack Overflow · on “Does anyone know of an advanced diff tool for C#?”

Hey folks, just wanted to add this video clip discussion of SmartDifferencer from the CEO of SemanticDesigns who was giving a talk at the GoogleTechTalks [this video]