ABSTRACT
This paper introduces a new library for implementing executable contracts in Elixir. In addition to classical contract constructs such as preconditions and postconditions, the library permits e.g. to specify exceptional behaviour (i.e. which exceptions are thrown and under which conditions), and to associate timers with function calls to detect non-terminating or too slow computations.
- Sergio Antoy and Michael Hanus. 2012. Contracts and Specifications for Functional Logic Programming. In PADL 2012, Claudio V. Russo and Neng-Fa Zhou (Eds.) (LNCS, Vol. 7149). Springer, 33–47. https://doi.org/10.1007/978-3-642-27694-1_4 Google ScholarDigital Library
- Mauricio Cassola, Agustín Talagorria, Alberto Pardo, and Marcos Viera. 2020. A Gradual Type System for Elixir. In Proceedings of the 24th Brazilian Symposium on Context-Oriented Programming and Advanced Modularity (SBLP ’20). Association for Computing Machinery, New York, NY, USA. 17–24. isbn:9781450389433 https://doi.org/10.1145/3427081.3427084 Google ScholarDigital Library
- Lars-Åke Fredlund, Julio Mariño, Sergio Pérez, and Salvador Tamarit. 2018. Runtime Verification in Erlang by Using Contracts. In Functional and Constraint Logic Programming - 26th International Workshop, WFLP 2018, Frankfurt/Main, Germany, September 6, 2018, Revised Selected Papers, Josep Silva (Ed.) (Lecture Notes in Computer Science, Vol. 11285). Springer, 56–73. https://doi.org/10.1007/978-3-030-16202-3_4 Google ScholarCross Ref
- K. Rustan M. Leino. 2010. Dafny: An Automatic Program Verifier for Functional Correctness. In Logic for Programming, Artificial Intelligence, and Reasoning - 16th International Conference, LPAR-16, Dakar, Senegal, April 25-May 1, 2010, Revised Selected Papers, Edmund M. Clarke and Andrei Voronkov (Eds.) (Lecture Notes in Computer Science, Vol. 6355). Springer, 348–370. https://doi.org/10.1007/978-3-642-17511-4_20 Google ScholarCross Ref
- Tobias Lindahl and Konstantinos Sagonas. 2006. Practical type inference based on success typings. In Proceedings of the 8th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, July 10-12, 2006, Venice, Italy, Annalisa Bossi and Michael J. Maher (Eds.). ACM, 167–178. https://doi.org/10.1145/1140335.1140356 Google ScholarDigital Library
- Bertrand Meyer. 1992. Applying "Design by Contract". IEEE Computer, 25, 10 (1992), 40–51. https://doi.org/10.1109/2.161279 Google ScholarDigital Library
- Erlang Solutions. 2021. https://github.com/esl/gradient Accessed: 2022-06-21 Google Scholar
- Josef Svenningsson. 2019. https://github.com/josefs/Gradualizer Accessed: 2022-06-21 Google Scholar
- Elixir Toniq. 2019. https://github.com/elixir-toniq/norm Accessed: 2022-06-21 Google Scholar
- Jose Valim. 2011. https://hexdocs.pm/ex_unit/1.12/ExUnit.html Accessed: 2022-06-21 Google Scholar
- Wiebe-Marten Wijnja. 2022. TypeCheck - Effortless runtime type-checking. https://github.com/Qqwy/elixir-type_check In Elixir EU 2022. Google Scholar
Index Terms
- Executable contracts for Elixir
Recommendations
On the Pragmatics of Moving from System Models to Program Contracts
Leveraging Applications of Formal Methods, Verification and Validation. Verification PrinciplesAbstractConsider a software development process supported by Formal Methods that includes an abstract system model and contract-based program verification. Relative to the total size of the formal system model and the information captured in program ...
Comments