Interface Relation

All Known Subinterfaces:
Fact, Rule
All Known Implementing Classes:
AFact, ARelation, ARule

public interface Relation
A prolog relation between arguments. Examples:

foo(1, 2).

bar(X, Y) :- foo(X, 1), Y = X.

&c.

  • Method Summary

    Modifier and Type Method Description
    List<org.antlr.v4.runtime.tree.ParseTree> args()
    The arguments of the relation
    int arity()
    How many arguments the relation takes
    Optional<Comment> comment()
    The Comment, if available
    String name()
    The name of the relation
  • Method Details

    • name

      String name()
      The name of the relation
    • args

      List<org.antlr.v4.runtime.tree.ParseTree> args()
      The arguments of the relation
    • arity

      int arity()
      How many arguments the relation takes

      Should be equivalent to args().size()

    • comment

      Optional<Comment> comment()
      The Comment, if available