Package io.github.cvc5
Class Grammar
- java.lang.Object
-
- io.github.cvc5.Grammar
-
public class Grammar extends java.lang.ObjectA Sygus Grammar. This class can be used to define a context-free grammar of terms. Its interface coincides with the definition of grammars (GrammarDef) in the SyGuS IF 2.1 standard.
-
-
Field Summary
Fields Modifier and Type Field Description protected longpointer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAnyConstant(Term ntSymbol)AllowntSymbolto be an arbitrary constant.voidaddAnyVariable(Term ntSymbol)AllowntSymbolto be any input variable to correspondingsynth-funorsynth-invwith the same sort asntSymbol.voidaddRule(Term ntSymbol, Term rule)Addruleto the set of rules corresponding tontSymbol.voidaddRules(long pointer, long ntSymbolPointer, long[] rulePointers)voidaddRules(Term ntSymbol, Term[] rules)Addrulesto the set of rules corresponding tontSymbol.voiddeletePointer()protected voiddeletePointer(long pointer)longgetPointer()java.lang.StringtoString()protected java.lang.StringtoString(long pointer)
-
-
-
Constructor Detail
-
Grammar
public Grammar(Grammar grammar)
-
-
Method Detail
-
deletePointer
protected void deletePointer(long pointer)
-
addRule
public void addRule(Term ntSymbol, Term rule)
Addruleto the set of rules corresponding tontSymbol.- Parameters:
ntSymbol- the non-terminal to which the rule is added.rule- the rule to add.
-
addRules
public void addRules(Term ntSymbol, Term[] rules)
Addrulesto the set of rules corresponding tontSymbol.- Parameters:
ntSymbol- the non-terminal to which the rules are added.rules- the rules to add.
-
addRules
public void addRules(long pointer, long ntSymbolPointer, long[] rulePointers)
-
addAnyConstant
public void addAnyConstant(Term ntSymbol)
AllowntSymbolto be an arbitrary constant.- Parameters:
ntSymbol- the non-terminal allowed to be any constant.
-
addAnyVariable
public void addAnyVariable(Term ntSymbol)
AllowntSymbolto be any input variable to correspondingsynth-funorsynth-invwith the same sort asntSymbol.- Parameters:
ntSymbol- the non-terminal allowed to be any input constant.
-
toString
protected java.lang.String toString(long pointer)
- Returns:
- A String representation of this grammar.
-
getPointer
public long getPointer()
-
deletePointer
public void deletePointer()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-