[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2426890.2426909acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
research-article

Abstract syntax graphs for domain specific languages

Published: 21 January 2013 Publication History

Abstract

This paper presents a representation for embedded domain specific languages (EDSLs) using abstract syntax graphs (ASGs). The purpose of this representation is to deal with the important problem of defining operations that require observing or preserving sharing and recursion in EDSLs in an expressive, yet easy-to-use way. In contrast to more conventional representations based on abstract syntax trees, ASGs represent sharing and recursion explicitly as binder constructs. We use a functional representation of ASGs based on structured graphs, where binders are encoded with parametric higher-order abstract syntax. We show how adapt to this representation to well-typed ASGs. This is especially useful for EDSLs, which often reuse the type system of the host language. We also show an alternative class-based encoding of(well-typed) ASGs that enables extensible and modular well-typed EDSLs while allowing the manipulation of sharing and recursion.

References

[1]
T. Altenkirch and B. Reus. Monadic presentations of lambda terms using generalized inductive types. In CSL'99, 1999.
[2]
A. I. Baars and S. D. Swierstra. Type-safe, self inspecting code. In Haskell'04, 2004.
[3]
A. I. Baars, S. D. Swierstra, and M. Viera. Typed transformations of typed grammars: The left corner transform. Electron. Notes Theor. Comput. Sci., 253(7), 2010.
[4]
P. Bjesse, K. Claessen, M. Sheeran, and S. Singh. Lava: hardware design in Haskell. In ICFP'98, 1998.
[5]
J. Carette, O. Kiselyov, and C. Shan. Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages. J. Funct. Program., 19(5), 2009.
[6]
J. Cheney and R. Hinze. A lightweight implementation of generics and dynamics. In Haskell 2002, 2002.
[7]
A. Chlipala. Parametric higher-order abstract syntax for mechanized semantics. In ICFP'08, 2008.
[8]
K. Claessen and D. Sands. Observable sharing for functional circuit description. In In Asian Computing Science Conference. Springer Verlag, 1999.
[9]
D. Devriese and F. Piessens. Finally tagless observable recursion for an abstract grammar model. Journal of Functional Programming, 22(6):757--796, November 2012.
[10]
D. Devriese, I. Sergey, D. Clarke, and F. Piessens. Fixing idioms: A recursion primitive for applicative dsls. In PEPM'13, 2013.
[11]
A. Gill. Type-safe observable sharing in Haskell. In Haskell'09, 2009.
[12]
R. Hinze. Generics for the masses. J. Funct. Program., 16(4-5), 2006.
[13]
C. Hofer, K. Ostermann, T. Rendel, and A. Moors. Polymorphic embedding of dsls. In GPCE'08, 2008.
[14]
P. Hudak. Building domain-specific embedded languages. ACM Computing Surveys, 28, 1996.
[15]
P. Jansson and J. Jeuring. Polyp - a polytypic programming language extension. In POPL'97, 1997.
[16]
O. Kiselyov. Implementing explicit and finding implicit sharing in embedded DSLs. In Proceedings IFIP Working Conference on Domain-Specific Languages, 2011.
[17]
E. Meijer and G. Hutton. Bananas in space: extending fold and unfold to exponential types. In FPCA'95, 1995.
[18]
M. Might, D. Darais, and D. Spiewak. Parsing with derivatives: a functional pearl. In ICFP'11, 2011.
[19]
J. T. O'Donnell. Overview of Hydra: A concurrent language for synchronous digital circuit design. In IPDPS'02, 2002.
[20]
B. C. d. S. Oliveira and W. R. Cook. Functional programming with structured graphs. In ICFP'12, 2012.
[21]
B. C. d. S. Oliveira and J. Gibbons. Typecase: a design pattern for type-indexed functions. In Haskell'05, 2005.
[22]
B. C. d. S. Oliveira, R. Hinze, and Andres Löh. Extensible and Modular Generics for the Masses. In TFP'06, 2006.
[23]
S. Peyton Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for gadts. In ICFP'06, 2006.
[24]
F. Pfenning and C. Elliot. Higher-order abstract syntax. In PLDI'88, 1988.
[25]
F. Pottier. Lazy least fixed points in ML. Unpublished, 2009.
[26]
P.Wadler. The essence of functional programming. In POPL'92, 1992.
[27]
P. Wadler. The expression problem. Note to Java Genericity mailing list, Nov. 1998.
[28]
B. A. Yorgey, S.Weirich, J. Cretin, S. Peyton Jones, D. Vytiniotis, and J. P. Magalhães. Giving Haskell a promotion. In TLDI'12, 2012.

Cited By

View all
  • (2022)Compositional embeddings of domain-specific languagesProceedings of the ACM on Programming Languages10.1145/35632946:OOPSLA2(175-203)Online publication date: 31-Oct-2022
  • (2021)MDE and MDA in a Multi-Paradigm Modeling PerspectiveAdvancements in Model-Driven Architecture in Software Engineering10.4018/978-1-7998-3661-2.ch004(64-87)Online publication date: 2021
  • (2019)Functional Reactive EDSL with Asynchronous Execution for Resource-Constrained Embedded SystemsSoftware Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing10.1007/978-3-030-26428-4_12(171-190)Online publication date: 23-Aug-2019
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PEPM '13: Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
January 2013
162 pages
ISBN:9781450318426
DOI:10.1145/2426890
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]

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 January 2013

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. DSLs
  2. graphs
  3. haskell
  4. observable sharing

Qualifiers

  • Research-article

Conference

POPL '13
Sponsor:

Acceptance Rates

PEPM '13 Paper Acceptance Rate 13 of 29 submissions, 45%;
Overall Acceptance Rate 66 of 120 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)15
  • Downloads (Last 6 weeks)6
Reflects downloads up to 11 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Compositional embeddings of domain-specific languagesProceedings of the ACM on Programming Languages10.1145/35632946:OOPSLA2(175-203)Online publication date: 31-Oct-2022
  • (2021)MDE and MDA in a Multi-Paradigm Modeling PerspectiveAdvancements in Model-Driven Architecture in Software Engineering10.4018/978-1-7998-3661-2.ch004(64-87)Online publication date: 2021
  • (2019)Functional Reactive EDSL with Asynchronous Execution for Resource-Constrained Embedded SystemsSoftware Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing10.1007/978-3-030-26428-4_12(171-190)Online publication date: 23-Aug-2019
  • (2017)Packrats parse in packsACM SIGPLAN Notices10.1145/3156695.312295852:10(14-25)Online publication date: 7-Sep-2017
  • (2017)Packrats parse in packsProceedings of the 10th ACM SIGPLAN International Symposium on Haskell10.1145/3122955.3122958(14-25)Online publication date: 7-Sep-2017
  • (2016)The Key monad: type-safe unconstrained dynamic typingACM SIGPLAN Notices10.1145/3241625.297600851:12(146-157)Online publication date: 8-Sep-2016
  • (2016)The Key monad: type-safe unconstrained dynamic typingProceedings of the 9th International Symposium on Haskell10.1145/2976002.2976008(146-157)Online publication date: 8-Sep-2016
  • (2015)Generalising Tree Traversals to DAGsProceedings of the 2015 Workshop on Partial Evaluation and Program Manipulation10.1145/2678015.2682539(27-38)Online publication date: 13-Jan-2015
  • (2015)Exploring Situation Theory Using InfonLabProceedings of the 2015 IEEE 18th International Symposium on Real-Time Distributed Computing10.1109/ISORC.2015.20(260-267)Online publication date: 13-Apr-2015
  • (2014)Capture-Avoiding and Hygienic Program TransformationsProceedings of the 28th European Conference on ECOOP 2014 --- Object-Oriented Programming - Volume 858610.1007/978-3-662-44202-9_20(489-514)Online publication date: 1-Aug-2014
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media