Class TermVar

This represents a variable term. A new variable can be created by the constructor. The varia-ble will have already reference count one, but the display will be marked as fresh, so that the automatic reference counting can decrement later.

The serial number can be retrieved via getValue(). If the interpreter is null then the local index is returned. If the interpreter is non-null then if necessary a new serial number is created and this serial number is returned.

A variable can be dereferenced by the method deref(). Dereferencing an uninstantiated variable yields the variable itself. Dereferencing a variable that is bound recursively dereferences the bound term. The method variant derefWrapped() returns a wrapped result.

package jekpro.tools.term;

public final class TermVar extends AbstractTerm {
public TermVar();
public int getValue(Interpreter inter);

public int hashCode();
public boolean equals(Object o);

    public Object deref();
    public AbstractTerm derefWrapped();
}

Kommentare