Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3559744.3559747acmotherconferencesArticle/Chapter ViewAbstractPublication PagessastConference Proceedingsconference-collections
research-article

Fully-Tested code generation from TLA+ specifications

Published: 03 October 2022 Publication History

Abstract

Specifying software systems brings value by increasing confidence. However, engineers struggle to adopt this practice for its steep learning curve and lack of connection to production software. These problems can be addressed with simulation of specifications and generation of test cases. TLA+ (Temporal Logic of Actions+), a specification language used by big tech companies, is still mostly devoid of this tooling. This work proposes a combination of code and test generation from TLA+ files with the goal of making specification writers obtain value from their specifications as soon as possible.

References

[1]
Mehmet Adak, Okan Topçu, and Halit Oguztüzün. 2010. Model-based code generation for HLA federates. Software: Practice and Experience 40, 2 (2010), 149–175. https://doi.org/10.1002/spe.949 arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/spe.949
[2]
Joe L. Armstrong. 2003. Making reliable distributed systems in the presence of software errors.
[3]
Néstor Cataño. 2015. Code Generation for Event-B. International Journal on Software Tools for Technology Transfer (01 2015).
[4]
Ruby Community. 2021. About Ruby. https://www.ruby-lang.org/en/about/
[5]
Edsger W. Dijkstra, W.H.J. Feijen, and A.J.M. van Gasteren. 1983. Derivation of a Termination Detection Algorithm for Distributed Computations. In Information Processing Letters, Vol. 14. 217–219.
[6]
Star Dorminey. 2020. Kayfabe: Model-Based Program Testing with TLA+/TLC. https://conf.tlapl.us/2020/11-Star_Dorminey-Kayfabe_Model_based_program_testing_with_TLC.pdf
[7]
Mats Heimdahl and David Keenan. 1999. Generating Code from Hierarchical State-Based Requirements. (12 1999).
[8]
HS Hong, I Lee, O Sokolsky, and H Ural. 2002. A temporal logic based theory of test coverage and generation. In TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANAYLSIS OF SYSTEMS, PROCEEDINGS(Lecture Notes in Computer Science, Vol. 2280), Katoen, JP and Stevens, P (Ed.). Lab Verimag, SPRINGER-VERLAG BERLIN, HEIDELBERGER PLATZ 3, D-14197 BERLIN, GERMANY, 327–341. 8th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2002), GRENOBLE, FRANCE, APR 08-12, 2002.
[9]
Kai Hu, Teng Zhang, and Zhibin Yang. 2013. Multi-threaded code generation from SIGNAL program to OpenMP. Frontiers of Computer Science 7 (10 2013), 617–626. https://doi.org/10.1007/s11704-013-3906-4
[10]
Igor Konnov, Jure Kukovec, and Thanh-Hai Tran. 2019. TLA+ Model Checking Made Symbolic. Proc. ACM Program. Lang. 3, OOPSLA, Article 123 (Oct. 2019), 30 pages. https://doi.org/10.1145/3360549
[11]
Andrey Kuprianov and Igor Konnov. 2020. Model-based testing with TLA+ and Apalache. http://conf.tlapl.us/2020/09-Kuprianov_and_Konnov-Model-based_testing_with_TLA_+_and_Apalache.pdf
[12]
Leslie Lamport. 1983. Specifying Concurrent Program Modules. ACM Trans. Program. Lang. Syst. 5, 2 (1983), 190–222.
[13]
Leslie Lamport. 1994. The Temporal Logic of Actions. ACM Trans. Program. Lang. Syst. 16, 3 (1994), 872–923.
[14]
Leslie Lamport. 2002. Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley. https://www.microsoft.com/en-us/research/publication/specifying-systems-the-tla-language-and-tools-for-hardware-and-software-engineers/
[15]
Elizabeth I. Leonard and Constance L. Heitmeyer. 2008. Automatic Program Generation from Formal Specifications using APTS. In Automatic Program Development: A Tribute to Robert Paige, Olivier Danvy, Harry Mairson, Fritz Henglein, and Alberto Pettorossi (Eds.). Springer Netherlands, Dordrecht, 93–113. https://doi.org/10.1007/978-1-4020-6585-9_10
[16]
Anakreon Mentis and Panagiotis Katsaros. 2012. Model checking and code generation for transaction processing software. Concurrency and Computation: Practice and Experience 24, 7(2012), 711–722. https://doi.org/10.1002/cpe.1876 arXiv:https://onlinelibrary.wiley.com/doi/pdf/10.1002/cpe.1876
[17]
Stephan Merz. 2003. On the logic of TLA+. Computers and Artificial Intelligence 22 (01 2003), 351–379.
[18]
Robin Milner, Joachim Parrow, and David Walker. 1992. A calculus of mobile processes, I. Information and Computation 100, 1 (1992), 1 – 40. https://doi.org/10.1016/0890-5401(92)90008-4
[19]
Chris Newcombe, Tim Rath, Fan Zhang, Bogdan Munteanu, Marc Brooker, and Michael Deardeuff. 2015. How Amazon Web Services Uses Formal Methods. Commun. ACM 58, 4 (March 2015), 66–73. https://doi.org/10.1145/2699417
[20]
C. A. Petri. 1962. Fundamentals of a Theory of Asynchronous Information Flow. In IFIP Congress. 386–390.
[21]
Christopher Robinson-Mallett, Peter Liggesmeyer, Tilo Muecke, and Ursula Goltz. 2006. Extended state identification and verification using a model checker. INFORMATION AND SOFTWARE TECHNOLOGY 48, 10 (OCT 2006), 981–992. https://doi.org/10.1016/j.infsof.2006.03.006 Workshop on Advances in Model-Based Software Testing, St.Louis, MO, MAY 15-16, 2005.
[22]
The Elixir Team. 2012. Elixir. https://elixir-lang.org
[23]
The Elixir Team. 2021. ExUnit - Unit testing framework for Elixir. https://hexdocs.pm/ex_unit/ExUnit.html
[24]
Willem Visser, Corina S. PǍSǍREANU, and Sarfraz Khurshid. 2004. Test Input Generation with Java PathFinder. In Proceedings of the 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis (Boston, Massachusetts, USA) (ISSTA ’04). Association for Computing Machinery, New York, NY, USA, 97–107. https://doi.org/10.1145/1007512.1007526
[25]
Songtao Xia, Ben Di Vito, and César Muñoz. 2005. Automated Test Generation for Engineering Applications. In Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering (Long Beach, CA, USA) (ASE ’05). Association for Computing Machinery, New York, NY, USA, 283–286. https://doi.org/10.1145/1101908.1101951
[26]
Brandon Zhang. 2017. PGo : Corresponding a high-level formal specification with its implementation.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
SAST '22: Proceedings of the 7th Brazilian Symposium on Systematic and Automated Software Testing
October 2022
78 pages
ISBN:9781450397537
DOI:10.1145/3559744
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 October 2022

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Code generation
  2. Elixir
  3. Formal specification
  4. Model-Based testing
  5. TLA+
  6. Test generation

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Funding Sources

  • FAPESC

Conference

SAST 2022

Acceptance Rates

Overall Acceptance Rate 45 of 92 submissions, 49%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 174
    Total Downloads
  • Downloads (Last 12 months)51
  • Downloads (Last 6 weeks)7
Reflects downloads up to 01 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

HTML Format

View this article in HTML Format.

HTML Format

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media