Class Variable

java.lang.Object
edu.harvard.seas.pl.abcdatalog.ast.Variable
All Implemented Interfaces:
Term

public class Variable extends Object implements Term
A Datalog variable.
  • Constructor Details

    • Variable

      protected Variable(String name)
      Constructs a variable from an identifier.
      Parameters:
      name - identifier
  • Method Details

    • create

      public static Variable create(String name)
      Returns a variable with the given string identifier.
      Parameters:
      name - the string identifier
      Returns:
      the variable
    • getName

      public String getName()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • accept

      public <I, O> O accept(TermVisitor<I,O> visitor, I state)
      Specified by:
      accept in interface Term
    • createFreshVariable

      public static Variable createFreshVariable()
    • applySubst

      public Term applySubst(Substitution subst)
      Specified by:
      applySubst in interface Term