File Download
There are no files associated with this item.
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.1145/3563294
- Scopus: eid_2-s2.0-85168424076
- WOS: WOS:001083750200008
- Find via
Supplementary
- Citations:
- Appears in Collections:
Article: Compositional embeddings of domain-specific languages
Title | Compositional embeddings of domain-specific languages |
---|---|
Authors | |
Keywords | Compositional Programming Extensible Typesetting |
Issue Date | 31-Oct-2022 |
Publisher | Association for Computing Machinery (ACM) |
Citation | Proceedings of the ACM on Programming Languages, 2022, v. 6, n. OOPSLA2 How to Cite? |
Abstract | A common approach to defining domain-specific languages (DSLs) is via a direct embedding into a host language. There are several well-known techniques to do such embeddings, including shallow and deep embeddings. However, such embeddings come with various trade-offs in existing programming languages. Owing to such trade-offs, many embedded DSLs end up using a mix of approaches in practice, requiring a substantial amount of code, as well as some advanced coding techniques. In this paper, we show that the recently proposed Compositional Programming paradigm and the CP language provide improved support for embedded DSLs. In CP we obtain a new form of embedding, which we call a compositional embedding, that has most of the advantages of both shallow and deep embeddings. On the one hand, compositional embeddings enable various forms of linguistic reuse that are characteristic of shallow embeddings, including the ability to reuse host-language optimizations in the DSL and add new DSL constructs easily. On the other hand, similarly to deep embeddings, compositional embeddings support definitions by pattern matching or dynamic dispatching (including dependent interpretations, transformations, and optimizations) over the abstract syntax of the DSL and have the ability to add new interpretations. We illustrate an instance of compositional embeddings with a DSL for document authoring called ExT. The DSL is highly flexible and extensible, allowing users to create various non-trivial extensions easily. For instance, ExT supports various extensions that enable the production of wiki-like documents, LaTeX documents, vector graphics or charts. The viability of compositional embeddings for ExT is evaluated with three applications. |
Persistent Identifier | http://hdl.handle.net/10722/331959 |
ISSN | 2023 Impact Factor: 2.2 2023 SCImago Journal Rankings: 1.242 |
ISI Accession Number ID |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Sun, Yaozhu | - |
dc.contributor.author | Dhandhania, Utkarsh | - |
dc.contributor.author | Oliveira, Bruno C d S | - |
dc.date.accessioned | 2023-09-28T04:59:53Z | - |
dc.date.available | 2023-09-28T04:59:53Z | - |
dc.date.issued | 2022-10-31 | - |
dc.identifier.citation | Proceedings of the ACM on Programming Languages, 2022, v. 6, n. OOPSLA2 | - |
dc.identifier.issn | 2475-1421 | - |
dc.identifier.uri | http://hdl.handle.net/10722/331959 | - |
dc.description.abstract | <p>A common approach to defining domain-specific languages (DSLs) is via a direct embedding into a host language. There are several well-known techniques to do such embeddings, including shallow and deep embeddings. However, such embeddings come with various trade-offs in existing programming languages. Owing to such trade-offs, many embedded DSLs end up using a mix of approaches in practice, requiring a substantial amount of code, as well as some advanced coding techniques.</p><p>In this paper, we show that the recently proposed Compositional Programming paradigm and the CP language provide improved support for embedded DSLs. In CP we obtain a new form of embedding, which we call a compositional embedding, that has most of the advantages of both shallow and deep embeddings. On the one hand, compositional embeddings enable various forms of linguistic reuse that are characteristic of shallow embeddings, including the ability to reuse host-language optimizations in the DSL and add new DSL constructs easily. On the other hand, similarly to deep embeddings, compositional embeddings support definitions by pattern matching or dynamic dispatching (including dependent interpretations, transformations, and optimizations) over the abstract syntax of the DSL and have the ability to add new interpretations. We illustrate an instance of compositional embeddings with a DSL for document authoring called ExT. The DSL is highly flexible and extensible, allowing users to create various non-trivial extensions easily. For instance, ExT supports various extensions that enable the production of wiki-like documents, LaTeX documents, vector graphics or charts. The viability of compositional embeddings for ExT is evaluated with three applications.</p> | - |
dc.language | eng | - |
dc.publisher | Association for Computing Machinery (ACM) | - |
dc.relation.ispartof | Proceedings of the ACM on Programming Languages | - |
dc.rights | This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. | - |
dc.subject | Compositional Programming | - |
dc.subject | Extensible Typesetting | - |
dc.title | Compositional embeddings of domain-specific languages | - |
dc.type | Article | - |
dc.description.nature | published_or_final_version | - |
dc.identifier.doi | 10.1145/3563294 | - |
dc.identifier.scopus | eid_2-s2.0-85168424076 | - |
dc.identifier.volume | 6 | - |
dc.identifier.issue | OOPSLA2 | - |
dc.identifier.eissn | 2475-1421 | - |
dc.identifier.isi | WOS:001083750200008 | - |
dc.identifier.issnl | 2475-1421 | - |