Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

How to compute worst-case execution time by optimization modulo theory and a clever encoding of program semantics

Published: 12 June 2014 Publication History

Abstract

In systems with hard real-time constraints, it is necessary to compute upper bounds on the worst-case execution time (WCET) of programs; the closer the bound to the real WCET, the better. This is especially the case of synchronous reactive control loops with a fixed clock; the WCET of the loop body must not exceed the clock period.
We compute the WCET (or at least a close upper bound thereof) as the solution of an optimization modulo theory problem that takes into account the semantics of the program, in contrast to other methods that compute the longest path whether or not it is feasible according to these semantics. Optimization modulo theory extends satisfiability modulo theory (SMT) to maximization problems.
Immediate encodings of WCET problems into SMT yield formulas intractable for all current production-grade solvers --- this is inherent to the DPLL(T) approach to SMT implemented in these solvers. By conjoining some appropriate "cuts" to these formulas, we considerably reduce the computation time of the SMT-solver.
We experimented our approach on a variety of control programs, using the OTAWA analyzer both as baseline and as underlying microarchitectural analysis for our analysis, and show notable improvement on the WCET bound on a variety of benchmarks and control programs.

References

[1]
M. Asavoae, C. Maiza, and P. Raymond. Program semantics in modelbased WCET analysis: A state of the art perspective. In C. Maiza, editor, WCET 2013, volume 30 of OASICS, pages 32--41. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2013.
[2]
C. Ballabriga, H. Casse, C. Rochange, and P. Sainrat. OTAWA: An open toolbox for adaptive WCET analysis. In SEUS, volume 6399 of LNCS, pages 35--46. Springer, 2010.
[3]
A. Banerjee, S. Chattopadhyay, and A. Roychoudhury. Precise microarchitectural modeling for WCET analysis via AI+SAT. In IEEE Real- Time and Embedded Technology and Applications Symposium (RTAS), pages 87--96. IEEE Computer Society, 2013.
[4]
A. Biere, J. Knoop, L. Kovács, and J. Zwirchmayr. The Auspicious Couple: Symbolic Execution and WCET Analysis. In WCET, volume 30 of OASIcs, pages 53--63. IBFI Schloss Dagstuhl, 2013. URL http://drops.dagstuhl.de/opus/volltexte/2013/4122.
[5]
N. Bjørner, B. Dutertre, and L. de Moura. Accelerating lemma learning using joins - DPLL(t), 2008. Appeared as short paper inLPAR 2008, outside of proceedings.
[6]
C. Cadar and K. Sen. Symbolic execution for software testing: Three decades later. Commun. ACM, 56(2):82--90, Feb. 2013.
[7]
P. Caspi, P. Raymond, and S. Tripakis. Synchronous programming. In Handbook of Real-Time and Embedded Systems, chapter 14. Chapman & Hall / CRC, 2008.
[8]
S. Chaki and J. Ivers. Software model checking without source code. Innovations in Systems and Software Engineering, 6(3):233-- 242, 2010. ISSN 1614--5046. .
[9]
S. Chattopadhyay and A. Roychoudhury. Scalable and precise refinement of cache timing analysis via path-sensitive verification. Real- Time Systems, 49(4):517--562, 2013.
[10]
D.-H. Chu and J. Jaffar. Symbolic simulation on complicated loops for WCET path analysis. In EMSOFT, pages 319--328, 2011. ISBN 978--1--4503-0714--7. .
[11]
L. Cordeiro, B. Fischer, and J. Marques-Silva. SMT-based bounded model checking for embedded ANSI-C software. IEEE Trans. Software Eng., 38(4):957--974, 2012.
[12]
S. Cotton. On Some Problems in Satisfiability Solving. PhD thesis, Universite Joseph Fourier, Grenoble, 2009.
[13]
S. Cotton. Natural domain SMT: A preliminary assessment. In FORMATS, volume 6246 of LNCS, pages 77--91. Springer, 2010.
[14]
P. Cousot et al. The Astree analyzer. In ESOP, volume 3444 of LNCS, pages 21--30. Springer, 2005.
[15]
A. Dalsgaard, M. Olesen, M. Toft, R. Hansen, and K. Larsen. METAMOC: Modular execution time analysis using model checking. In WCET, pages 113--123, 2010.
[16]
L. M. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, volume 4963 of LNCS, pages 337--340. Springer, 2008.
[17]
L. M. de Moura and D. Jovanovic. A model-constructing satisfiability calculus. In VMCAI, volume 7737 of LNCS, pages 1--12. Springer, 2013.
[18]
J. Engblom and B. Jonsson. Processor pipelines and their properties for static wcet analysis. In EMSOFT, volume 2491 of LNCS, pages 334--348. Springer, 2002.
[19]
J. Gustafsson, A. Ermedahl, C. Sandberg, and B. Lisper. Automaticderivation of loop bounds and infeasible paths for WCET analysis using abstract execution. In RTSS, 2006.
[20]
J. Gustafsson, A. Betts, A. Ermedahl, and B. Lisper. The Malardalen WCET benchmarks -- past, present and future. In WCET, volume 15 of OASICS, pages 136--146. IBFI Schloss Dagstuhl, 2010.
[21]
C. Healy and D. Whalley. Automatic detection and exploitation of branch constraints for timing analysis. IEEE Trans. on Software Engineering, 28(8), Aug. 2002.
[22]
J. Henry, D. Monniaux, and M. Moy. Pagai: A path sensitive static analyser. Electr. Notes Theor. Comput. Sci., 289:15--25, 2012.
[23]
N. Holsti. Computing time as a program variable: a way around infeasible paths. In WCET, volume 08003 of Dagstuhl Seminar Proceedings. IBFI Schloss Dagstuhl, 2008.
[24]
B. Huber and M. Schoeberl. Comparison of implicit path enumeration and model checking based wcet analysis. In WCET, volume 10 of OASICS. IBFI Schloss Dagstuhl, 2009. URL http://drops. dagstuhl.de/opus/volltexte/2009/2281.
[25]
B. K. Huynh, L. Ju, and A. Roychoudhury. Scope-aware data cache analysis for WCET estimation. In IEEE Real-Time and Embedded Technology and Applications Symposium, pages 203--212, 2011.
[26]
J. Knoop, L. Kovacs, and J. Zwirchmayr. WCET squeezing: ondemand feasibility refinement for proven precise WCET-bounds. In RTNS, pages 161--170, 2013.
[27]
D. Kroening and O. Strichman. Decision Procedures. Springer, 2008.
[28]
C. Lattner and V. S. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, pages 75--88. IEEE Computer Society, 2004.
[29]
X. Li, Y. Liang, T. Mitra, and A. Roychoudhury. Chronos: A timing analyzer for embedded software. Science of Computer Programming, 69(1--3):56--67, 2007.
[30]
Y.-T. S. Li and S. Malik. Performance analysis of embedded software using implicit path enumeration. IEEE Trans. on Computer-Aided Design of Integrated Circuits and Systems, 16(12):1477--1487, 1997.
[31]
K. L. McMillan, A. Kuehlmann, and M. Sagiv. Generalizing DPLL to richer logics. In CAV, volume 5643 of LNCS, pages 462--476. Springer, 2009.
[32]
A. Metzner. Why model checking can improve WCET analysis. In CAV, pages 334--347, 2004.
[33]
H. Negi, A. Roychoudhury, and T. Mitra. Simplifying WCET analysis by code transformations. In WCET, 2004.
[34]
F. Nemer, H. Casse, P. Sainrat, J. P. Bahsoun, and M. D. Michiel. Papabench: a free real-time benchmark. In WCET, volume 4 of OASICS. IBFI Schloss Dagstuhl, 2006.
[35]
J. Reineke. Caches in WCET Analysis: Predictability - Competitiveness - Sensitivity. PhD thesis, University of Saarland, 2009.
[36]
R. Sebastiani and S. Tomasi. Optimization in SMT with LA(Q) cost functions. In IJCAR, volume 7364 of LNCS, pages 484--498. Springer, 2012.
[37]
J. Souyris, V. Wiels, D. Delmas, and H. Delseny. Formal verification of avionics software products. In A. Cavalcanti and D. Dams, editors, Formal Methods (FM), volume 5850 of LNCS, pages 532--546. Springer, 2009. ISBN 978--3--642-05088--6. .
[38]
H. Theiling, C. Ferdinand, and R. Wilhelm. Fast and precise WCET prediction by separated cache and path analyses. Int. J. of Time- Critical Computing Systems, 18:157--179, 2000.
[39]
R. Wilhelm. Determining bounds on execution times. In Handbook on Embedded Systems, chapter 14. CRC Press, 2006.
[40]
R. Wilhelm et al. The worst-case execution-time problem - overview of methods and survey of tools. ACM Trans. Embedded Comput. Syst., 7(3), 2008.
[41]
W. Zhao,W. C. Kreahling, D. B. Whalley, C. A. Healy, and F. Mueller. Improving WCET by applying worst-case path optimizations. Real- Time Systems, 34(2):129--152, 2006.

Cited By

View all
  • (2021)Program analysis via efficient symbolic abstractionProceedings of the ACM on Programming Languages10.1145/34854955:OOPSLA(1-32)Online publication date: 20-Oct-2021
  • (2021)Generation and Verification of Timing Attack Resilient Schedules During the High-Level Synthesis of Integrated CircuitsBehavioral Synthesis for Hardware Security10.1007/978-3-030-78841-4_15(343-363)Online publication date: 28-May-2021
  • (2018)OptiMathSAT: A Tool for Optimization Modulo TheoriesJournal of Automated Reasoning10.1007/s10817-018-09508-6Online publication date: 15-Dec-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 5
LCTES '14
May 2014
162 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2666357
Issue’s Table of Contents
  • cover image ACM Conferences
    LCTES '14: Proceedings of the 2014 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems
    June 2014
    174 pages
    ISBN:9781450328777
    DOI:10.1145/2597809
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 the author(s) 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].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2014
Published in SIGPLAN Volume 49, Issue 5

Check for updates

Author Tags

  1. bounded model checking
  2. craig interpolants
  3. optimization modulo theory
  4. wcet

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)1
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2021)Program analysis via efficient symbolic abstractionProceedings of the ACM on Programming Languages10.1145/34854955:OOPSLA(1-32)Online publication date: 20-Oct-2021
  • (2021)Generation and Verification of Timing Attack Resilient Schedules During the High-Level Synthesis of Integrated CircuitsBehavioral Synthesis for Hardware Security10.1007/978-3-030-78841-4_15(343-363)Online publication date: 28-May-2021
  • (2018)OptiMathSAT: A Tool for Optimization Modulo TheoriesJournal of Automated Reasoning10.1007/s10817-018-09508-6Online publication date: 15-Dec-2018
  • (2018)Scalable and precise estimation and debugging of the worst-case execution time for analysis-friendly processors: a comeback of model checkingInternational Journal on Software Tools for Technology Transfer10.1007/s10009-018-0497-2Online publication date: 11-Jun-2018
  • (2017)Reducing WCET Overestimations by Correcting Errors in Loop Bound ConstraintsEnergies10.3390/en1012211310:12(2113)Online publication date: 12-Dec-2017
  • (2016)WCET overapproximation for software in the context of a Cyber-Physical System2016 IFIP/IEEE International Conference on Very Large Scale Integration (VLSI-SoC)10.1109/VLSI-SoC.2016.7753559(1-6)Online publication date: Sep-2016
  • (2016)Nonlinear approach for estimating WCET during programming phaseCluster Computing10.1007/s10586-016-0606-519:3(1449-1459)Online publication date: 1-Sep-2016
  • (2015)OptiMathSAT: A Tool for Optimization Modulo TheoriesComputer Aided Verification10.1007/978-3-319-21690-4_27(447-454)Online publication date: 16-Jul-2015
  • (2024)Generalized Optimization Modulo TheoriesAutomated Reasoning10.1007/978-3-031-63498-7_27(458-479)Online publication date: 1-Jul-2024
  • (2021)Program analysis via efficient symbolic abstractionProceedings of the ACM on Programming Languages10.1145/34854955:OOPSLA(1-32)Online publication date: 15-Oct-2021
  • 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