skip to main content
10.1145/2642937.2642938acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
research-article

Automated domain-specific C verification with mbeddr

Published: 15 September 2014 Publication History

Abstract

When verifying C code, two major problems must be addressed. One is the specification of the verified systems properties, the other one is the construction of the verification environment. Neither C itself, nor existing C verification tools, offer the means to efficiently specify application domain-level properties and environments for verification. These two shortcomings hamper the usability of C verification, and limit its adoption in practice. In this paper we introduce an approach that addresses both problems and results in user-friendly and practically usable C verification. The novelty of the approach is the combination of domain-specific language engineering and C verification. We apply the approach in the domain of state-based software, using mbeddr and CBMC. We validate the implementation with an example from the Pacemaker Challenge, developing a functionally verified, lightweight, and deployable cardiac pulse generator. The approach itself is domain-independent.

References

[1]
P. A. Abdulla, J. Deneux, G. Stålmarck, H. Ågren, and O. Åkerlund. Designing Safe, Reliable Systems using Scade. In Leveraging Applications of Formal Methods, pages 115--129. Springer, 2006.
[2]
T. Ball, B. Cook, V. Levin, and S. K. Rajamani. SLAM and Static Driver Verifier: Technology Transfer of Formal Methods inside Microsoft. In Integrated Formal Methods, volume 2999 of Lecture Notes in Computer Science, pages 1--20. Springer, 2004.
[3]
P. Baudin, J. Filliatre, C. Marche, and et al. ACSL: ANSI/ISO C Specification Language. http://frama-c.com/acsl.html, 2012.
[4]
K. Beck. Test-driven Development : by Example. Addison-Wesley, 2003.
[5]
J. Bengtsson, K. G. Larsen, F. Larsson, P. Pettersson, and W. Yi. UPPAAL - a Tool Suite for Automatic Verification of Real-Time Systems. In Hybrid Systems, volume 1066 of Lecture Notes in Computer Science, pages 232--243. Springer, 1995.
[6]
B. Bérard, M. Bidoit, A. Finkel, F. Laroussinie, A. Petit, L. Petrucci, and P. Schnoebelen. Systems and Software Verification: Model-Checking Techniques and Tools. Springer, 1st edition, 2010.
[7]
D. Beyer and M. E. Keremoglu. CPAchecker: A Tool for Configurable Software Verification. In Proceedings of the 23rd International Conference on Computer Aided Verification, volume 6806 of Lecture Notes in Computer Science, pages 184--190. Springer, 2011.
[8]
S. Q. R. L. Boston Scientific. PACEMAKER System Specification, http://sqrl.mcmaster.ca/pacemaker.htm, 2007.
[9]
P. Chalin, J. R. Kiniry, G. T. Leavens, and E. Poll. Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2. In Proceedings of the 4th International Conference on Formal Methods for Components and Objects, pages 342--363. Springer, 2006.
[10]
E. Clarke, D. Kroening, and F. Lerda. A Tool for Checking ANSI-C Programs. In Tools and Algorithms for the Construction and Analysis of Systems, volume 2988 of Lecture Notes in Computer Science, pages 168--176. Springer, 2004.
[11]
E. Clarke, D. Kroening, N. Sharygina, and K. Yorav. SATABS: SAT-based Predicate Abstraction for ANSI-C . In Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2005), volume 3440 of Lecture Notes in Computer Science, pages 570--574. Springer, 2005.
[12]
J. C. Corbett, M. B. Dwyer, J. Hatcliff, and Robby. A Language Framework for Expressing Checkable Properties of Dynamic Software. In 7th International SPIN Workshop, volume 1885 of Lecture Notes in Computer Science, pages 205--223. Springer, 2000.
[13]
L. Cordeiro, B. Fischer, H. Chen, and J. Marques-Silva. Semiformal Verification of Embedded Software in Medical Devices Considering Stringent Hardware Constraints. In International Conferences on Embedded Software and Systems, pages 396--403, 2009.
[14]
P. Dhaussy, F. Boniol, J.-C. Roger, and L. Leroux. Improving Model Checking with Context Modelling. Advances in Software Engineering, 2012, 2012.
[15]
V. Donzeau-Gouge, G. Huet, G. Kahn, and B. Lang. Programming Environment Based On Structured Editors: The MENTOR Experience. http://bat8.inria.fr/lang/papers/RR-0026.pdf, 1980.
[16]
M. B. Dwyer, G. S. Avrunin, and J. C. Corbett. Patterns in property specifications for finite-state verification. In Proceedings of the 21st International Conference on Software Engineering, pages 411--420. ACM, 1999.
[17]
S. Erdweg, T. Rendel, C. Kästner, and K. Ostermann. SugarJ: Library-based Syntactic Language Extensibility. In Proceedings of the 26th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, volume 46, pages 391--406. ACM, 2011.
[18]
S. Erdweg, T. van der Storm, M. Völter, M. Boersma, R. Bosman, W. R. Cook, A. Gerritsen, A. Hulshout, S. Kelly, A. Loh, et al. The State of the Art in Language Workbenches - Conclusions from the Language Workbench Challenge. In Software Language Engineering, pages 197--217. Springer, 2013.
[19]
M. Fowler. "Language Workbenches: The Killer-App for Domain Specific Languages?". http://www.martinfowler.com/articles, 2005.
[20]
A. A. E. Ghazi, M. Ulbrich, C. Gladisch, S. S. Tyszberowicz, and M. Taghdiri. JKelloy: A Proof Assistant for Relational Specifications of Java Programs. In 6th Symposium, NASA Formal Methods, pages 173--187, 2014.
[21]
A. O. Gomes and M. V. Oliveira. Formal Development of a Cardiac Pacemaker: From Specification to Code. In Proceedings of the 2nd World Congress on Formal Methods, pages 692--707. Springer, 2009.
[22]
K. Havelund and T. Pressburger. Model Checking JAVA Programs using JAVA PathFinder. International Journal on Software Tools for Technology Transfer, 2(4):366--381, 2000.
[23]
G. J. Holzmann, R. Joshi, and A. Groce. New Challenges in Model Checking. In 25 Years of Model Checking, volume 5000 of Lecture Notes in Computer Science, pages 65--76. Springer, 2008.
[24]
L. C. L. Kats and E. Visser. The Spoofax Language Workbench: Rules for Declarative Specification of Languages and IDEs. In Proceedings of the 25th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 444--463. ACM, 2010.
[25]
B. Larson, P. Chalin, and J. Hatcliff. BLESS: Formal Specification and Verification of Behaviors for Embedded Systems with Software. In 5th Symposium, NASA Formal Methods, pages 276--290, 2013.
[26]
H. D. Macedo, P. G. Larsen, and J. S. Fitzgerald. Incremental Development of a Distributed Real-Time Model of A Cardiac Pacing System using VDM. In 15th Intl. Symp. on Formal Methods, pages 181--197, 2008.
[27]
D. Méry and N. K. Singh. Formal Development and Automatic Code Generation: Cardiac Pacemaker. In International Conference on Computers and Advanced Technology in Education, 2011.
[28]
J. Morse, L. Cordeiro, D. Nicole, and B. Fischer. Context-Bounded Model Checking of LTL Properties for ANSI-C Software. In In Intl. Conf. on Software Engineering and Formal Methods, volume 7041 of Lecture Notes in Computer Science, pages 302--317. Springer, 2011.
[29]
T. Nipkow, L. C. Paulson, and M. Wenzel. Isabelle/HOL: a proof assistant for higher-order logic. Springer, 2002.
[30]
M. Pajic, Z. Jiang, I. Lee, O. Sokolsky, and R. Mangharam. From Verification to Implementation: A Model Translation Tool and a Pacemaker Case Study. In IEEE 18th Real-Time and Embedded Technology and Applications Symposium, pages 173--184. IEEE, 2012.
[31]
H. Post, C. Sinz, F. Merz, T. Gorges, and T. Kropf. Linking Functional Requirements and Software Verification. In 17th IEEE International Requirements Engineering Conference, pages 295--302. IEEE Computer Society, 2009.
[32]
D. Ratiu, M. Voelter, Z. Molotnikov, and B. Schtz. Implementing Modular Domain Specific Languages and Analyses. In Proceedings of the 9th Workshop äon Model-Driven Engineering, Verification and Validation, pages 35--40. ACM, 2012.
[33]
D. Ratiu, M. Völter, B. Kolb, and B. Schätz. Using Language Engineering to Lift Languages and Analyses at the Domain Level. In 5th Symposium, NASA Formal Methods, pages 465--471, 2013.
[34]
A. Sharma. Technical Report: Towards A Verified Cardiac Pacemaker. http://www.comp.nus.edu.sg/asankhs/pdf/, 2010.
[35]
J. M. Spivey and J. Abrial. The Z Notation. Prentice Hall Hemel Hempstead, 1992.
[36]
O. Tkachuk, M. B. Dwyer, and C. S. Pasareanu. Automated Environment Generation for Software Model Checking. In 18th IEEE International Conference on Automated Software Engineering, pages 116--129. IEEE Computer Society, 2003.
[37]
M. Voelter. Language and IDE Development, Modularization and Composition with MPS. In Generative and Transformational Techniques in Software Engineering 4, Lecture Notes in Computer Science, pages 383--430. Springer, 2011.
[38]
M. Voelter, S. Benz, C. Dietrich, B. Engelmann, M. Helander, L. Kats, E. Visser, and G. Wachsmuth. DSL Engineering -- Designing, Implementing and Using Domain-Specific Languages. CreateSpace Publishing Platform, 2013.
[39]
M. Voelter, D. Ratiu, B. Kolb, and B. Schätz. mbeddr: Instantiating a Language Workbench in the Embedded Software Domain. Journal of Automated Software Engineering, 20(3):339--390, 2013.
[40]
M. Voelter, D. Ratiu, B. Schätz, and B. Kolb. mbeddr: an extensible C-based programming language and IDE for embedded systems. In Proc. of Conference on Systems, Programming, and Applications: Software for Humanity, pages 121--140. ACM, 2012.
[41]
M. Voelter, D. Ratiu, and F. Tomassetti. Requirements as First-Class Citizens. In Proc. Modellbasierte Entwicklung eingebetteter Systeme IX, Schloss Dagstuhl, pages 44--49, 2013.

Cited By

View all
  • (2023)Thorium: A Language for Bounded Verification of Dynamic Reactive ObjectsProceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3623506.3623574(1-13)Online publication date: 19-Oct-2023
  • (2021)Integration and Orchestration of Analysis ToolsComposing Model-Based Analysis Tools10.1007/978-3-030-81915-6_5(71-95)Online publication date: 18-Jul-2021
  • (2019)Using language workbenches and domain-specific languages for safety-critical software developmentSoftware and Systems Modeling (SoSyM)10.1007/s10270-018-0679-018:4(2507-2530)Online publication date: 1-Aug-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ASE '14: Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering
September 2014
934 pages
ISBN:9781450330138
DOI:10.1145/2642937
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].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 September 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. cbmc
  2. domain-specific languages
  3. mbeddr
  4. verification

Qualifiers

  • Research-article

Conference

ASE '14
Sponsor:

Acceptance Rates

ASE '14 Paper Acceptance Rate 82 of 337 submissions, 24%;
Overall Acceptance Rate 82 of 337 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)4
  • Downloads (Last 6 weeks)0
Reflects downloads up to 24 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Thorium: A Language for Bounded Verification of Dynamic Reactive ObjectsProceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3623506.3623574(1-13)Online publication date: 19-Oct-2023
  • (2021)Integration and Orchestration of Analysis ToolsComposing Model-Based Analysis Tools10.1007/978-3-030-81915-6_5(71-95)Online publication date: 18-Jul-2021
  • (2019)Using language workbenches and domain-specific languages for safety-critical software developmentSoftware and Systems Modeling (SoSyM)10.1007/s10270-018-0679-018:4(2507-2530)Online publication date: 1-Aug-2019
  • (2019)Lessons learned from developing mbeddrSoftware and Systems Modeling (SoSyM)10.1007/s10270-016-0575-418:1(585-630)Online publication date: 1-Feb-2019
  • (2019)An integrated environment for Spin-based C code checkingInternational Journal on Software Tools for Technology Transfer (STTT)10.1007/s10009-019-00510-w21:3(267-286)Online publication date: 1-Jun-2019
  • (2018)Automated testing of DSL implementations--experiences from building mbeddrSoftware Quality Journal10.1007/s11219-017-9390-626:4(1483-1518)Online publication date: 1-Dec-2018
  • (2018)Fusing Modeling and Programming into Language-Oriented ProgrammingLeveraging Applications of Formal Methods, Verification and Validation. Modeling10.1007/978-3-030-03418-4_19(309-339)Online publication date: 5-Nov-2018
  • (2017)Increasing usability of spin-based C code verification using a harness definition language: leveraging model-driven code checking to practitionersProceedings of the 24th ACM SIGSOFT International SPIN Symposium on Model Checking of Software10.1145/3092282.3092283(60-69)Online publication date: 13-Jul-2017
  • (2016)Efficiency of projectional editing: a controlled experimentProceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering10.1145/2950290.2950315(763-774)Online publication date: 1-Nov-2016
  • (2016)Automated testing of DSL implementationsProceedings of the 11th International Workshop on Automation of Software Test10.1145/2896921.2896922(15-21)Online publication date: 14-May-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media