Skip to main navigation Skip to search Skip to main content

Generating optimized code from SCR specifications

  • Tom Rothamel
  • , Yanhong A. Liu
  • , Constance L. Heitmeyer
  • , Elizabeth I. Leonard
  • Stony Brook University
  • Naval Research Laboratory

Research output: Contribution to journalArticlepeer-review

1 Scopus citations

Abstract

A promising trend in software development is the increasing adoption of model-driven design. In this approach, a developer first constructs an abstract model of the required program behavior in a language, such as Statecharts or Stateflow, and then uses a code generator to automatically transform the model into an executable program. This approach has many advantages - typically, a model is not only more concise than code and hence more understandable, it is also more amenable to mechanized analysis. Moreover, automatic generation of code from a model usually produces code with fewer errors than hand-crafted code. One serious problem, however, is that a code generator may produce inefficient code. To address this problem, this paper describes a method for generating efficient code from SCR (Software Cost Reduction) specifications. While the SCR tabular notation and tools have been used successfully to specify, simulate, and verify numerous embedded systems, until now SCR has lacked an automated method for generating optimized code. This paper describes an efficient method for automatic code generation from SCR specifications, together with an implementation and an experimental evaluation. The method first synthesizes an execution-flow graph from the specification, then applies three optimizations to the graph, namely, input slicing, simplification, and output slicing, and then automatically generates code from the optimized graph. Experiments on seven benchmarks demonstrate that the method produces significant performance improvements in code generated from large specifications. Moreover, code generation is relatively fast, and the code produced is relatively compact.

Original languageEnglish
Pages (from-to)135-144
Number of pages10
JournalSIGPLAN Notices (ACM Special Interest Group on Programming Languages)
Volume41
Issue number7
DOIs
StatePublished - Jul 2006

Keywords

  • Code generation
  • Code synthesis
  • Formal specifications
  • Optimization
  • Requirements specifications
  • SCR

Fingerprint

Dive into the research topics of 'Generating optimized code from SCR specifications'. Together they form a unique fingerprint.

Cite this