Package org.smtlib.impl
Class Sort.Application
java.lang.Object
org.smtlib.impl.Pos.Posable
org.smtlib.impl.Pos.Printable
org.smtlib.impl.Sort
org.smtlib.impl.Sort.Application
- All Implemented Interfaces:
INode,IPos.IPosable,ISort,ISort.IApplication
- Enclosing class:
Sort
Represents a sort expression consisting of a sort symbol or sort abbreviation symbol applied to a
corresponding number of sort arguments
-
Nested Class Summary
Nested classes/interfaces inherited from class org.smtlib.impl.Sort
Sort.Abbreviation, Sort.Application, Sort.ErrorDefinition, Sort.Family, Sort.FcnSort, Sort.ParameterNested classes/interfaces inherited from interface org.smtlib.ISort
ISort.IAbbreviation, ISort.IApplication, ISort.IDatatype, ISort.IDefinition, ISort.IErrorDefinition, ISort.IFactory, ISort.IFamily, ISort.IFcnSort, ISort.IParameter -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ISort.IDefinitionReference to definition; filled in during type-checkingprotected booleanWhether the sort was written as (S), in parentheses with no parametersprotected ISortCached value for expanded()protected IExpr.IIdentifierFields inherited from class org.smtlib.impl.Pos.Posable
pos -
Constructor Summary
ConstructorsConstructorDescriptionApplication(IExpr.IIdentifier sortID, List<ISort> sortParameters) Creates a sort application from a sort identifier and a list of sort arguments.Application(IExpr.IIdentifier sortID, List<ISort> sortParameters, boolean parenthesized) Creates a sort application that is written in parentheses even if it has no parameters, as (S)Application(IExpr.IIdentifier sortID, ISort... sortParameters) Creates a sort application from a sort identifier and a varargs array of sort arguments. -
Method Summary
Modifier and TypeMethodDescription<T> TThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }The definition of the family identifier, valid after the sort expression has been type-checked.definition(ISort.IDefinition definition) Sets and returns the value of definition() for this object to the value that is the argumentbooleanStructural equality after expansion of abbreviations (an alias and its literal expansion are equal), but without any substitution of free parameters.booleanequalsNoExpand(ISort sort) Raw structural comparison, deliberately without abbreviation expansion or parameter substitution -- so a user-defined alias and its expansion, whichISort.equals(Object)treats as equal, are NOT equal here.expand()Expands any head abbreviations, if any; requires definition() to be definedfamily()The head identifier of the sort expressioninthashCode()param(int i) Returns the ith parameterReturns the list of parametersbooleanTrue if written in parentheses; (S), with no parameters, is not SMT-LIB but is parsed (with an error) so that type checking reports it as wellsubstitute(Map<ISort.IParameter, ISort> map) Returns a new sort with any parameters substitutedMethods inherited from class org.smtlib.impl.Pos.Printable
toStringMethods inherited from class org.smtlib.impl.Pos.Posable
pos, setPosMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.smtlib.IPos.IPosable
pos, setPos
-
Field Details
-
sortID
-
sortParameters
-
definition
Reference to definition; filled in during type-checking -
expanded
Cached value for expanded() -
emptyParentheses
protected boolean emptyParenthesesWhether the sort was written as (S), in parentheses with no parameters
-
-
Constructor Details
-
Application
Creates a sort application from a sort identifier and a list of sort arguments. -
Application
Creates a sort application that is written in parentheses even if it has no parameters, as (S) -
Application
Creates a sort application from a sort identifier and a varargs array of sort arguments.
-
-
Method Details
-
parenthesized
public boolean parenthesized()Description copied from interface:ISort.IApplicationTrue if written in parentheses; (S), with no parameters, is not SMT-LIB but is parsed (with an error) so that type checking reports it as well- Specified by:
parenthesizedin interfaceISort.IApplication
-
family
Description copied from interface:ISort.IApplicationThe head identifier of the sort expression- Specified by:
familyin interfaceISort.IApplication
-
param
Description copied from interface:ISort.IApplicationReturns the ith parameter- Specified by:
paramin interfaceISort.IApplication
-
parameters
Description copied from interface:ISort.IApplicationReturns the list of parameters- Specified by:
parametersin interfaceISort.IApplication
-
definition
Description copied from interface:ISort.IApplicationThe definition of the family identifier, valid after the sort expression has been type-checked.- Specified by:
definitionin interfaceISort.IApplication
-
definition
Description copied from interface:ISort.IApplicationSets and returns the value of definition() for this object to the value that is the argument- Specified by:
definitionin interfaceISort.IApplication
-
expand
Description copied from interface:ISort.IApplicationExpands any head abbreviations, if any; requires definition() to be defined- Specified by:
expandin interfaceISort- Specified by:
expandin interfaceISort.IApplication
-
equals
Description copied from interface:ISortStructural equality after expansion of abbreviations (an alias and its literal expansion are equal), but without any substitution of free parameters. The general- purpose equality method -- use this unless a caller specifically needs a narrower comparison below.- Specified by:
equalsin interfaceISort- Specified by:
equalsin interfaceISort.IApplication- Overrides:
equalsin classPos.Posable- See Also:
-
equalsNoExpand
Description copied from interface:ISortRaw structural comparison, deliberately without abbreviation expansion or parameter substitution -- so a user-defined alias and its expansion, whichISort.equals(Object)treats as equal, are NOT equal here. Used internally asISort.equals(Object)'s own building block (expand both sides first, then compare structurally with this), and directly by any caller that specifically wants the literal, as-declared shape rather than the expanded one, e.g.Logic.checkArraySort(), which checks an array sort's declared shape against a fixed set of allowed sorts without expanding through an alias first.- Specified by:
equalsNoExpandin interfaceISort- Specified by:
equalsNoExpandin interfaceISort.IApplication
-
hashCode
public int hashCode()- Overrides:
hashCodein classPos.Posable
-
substitute
Description copied from interface:ISortReturns a new sort with any parameters substituted- Specified by:
substitutein interfaceISort
-
accept
Description copied from interface:INodeThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }- Specified by:
acceptin interfaceINode- Type Parameters:
T- the return type desired from the visit methods- Parameters:
v- the visitor class- Returns:
- the value returned by the visit method
- Throws:
IVisitor.VisitorException
-