Class Constant

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

public class Constant extends Object implements Term
A zero-ary function symbol (i.e., a constant in Datalog).
  • Method Details

    • create

      public static Constant create(String name)
      Returns a constant with the given string identifier.
      Parameters:
      name - the string identifier
      Returns:
      the constant
    • 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
    • applySubst

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