Package org.smtlib.impl
Class SMTExpr.Pattern
java.lang.Object
org.smtlib.impl.Pos.Posable
org.smtlib.impl.Pos.Printable
org.smtlib.impl.SMTExpr.Pattern
- All Implemented Interfaces:
IExpr.IPattern,INode,IPos.IPosable
- Enclosing class:
SMTExpr
Represents a match pattern: a constructor name applied to zero or more variable symbols.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IExpr.ISymbolprotected booleanWhether the pattern was written as (c), in parentheses with no variablesprotected List<IExpr.ISymbol> Fields inherited from class org.smtlib.impl.Pos.Posable
pos -
Constructor Summary
ConstructorsConstructorDescriptionPattern(IExpr.ISymbol constructor, List<IExpr.ISymbol> params) Creates a pattern from the given constructor symbol and variable list.Pattern(IExpr.ISymbol constructor, List<IExpr.ISymbol> params, boolean parenthesized) Creates a pattern that is written in parentheses even if it has no variables, as (c) -
Method Summary
Modifier and TypeMethodDescription<T> TThe accept method corresponding to IVisitor, to be implemented in each subclass as { return v.visit(this); }params()booleanTrue if written in parentheses; (c), with no variables, is not SMT-LIB but is parsed (with an error) so that type checking reports it as wellMethods inherited from class org.smtlib.impl.Pos.Printable
toStringMethods inherited from class org.smtlib.impl.Pos.Posable
equals, hashCode, 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
-
constructor
-
params
-
emptyParentheses
protected boolean emptyParenthesesWhether the pattern was written as (c), in parentheses with no variables
-
-
Constructor Details
-
Pattern
Creates a pattern from the given constructor symbol and variable list. -
Pattern
Creates a pattern that is written in parentheses even if it has no variables, as (c)
-
-
Method Details
-
constructor
- Specified by:
constructorin interfaceIExpr.IPattern
-
params
- Specified by:
paramsin interfaceIExpr.IPattern
-
parenthesized
public boolean parenthesized()Description copied from interface:IExpr.IPatternTrue if written in parentheses; (c), with no variables, is not SMT-LIB but is parsed (with an error) so that type checking reports it as well- Specified by:
parenthesizedin interfaceIExpr.IPattern
-
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
-