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.
- 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.]] Google Scholar
Digital Library
- M. Archer. TAME: Using PVS strategies for special-purpose theorem proving. Annals of Mathematics and Artificial Intelligence, 29(1-4), February 2001.]] Google Scholar
Digital Library
- 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.]]Google Scholar
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- 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.]]Google Scholar
Digital Library
- 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.]]Google Scholar
- F. Gaucher. Slicing LUSTRE programs. Technical report, VERIMAG, Grenoble, February 2003.]]Google Scholar
- 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.]]Google Scholar
Cross Ref
- 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.]]Google Scholar
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- 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.]]Google Scholar
- 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.]] Google Scholar
Digital Library
- 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.]]Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- A. R. Kulkarni and S. Ramesh. Static slicing of reactive programs. In SCAM, pages 98--107, 2003.]]Google Scholar
Cross Ref
- 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.]]Google Scholar
Cross Ref
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- D. L. Parnas, G. Asmis, and J. Madey. Assessment of safety-critical software in nuclear power plants. Nuclear Safety, 32(2), 1991.]]Google Scholar
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library
- F. Tip. A survey of program slicing techniques. Technical report, Amsterdam, The Netherlands, The Netherlands, 1994.]] Google Scholar
Digital Library
- 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.]] Google Scholar
Digital Library






Comments