Contract systems enable programmers to state specifications and have them enforced at run time. First-order contracts are expressed using ordinary code, while higher-order contracts are expressed using the notation familiar from type systems. Most interface descriptions, though, come with properties that involve not just assertions about single method calls, but entire call chains. Typical contract systems cannot express these specifications concisely. Such specifications demand domain-specific notations. In response, this paper proposes that contract systems abstract over the notation used for stating specifications. It presents an architecture for such a system, some illustrative examples, and an evaluation in terms of common notations from the literature.
@InProceedings{moy_et_al:LIPIcs.ECOOP.2025.42, author = {Moy, Cameron and Jung, Ryan and Felleisen, Matthias}, title = {{Contract Systems Need Domain-Specific Notations}}, booktitle = {39th European Conference on Object-Oriented Programming (ECOOP 2025)}, pages = {42:1--42:24}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-373-7}, ISSN = {1868-8969}, year = {2025}, volume = {333}, editor = {Aldrich, Jonathan and Silva, Alexandra}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2025.42}, URN = {urn:nbn:de:0030-drops-233348}, doi = {10.4230/LIPIcs.ECOOP.2025.42}, annote = {Keywords: software contracts, domain-specific languages} }
Feedback for Dagstuhl Publishing