Prolog Cafe v1.2

jp.ac.kobe_u.cs.prolog.lang
Class Predicate

java.lang.Object
  extended by jp.ac.kobe_u.cs.prolog.lang.Predicate
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BlockPredicate, Failure, JavaPredicate, Success

public abstract class Predicate
extends java.lang.Object
implements java.io.Serializable

The superclass of classes for predicates. The subclasses of Predicate must override the exec and arity methods.

See Also:
Serialized Form

Field Summary
 Predicate cont
          Holds a continuation goal
 
Constructor Summary
Predicate()
           
 
Method Summary
abstract  int arity()
          Returns the arity of this predicate.
abstract  Predicate exec(Prolog engine)
          Executes this predicate and returns a continuation goal.
 void setArgument(Term[] args, Predicate cont)
          Sets the specified arguments and continuation goal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cont

public Predicate cont
Holds a continuation goal

Constructor Detail

Predicate

public Predicate()
Method Detail

exec

public abstract Predicate exec(Prolog engine)
                        throws PrologException
Executes this predicate and returns a continuation goal.

Parameters:
engine - current Prolog engine
Throws:
PrologException - if a Prolog exception is raised.
See Also:
Prolog

arity

public abstract int arity()
Returns the arity of this predicate.


setArgument

public void setArgument(Term[] args,
                        Predicate cont)
Sets the specified arguments and continuation goal.


Prolog Cafe v1.2

Copyright (C) 1997-2008 M.BANBARA and N.TAMURA