Crates.io | aterm |
lib.rs | aterm |
version | 0.20.0 |
source | src |
created_at | 2017-04-15 09:32:24.104305 |
updated_at | 2017-09-03 08:31:50.440717 |
description | Implementation of the Annotated Terms data structure |
homepage | |
repository | https://gitlab.com/Apanatshka/aterm |
max_upload_size | |
id | 10640 |
size | 1,239,246 |
This repository holds an implementation of the Annotated Term (ATerm) format in Rust.
I suspect that originally ATerms were a big thing because of the convenience of a garbage collected C implementation of arbitrary trees, with maximal sharing. Now it seems to be more of a legacy format. You can still find the old ATerm guide online but I'll briefly recap the format.
This format encodes trees. The leaves of the trees can be:
i32
)i64
, optional in the spec)String
1)f32
)Vec<u8>
, though when you need this, are ATerms really what you need?)TermPlaceholder
, typed holes, for the legacy pattern interface)The trees are built up with applications of constructors. A constructor is just an alphanumeric name or a quoted string. The application of the constructor has zero or more children.
There are also specialised lists, mostly because they have their own syntax.
Tuples are applications of the empty constructor.
Oh right, and they're annotated: every term can have a list of annotations, which are also terms. Lists and constructor applications are also counted as terms, so basically everything can have annotations.
The Rust implementation has the follow features / todos:
actually they're just quoted constructors with zero children ↩