LibASL.Asl_utilsSourceASL utility functions
add association list to bindings
create bindings from association list
print bindings
merge a list of sets
val addToBindingSet :
AST.ident ->
AST.ident ->
IdentSet.t Bindings.t ->
IdentSet.t Bindings.tadd v to set of identifiers mapped to k
convert identifier set to sorted list of identifiers
The implementation is trivial and exists mostly to emphasize that the resulting list is sorted
Equivalence classes are represented by trees.
The root of the tree is the canonical member of the class. Traversing the parent node takes you closer to the canonical member. The root is its own parent.
Equivalence class support (to support unification, and similar)
The implementation is based on Wikipedia: Union-Find. I have not implemented all the optimizations they suggest because I expect sets to be quite small in practice.
Performing variable substitutions in expressions and types
More flexible substitution class - takes a function instead of a binding set.
Expression transformation class
Resugaring transform
Length of bitstring or mask literal.
ASL bit and mask literals allow spaces to be included - these do not count towards the length of the literal.