Functions for querying Salix models.
Finds the transitive closure starting from a sub-set of declarations from an L2. Any type references in these declarations will pull their referred to declarations into the closure, and this process will be continued recursively until no more members are added to the closure.
This is useful if some declarations need to be generated from, including all their dependencies. For example, to code generate an encoder for a declaration that references other types by name, the encoders for those other types also need to be generated. The transitive closure gives the full set of declaration to generate encoders for to complete the code.
The first argument is the starting set, and the second argument is the complete model to select a transitive closure from.
transitiveClosure startingSet modelFinds the transitive closure starting from a sub-set of declarations from an L2. Any type references in these declarations will pull their referred to declarations into the closure, and this process will be continued recursively until no more members are added to the closure.
The starting set itself will not be automatically included in the results. Members of the starting set may end up in the results, but only if they are dependencies of other members of the starting set.
This is useful if some declarations need to be generated from, including all their dependencies. For example, to code generate an encoder for a declaration that references other types by name, the encoders for those other types also need to be generated. The transitive closure gives the full set of declaration to generate encoders for to complete the code.
The first argument is the starting set, and the second argument is the complete model to select a transitive closure from.
Starting from a type, computes the transitive closure from all outoing TNamed references within that type. This yields all declarations that a type depends on.
Expects a Declarable to be a DAlias otherwise its an error.
Expects a Type to be a TProduct otherwise its an error.
Expects a Type to be a TProduct or TEmptyProduct otherwise its an error.
Defines the type of a function that filters over a set of properties, to things that have a certain set of properties.
ANDs two PropertyFilters together.
Inverts a PropertyFilter.
ORs two PropertyFilters together.
Filters the values in a Dict by a PropertyFilter.
Filters the elements in a List by a PropertyFilter.
Filters the elements in a Nonempty list by a PropertyFilter.
This makes a properties API on top of an empty set of defaults and specs.
This is useful when you don't have an L3, but want to run queries over properties. There may be intermediate properties that have been created during some processing that you need to query over, for example.
Dereferences an alias. If an alias is to another alias, since it consists only of a named type, this name will also be derferences recursively, until something that is not a named type is encountered.