GNU Prolog for Java

gnu.prolog.vm.interpreter
Class Predicate_call

java.lang.Object
  extended by gnu.prolog.vm.ExecuteOnlyCode
      extended by gnu.prolog.vm.interpreter.Predicate_call
All Implemented Interfaces:
Installable, PrologCode

public class Predicate_call
extends ExecuteOnlyCode

prolog code


Nested Class Summary
static class Predicate_call.CallTermBacktrackInfo
          call term backtrack info
 
Field Summary
static AtomTerm headFunctor
          head functor, it is completly unimportant what it is
static Term[] termArrayType
          term arry constant
 
Fields inherited from interface gnu.prolog.vm.PrologCode
FAIL, HALT, SUCCESS, SUCCESS_LAST
 
Constructor Summary
Predicate_call()
           
 
Method Summary
 int execute(Interpreter interpreter, boolean backtrackMode, Term[] args)
          this method is used for execution of code
static Term getClause(Term term, Map<Term,VariableTerm> argumentsToArgumentVariables)
          convert callable term to clause
static int staticExecute(Interpreter interpreter, boolean backtrackMode, Term arg)
          this method is used for execution of code
 
Methods inherited from class gnu.prolog.vm.ExecuteOnlyCode
install, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

headFunctor

public static final AtomTerm headFunctor
head functor, it is completly unimportant what it is


termArrayType

public static final Term[] termArrayType
term arry constant

Constructor Detail

Predicate_call

public Predicate_call()
Method Detail

execute

public int execute(Interpreter interpreter,
                   boolean backtrackMode,
                   Term[] args)
            throws PrologException
Description copied from interface: PrologCode
this method is used for execution of code

Specified by:
execute in interface PrologCode
Specified by:
execute in class ExecuteOnlyCode
Parameters:
interpreter - interpreter in which context code is executed
backtrackMode - true if predicate is called on backtracking and false otherwise
args - arguments of code
Returns:
either SUCCESS, SUCCESS_LAST, or FAIL.
Throws:
PrologException

staticExecute

public static int staticExecute(Interpreter interpreter,
                                boolean backtrackMode,
                                Term arg)
                         throws PrologException
this method is used for execution of code

Parameters:
interpreter - interpreter in which context code is executed
backtrackMode - true if predicate is called on backtracking and false otherwise
arg - argument of code
Returns:
either SUCCESS, SUCCESS_LAST, or FAIL.
Throws:
PrologException

getClause

public static Term getClause(Term term,
                             Map<Term,VariableTerm> argumentsToArgumentVariables)
convert callable term to clause

Parameters:
term -
argumentsToArgumentVariables -
Returns:

GNU Prolog for Java