Package org.smtlib.impl
Class SMTExpr.Logic
java.lang.Object
org.smtlib.impl.Pos.Posable
org.smtlib.impl.Pos.Printable
org.smtlib.impl.SMTExpr.Logic
- All Implemented Interfaces:
ILanguage,ILogic,INode,IPos.IPosable
- Direct Known Subclasses:
Logic
- Enclosing class:
SMTExpr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<IExpr.IKeyword, IExpr.IAttribute<?>> The logic's attributes — last occurrence wins for duplicate keywordsprotected List<IExpr.IAttribute<?>> All logic attributes in source order, preserving duplicatesprotected IExpr.ISymbolThe name of the logicprotected final SMT.ConfigurationThe configuration this logic instance is scoped to; see issue #22.Fields inherited from class org.smtlib.impl.Pos.Posable
pos -
Constructor Summary
ConstructorsConstructorDescriptionLogic(SMT.Configuration smtConfig, IExpr.ISymbol name, Collection<IExpr.IAttribute<?>> attributes) Creates a logic -
Method Summary
Modifier and TypeMethodDescription<T> TThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }List<IExpr.IAttribute<?>> The attributes in source order, including repeated keywordsThe attributes, as a Map, keyed by the keyword in the attributevoidcheckFcnDeclaration(IExpr.IIdentifier id, List<ISort> argSorts, ISort resultSort, IExpr definition) Checks whether the given function declaration is permitted in the language, throwing an exception if notvoidcheckSortDeclaration(IExpr.IIdentifier id, List<ISort.IParameter> params, ISort expr) Checks whether the given sort declaration is permitted in the language, throwing an exception if notThe name of the logicvoidvalidExpression(IExpr expr) Checks whether the given expression is permitted in the language, throwing an exception if notvalue(IExpr.IKeyword keyword) The value of a given attributeMethods inherited from class org.smtlib.impl.Pos.Printable
toStringMethods inherited from class org.smtlib.impl.Pos.Posable
equals, hashCode, pos, setPos
-
Field Details
-
smtConfig
The configuration this logic instance is scoped to; see issue #22. -
logicName
The name of the logic -
attributes
The logic's attributes — last occurrence wins for duplicate keywords -
attributesList
All logic attributes in source order, preserving duplicates
-
-
Constructor Details
-
Logic
public Logic(SMT.Configuration smtConfig, IExpr.ISymbol name, Collection<IExpr.IAttribute<?>> attributes) Creates a logic
-
-
Method Details
-
logicName
The name of the logic -
attributes
The attributes, as a Map, keyed by the keyword in the attribute- Specified by:
attributesin interfaceILogic
-
attributeList
Description copied from interface:ILogicThe attributes in source order, including repeated keywords- Specified by:
attributeListin interfaceILogic
-
value
The value of a given attribute -
validExpression
Description copied from interface:ILanguageChecks whether the given expression is permitted in the language, throwing an exception if not- Specified by:
validExpressionin interfaceILanguage- Throws:
IVisitor.VisitorException
-
checkFcnDeclaration
public void checkFcnDeclaration(IExpr.IIdentifier id, List<ISort> argSorts, ISort resultSort, IExpr definition) throws IVisitor.VisitorException Description copied from interface:ILanguageChecks whether the given function declaration is permitted in the language, throwing an exception if not- Specified by:
checkFcnDeclarationin interfaceILanguage- Throws:
IVisitor.VisitorException
-
checkSortDeclaration
public void checkSortDeclaration(IExpr.IIdentifier id, List<ISort.IParameter> params, ISort expr) throws IVisitor.VisitorException Description copied from interface:ILanguageChecks whether the given sort declaration is permitted in the language, throwing an exception if not- Specified by:
checkSortDeclarationin interfaceILanguage- Throws:
IVisitor.VisitorException
-
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
-