Class ARuleInvocation
java.lang.Object
edu.unc.cs.comp524.parsers.prolog.ARuleInvocation
- All Implemented Interfaces:
RuleInvocation
public class ARuleInvocation extends Object implements RuleInvocation
The default concrete
RuleInvocation implementation.-
Constructor Summary
Constructors Constructor Description ARuleInvocation(Fact f)ARuleInvocation(PrologParser.AtomContext atom, PrologParser.TermlistContext termlist)Constructor for use withPrologParser-related objects.ARuleInvocation(String name, List<org.antlr.v4.runtime.tree.ParseTree> args) -
Method Summary
Modifier and Type Method Description List<org.antlr.v4.runtime.tree.ParseTree>args()The arguments of the relation being invokedintarity()The arity of the relation being invokedbooleanisInvocationOf(Relation r)Implementation-defined.booleanisInvocationOf(String name, int arity)Implementation-defined.Stringname()The name of the relation being invokedStringtoString()A JSON-like debugging-aidStringrepresentation.
-
Constructor Details
-
ARuleInvocation
Constructor for use withPrologParser-related objects. -
ARuleInvocation
-
ARuleInvocation
-
-
Method Details
-
name
Description copied from interface:RuleInvocationThe name of the relation being invoked- Specified by:
namein interfaceRuleInvocation
-
args
Description copied from interface:RuleInvocationThe arguments of the relation being invoked- Specified by:
argsin interfaceRuleInvocation
-
arity
public int arity()Description copied from interface:RuleInvocationThe arity of the relation being invokedShould be equivalent to
args().size()- Specified by:
arityin interfaceRuleInvocation
-
isInvocationOf
Description copied from interface:RuleInvocationImplementation-defined.The default implementation is true iff the names and arity are equivalent.
- Specified by:
isInvocationOfin interfaceRuleInvocation
-
isInvocationOf
Description copied from interface:RuleInvocationImplementation-defined.The default implementation is true iff the names and arity are equivalent.
- Specified by:
isInvocationOfin interfaceRuleInvocation
-
toString
A JSON-like debugging-aidStringrepresentation.
-