Prolog Cafe v1.2

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

java.lang.Object
  extended by jp.ac.kobe_u.cs.prolog.lang.Predicate
      extended by jp.ac.kobe_u.cs.prolog.lang.Success
All Implemented Interfaces:
java.io.Serializable

public class Success
extends Predicate

Initial continuation goal.
That is to say, this Success will be executed every time the Prolog Cafe system finds an answer.

See Also:
Serialized Form

Field Summary
 PrologControl c
          Prolog thread that this Success belongs to.
 
Fields inherited from class jp.ac.kobe_u.cs.prolog.lang.Predicate
cont
 
Constructor Summary
Success()
          Constructs a new initial continuation goal.
Success(PrologControl c)
          Constructs a new initial continuation goal with given Prolog thread.
 
Method Summary
 int arity()
          Returns 0.
 Predicate exec(Prolog engine)
          Backtracks and returns a next clause after invoking the PrologControl.success().
 java.lang.String toString()
          Returns a string representation of this Success.
 
Methods inherited from class jp.ac.kobe_u.cs.prolog.lang.Predicate
setArgument
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

c

public PrologControl c
Prolog thread that this Success belongs to.

Constructor Detail

Success

public Success()
Constructs a new initial continuation goal.


Success

public Success(PrologControl c)
Constructs a new initial continuation goal with given Prolog thread.

Method Detail

exec

public Predicate exec(Prolog engine)
Backtracks and returns a next clause after invoking the PrologControl.success().

Specified by:
exec in class Predicate
Parameters:
engine - Prolog engine
See Also:
PrologControl.success()

toString

public java.lang.String toString()
Returns a string representation of this Success.

Overrides:
toString in class java.lang.Object

arity

public int arity()
Returns 0.

Specified by:
arity in class Predicate

Prolog Cafe v1.2

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