Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GNU Prolog for Java
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.prolog.term
Class TermUtils

    java.lang.Object
      gnu.prolog.term.TermUtils

    public class TermUtils

extends Object

Static utility functions for operating on `Terms`

Method Summary
`static Term` | `getExistentialVariableSet(Term term, Set<Term> set)` get existential variable set
`static Term` | `getFreeVariableSet(Term term1, Term term2, Set<Term> set)` get free variables of term1 with respect to term2
`static void` | `getVariableSet(Term term, Set<Term> set)` get variable set
`static Term` | `getWitness(Set<Term> set)` get witness of variable set, now just list of variables
`static boolean` | `isVariant(Term term1, Term term2)` Check if one term is variant of another
`protected static boolean` | `isVariant(Term term1, Term term2, Map<Term,Term> map)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isVariant

    public static boolean isVariant(Term term1,
                                    Term term2)

  Check if one term is variant of another

  Parameters:
    `term1` -
    `term2` -
  Returns:
    whether one term is the variant of another

### isVariant

    protected static boolean isVariant(Term term1,
                                       Term term2,
                                       Map<Term,Term> map)

### getVariableSet

    public static void getVariableSet(Term term,
                                      Set<Term> set)

  get variable set

  Parameters:
    `term` -
    `set` -

### getExistentialVariableSet

    public static Term getExistentialVariableSet(Term term,
                                                 Set<Term> set)

  get existential variable set

  Parameters:
    `term` -
    `set` -
  Returns:
    the existential variable set

### getFreeVariableSet

    public static Term getFreeVariableSet(Term term1,
                                          Term term2,
                                          Set<Term> set)

  get free variables of term1 with respect to term2

  Parameters:
    `term1` -
    `term2` -
    `set` -
  Returns:
    term1 w/o existential specifiers

### getWitness

    public static Term getWitness(Set<Term> set)

  get witness of variable set, now just list of variables

  Parameters:
    `set` -
  Returns:
    the witness for the variable set

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| GNU Prolog for Java
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD