ATerms for manipulation and exchange of structured data: It’s all about sharing
Section snippets
History and motivation
Some data types are so simple that they tend to be reimplemented over and over again. This is not only true for linked lists and symbol tables but also for terms, tree-like data structures that can represent prefix formulae, syntax trees, intermediate code, and more. The explanation is probably that every project needs slight variations of these simple data types and that existing parameterization techniques for software components cannot easily accommodate this variability.
Generic language
A quick introduction to ATerms
The data type of ATerms is defined as follows (see [11] for full details):
- •
An integer or real constant is an ATerm.
- •
A function application is an ATerm, e.g., f(a, b).
- •
A list of zero or more ATerms is an ATerm, e.g., [f(a), 1,“abc”].
- •
A placeholder term containing an ATerm that represents the type of the placeholder is an ATerm, e.g., f(〈int〉).
- •
A binary large object (BLOB) containing arbitrary binary data is an ATerm.
- •
A list of (label, annotation) pairs may be associated with each ATerm. Label and
Component-based development and interoperability
As was already mentioned in the introduction, ATerms were originally introduced as part of the ToolBus [3] coordination architecture as shown in Fig. 4. Key idea is that software components (“tools” in ToolBus parlance) written in different implementation languages are connected via the ToolBus that acts as language neutral middleware and coordinator. Unlike older technologies like DCOM and CORBA, the ToolBus uses a centralized description of the cooperation between the components that form the
ATerms compared with other technologies
How do ATerms compare to other technologies, in particular Xml? While making a comparison, we will discuss some unique characteristics of ATerms.
The future of ATerms
ATerms were created to reduce the number of different term representations in the Asf+Sdf Meta-Environment project. The maximal subterm sharing and automatic garbage collection motivated other researchers to jump on the ATerm train and to contribute. The development of an API generator, which allows type-safe manipulation of ATerms without loss of efficiency ensured an agile way of developing applications based on the ATerm library. There is a clear need for ATerms, being a light-weight
Acknowledgements
ToolBus terms were first implemented by Paul Klint in C. Pieter Olivier introduced the idea of maximal subterm sharing and started new C and Java implementations together with Hayco de Jong. The Java implementation was further improved by Pierre-Etienne Moreau by introducing SharedObjects (a generic mechanism for maximal subterm sharing in Java) and by improving garbage collection. Apigen for C was developed by Hayco de Jong and Pieter Olivier. A new version of Apigen for C and Java was
References (68)
- et al.
The discrete time ToolBus – a software coordination architecture
Science of Computer Programming
(1998) - et al.
An overview of ELAN
Electronic Notes in Theoretical Computer Science
(1998) - et al.
An action environment
Science of Computer Programming
(2006) - et al.
Object-oriented tree traversal with JJForester
Science of Computer Programming
(2003) Towards lightweight checks for mass maintenance transformations
Science of Computer Programming
(2005)- et al.
Factotum: automatic and systematic sharing support for systems analyzers
- D.A. van Beek, K.L. Man, M.A. Reniers, J.E. Rooda, R.R.H. Schiffelers. Syntax and consistent equation semantics of...
- et al.
μCRL a toolset for analysing algebraic specifications
- et al.
Garbage collection in an uncooperative environment
Software, Practice & Experience
(1988) - M.G.J. van den Brand, H.A. de Jong, P.A. Olivier. A common exchange format for reengineering tools based on aterms. In...
The ASF+SDF Meta-Environment: a component-based language development environment
Compiling language definitions: The asf+sdf compiler
ACM Transactions on Programming Languages and Systems
Efficient annotated terms
Software, Practice & Experience
Term rewriting with traversal functions
ACM Transactions on Software Engineering Methodology
Generalized parsing and term rewriting: semantics driven disambiguation
Environments for term rewriting engines for free!
A generator of efficient strongly typed abstract syntax trees in java
IEE Proceedings – Software
Development of parsing tools for CASL using generic language technology
Symbolic boolean manipulation with ordered binary decision diagrams
ACM Computing Surveys
Light-weight theorem proving for debugging and verifying units of code
Domain-specific language design requires feature descriptions
Journal of Computing and Information Technology
Lock-free dynamic hash tables with open addressing
Distributed Computing
Lock-free parallel garbage collection
Equational binary decision diagrams
The syntax definition formalism SDF – reference manual
SIGPLAN Notices
Generation of abstract programming interfaces from syntax definitions
Journal of Logic and Algebraic Programming
Cited by (21)
Enabling PHP software engineering research in Rascal
2017, Science of Computer ProgrammingJPC: A library for categorising and applying inter-language conversions between Java and Prolog
2017, Science of Computer ProgrammingCitation Excerpt :Concerning our classes reifying Prolog terms, most of them were inspired by the JPL library [47]. The ATerm library [2,53] defines a mechanism for maximal sub-term sharing for representing tree-like structures. We may adopt a similar approach in the future to reduce the memory footprint of our term structures if required.
Incremental concrete syntax for embedded languages with support for separate compilation
2013, Science of Computer ProgrammingMaximal Laziness. An Efficient Interpretation Technique for Purely Functional DSLs
2009, Electronic Notes in Theoretical Computer ScienceSharing Trees and Contextual Information: Re-imagining Forwarding in Attribute Grammars
2023, SLE 2023 - Proceedings of the 16th ACM SIGPLAN International Conference on Software Language Engineering, Co-located with: SPLASH 2023Comparing Bottom-Up with Top-Down Parsing Architectures for the Syntax Definition Formalism from a Disambiguation Standpoint
2023, OpenAccess Series in Informatics