proof.term
Class Var

java.lang.Object
  |
  +--proof.term.Var
All Implemented Interfaces:
java.io.Serializable, Term
Direct Known Subclasses:
Context

public class Var
extends java.lang.Object
implements Term

A variable term.

See Also:
Serialized Form

Field Summary
 java.lang.String name
          The name of the variable.
 
Constructor Summary
Var()
          Constructor for variables without a specific name.
Var(java.lang.String name)
          Constructor.
 
Method Summary
 boolean alphaEquals(Term x)
          Compares this term to another term, up to variable renaming.
 Term headReduceOnce()
          This variable doesn't have a value yet, so don't do anything to reduce it.
 Term substitute(Var y, Term s)
          Substitute into this term.
 java.lang.String toString()
          Convert this term to a String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the variable. This will basically be for debugging purposes.
Constructor Detail

Var

public Var(java.lang.String name)
Constructor.

Var

public Var()
Constructor for variables without a specific name. These won't print out properly. FIXME
Method Detail

substitute

public Term substitute(Var y,
                       Term s)
Substitute into this term. Note that we compare object references, not the name; the variable name is just there for debugging.
Specified by:
substitute in interface Term
See Also:
Object.equals

headReduceOnce

public Term headReduceOnce()
This variable doesn't have a value yet, so don't do anything to reduce it.
Specified by:
headReduceOnce in interface Term
Following copied from interface: proof.term.Term
Returns:
this term, reduced once

alphaEquals

public boolean alphaEquals(Term x)
Description copied from interface: Term
Compares this term to another term, up to variable renaming.
Specified by:
alphaEquals in interface Term
Following copied from interface: proof.term.Term
Parameters:
t - the term to compare this to
Returns:
true iff this and t are equal (ignoring the names of variables)

toString

public java.lang.String toString()
Convert this term to a String.
Specified by:
toString in interface Term
Overrides:
toString in class java.lang.Object