A case for data-oriented specifications: simpler implementation of B tools and DSLs
Considering programs as data enables powerful meta-programming. One example is Lisp’s macro system, which gives rise to powerful transformations of programs and allows easy implementation of domain-specific languages. Formal specifications, however, usually do not rely on such mechanisms and are mos...
Saved in:
| Published in: | Innovations in systems and software engineering Vol. 21; no. 3; pp. 939 - 959 |
|---|---|
| Main Authors: | , , |
| Format: | Journal Article |
| Language: | English |
| Published: |
Heidelberg
Springer Nature B.V
01.09.2025
|
| Subjects: | |
| ISSN: | 1614-5046, 1614-5054 |
| Online Access: | Get full text |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| Summary: | Considering programs as data enables powerful meta-programming. One example is Lisp’s macro system, which gives rise to powerful transformations of programs and allows easy implementation of domain-specific languages. Formal specifications, however, usually do not rely on such mechanisms and are mostly written by hand in a textual format (or using specialised domain-specific language (DSL) tools). In this paper, we investigate the opportunities that stem from considering specifications as data. For this, we embedded the B specification language in Clojure, a modern Lisp. We use Clojure as a functional meta-programming language and the ProB Java API to capture the semantics of B, i.e., to find solutions for constraints or animate machines. From our experience, it is especially useful for tool development and generation of constraints and machines from external data sources. It can also be used to implement language extensions and to design DSLs. |
|---|---|
| Bibliography: | ObjectType-Article-1 SourceType-Scholarly Journals-1 ObjectType-Feature-2 content type line 14 |
| ISSN: | 1614-5046 1614-5054 |
| DOI: | 10.1007/s11334-025-00596-3 |