Package com.articulate.sigma.parsing
Class Sortals
java.lang.Object
com.articulate.sigma.parsing.Sortals
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFind the most specific type constraint for each variable and create a new String of the formula with type guardsaddSortals(FormulaAST f, Map<String, Set<String>> types) Add type guards to a formula by making it the consequent of a rule and making type tests into a new antecedentvoidEliminate more general types in favor of their more specific subclasses (if any)mostSpecificType(Set<String> types) Find the most specific type in a list of types.If a type is already specified for a variable in a rule with an instance or subclass statement, remove it from the type list so that it won't be added as a type guardvoidFind the most specific type constraint for each variable
-
Field Details
-
debug
public boolean debug -
disjointTime
public long disjointTime
-
-
Constructor Details
-
Sortals
-
-
Method Details
-
addSortals
Add type guards to a formula by making it the consequent of a rule and making type tests into a new antecedent -
mostSpecificType
Find the most specific type in a list of types. This assumes that the list has already been tested for disjointness -
removeExplicitTypes
public Map<String,Set<String>> removeExplicitTypes(Map<String, Set<String>> typesMap, Map<String, Set<String>> explicit) If a type is already specified for a variable in a rule with an instance or subclass statement, remove it from the type list so that it won't be added as a type guard -
elimSubsumedTypes
Eliminate more general types in favor of their more specific subclasses (if any) -
winnowAllTypes
Find the most specific type constraint for each variable -
addSortals
Find the most specific type constraint for each variable and create a new String of the formula with type guards
-