Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1134650.1134670acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
Article

Generating optimized code from SCR specifications

Published: 14 June 2006 Publication History

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.

References

[1]
R. Alur, F. Ivancic, J. Kim, I. Lee, and O. Sokolsky. Generating embedded software from hierarchical hybrid models. SIGPLAN Not., 38(7):171--182, 2003.]]
[2]
M. Archer. TAME: Using PVS strategies for special-purpose theorem proving. Annals of Mathematics and Artificial Intelligence, 29(1-4), February 2001.]]
[3]
M. Archer. Basing a modeling environment on a general purpose theorem prover. In Proc. Monterey Workshop on Software Engineering Tools: Compatibility and Integration, Baden, Austria, October 4-6 2004.]]
[4]
R. Bharadwaj and S. Sims. Salsa: Combining constraint solvers with BDDs for automatic invariant checking. In Proc. Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2000), Berlin, Mar. 2000.]]
[5]
S. Easterbrook, R. Lutz, R. Covington, Y. Ampo, and D. Hamilton. Experiences using lightweight formal methods for requirements modeling. IEEE Trans. on Software Engineering, 24(1), Jan. 1998.]]
[6]
S. A. Edwards. An Esterel compiler for large control-dominated systems. Transactions on Computer-Aided Design of Integrated Circuits and Systems, 21(2):169--183, February 2002.]]
[7]
S. R. Faulk, L. Finneran, J. Kirby, Jr., S. Shah, and J. Sutton. Experience applying the CoRE method to the Lockheed C-130J. In Proc. 9th Annual Conf. on Computer Assurance (COMPASS '94), Gaithersburg, MD, June 1994.]]
[8]
F. Gaucher. Slicing LUSTRE programs. Technical report, VERIMAG, Grenoble, February 2003.]]
[9]
N. Halbwachs, P. Raymond, and C. Ratel. Generating efficient code from data-flow programs. In Third International Symposium on Programming Language Implementation and Logic Programming, Passau (Germany), August 1991.]]
[10]
C. Heitmeyer, M. Archer, R. Bharadwaj, and R. Jeffords. Tools for constructing requirements specifications: The SCR toolset at the age of ten. International Journal of Computer Systems Science and Engineering, 20(1):19--35, Jan. 2005.]]
[11]
C. Heitmeyer, J. Kirby, B. Labaw, M. Archer, and R. Bharadwaj. Using abstraction and model checking to detect safety violations in requirements specifications. IEEE Trans. on Softw. Eng., 24(11), Nov. 1998.]]
[12]
C. Heitmeyer, J. Kirby, Jr., B. Labaw, and R. Bharadwaj. SCR*: A toolset for specifying and analyzing software requirements. In Proc. Computer-Aided Verification, 10th Annual Conf. (CAV'98), Vancouver, Canada, 1998.]]
[13]
C. L. Heitmeyer, R. D. Jeffords, and B. G. Labaw. Automated consistency checking of requirements specifications. ACM Trans. on Software Eng. and Methodology, 5(3):231--261, April--June 1996.]]
[14]
K. Heninger, D. L. Parnas, J. E. Shore, and J. W. Kallander. Software requirements for the A-7E aircraft. Technical Report 3876, NRL, Wash., DC, 1978.]]
[15]
R. Jeffords and C. Heitmeyer. Automatic generation of state invariants from requirements specifications. In Proc. Sixth ACM SIGSOFT Symp. on Foundations of Software Engineering, Nov. 1998.]]
[16]
R. Jeffords and E. Leonard. Using invariants to optimize formal specifications before code synthesis. In Proc. Second ACM and IEEE International Conference on Formal Methods and Models for Co-Design (MEMOCODE 2004), June 2004.]]
[17]
R. D. Jeffords and C. L. Heitmeyer. An algorithm for strengthening state invariants generated from requirements specifications. In Proc. of the Fifth IEEE Int'l Symp. on Requirements Eng., Aug. 2001.]]
[18]
J. Kirby, Jr., M. Archer, and C. Heitmeyer. SCR: A practical approach to building a high assurance COMSEC system. In Proceedings of the 15th Annual Computer Security Applications Conference (ACSAC '99). IEEE Computer Society Press, Dec. 1999.]]
[19]
A. R. Kulkarni and S. Ramesh. Static slicing of reactive programs. In SCAM, pages 98--107, 2003.]]
[20]
L. Lafave and J. P. Gallagher. Constraint-based partial evaluation of rewriting-based functional logic programs. In LOPSTR '97: Proc. of the 7th International Workshop on Logic Programming Synthesis and Transformation, pages 168--188, London, UK, 1998. Springer-Verlag.]]
[21]
E. I. Leonard and C. L. Heitmeyer. Program synthesis from formal requirements specifications using APTS. Higher Order Symbol. Comput., 16(1-2):63--92, 2003.]]
[22]
S. Miller. Specifying the mode logic of a flight guidance system in CoRE and SCR. In Proc. 2nd ACM Workshop on Formal Methods in Software Practice (FMSP'98), 1998.]]
[23]
D. L. Parnas, G. Asmis, and J. Madey. Assessment of safety-critical software in nuclear power plants. Nuclear Safety, 32(2), 1991.]]
[24]
G. Ramalingam and T. Reps. A categorized bibliography on incremental computation. In POPL '93: Proc. of the 20th ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages, pages 502--510, New York, NY, USA, 1993. ACM Press.]]
[25]
T. W. Reps and T. Turnidge. Program specialization via program slicing. In Selected Papers from the International Seminar on Partial Evaluation, pages 409--429, London, UK, 1996. Springer-Verlag.]]
[26]
J. A. Tauber, N. A. Lynch, and M. J. Tsai. Compiling IOA without global synchronization. In NCA '04: Proc. of the Network Computing and Applications, Third IEEE Int'l Symp. on (NCA'04), pages 121--130, Washington, DC, USA, 2004. IEEE Computer Society.]]
[27]
F. Tip. A survey of program slicing techniques. Technical report, Amsterdam, The Netherlands, The Netherlands, 1994.]]
[28]
M. W. Whalen. High-integrity code generation for state-based formalisms. In ICSE '00: Proc. of the 22nd Int'l Conf. on Software Eng., pages 725--727, New York, NY, USA, 2000. ACM Press.]]

Cited By

View all
  • (2015)Building high assurance human-centric decision systemsAutomated Software Engineering10.1007/s10515-014-0157-z22:2(159-197)Online publication date: 1-Jun-2015
  • (2013)Self-* programming: run-time parallel control search for reflection boxEvolving Systems10.1007/s12530-013-9098-16:1(23-40)Online publication date: 8-Oct-2013
  • (2013)On Model-Based Software DevelopmentPerspectives on the Future of Software Engineering10.1007/978-3-642-37395-4_4(49-60)Online publication date: 22-Apr-2013
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
LCTES '06: Proceedings of the 2006 ACM SIGPLAN/SIGBED conference on Language, compilers, and tool support for embedded systems
June 2006
220 pages
ISBN:159593362X
DOI:10.1145/1134650
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 7
    Proceedings of the 2006 LCTES Conference
    July 2006
    208 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1159974
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 June 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. SCR
  2. code generation
  3. code synthesis
  4. formal specifications
  5. optimization
  6. requirements specifications

Qualifiers

  • Article

Conference

LCTES06

Acceptance Rates

Overall Acceptance Rate 116 of 438 submissions, 26%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)1
Reflects downloads up to 16 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2015)Building high assurance human-centric decision systemsAutomated Software Engineering10.1007/s10515-014-0157-z22:2(159-197)Online publication date: 1-Jun-2015
  • (2013)Self-* programming: run-time parallel control search for reflection boxEvolving Systems10.1007/s12530-013-9098-16:1(23-40)Online publication date: 8-Oct-2013
  • (2013)On Model-Based Software DevelopmentPerspectives on the Future of Software Engineering10.1007/978-3-642-37395-4_4(49-60)Online publication date: 22-Apr-2013
  • (2011)Recovery oriented programmingInternational Journal on Software Tools for Technology Transfer (STTT)10.5555/3220914.322119913:4(377-395)Online publication date: 1-Aug-2011
  • (2011)Recovery oriented programming: runtime monitoring of safety and livenessInternational Journal on Software Tools for Technology Transfer10.1007/s10009-011-0200-313:4(377-395)Online publication date: 15-May-2011
  • (2010)Model-based construction and verification of critical systems using composition and partial refinementFormal Methods in System Design10.1007/s10703-010-0106-937:2-3(265-294)Online publication date: 1-Dec-2010
  • (2009)On the Role of Formal Methods in Software CertificationElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2009.09.001238:4(3-9)Online publication date: 1-Sep-2009
  • (2009)A Formal Method for Developing Provably Correct Fault-Tolerant Systems Using Partial Refinement and CompositionProceedings of the 2nd World Congress on Formal Methods10.1007/978-3-642-05089-3_12(173-189)Online publication date: 4-Nov-2009
  • (2008)Applying Formal Methods to a Certifiably Secure Software SystemIEEE Transactions on Software Engineering10.1109/TSE.2007.7077234:1(82-98)Online publication date: 1-Jan-2008
  • (2008)Automatic Program Generation from Formal Specifications using APTSAutomatic Program Development10.1007/978-1-4020-6585-9_10(93-113)Online publication date: 2008
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media