Kernel Prolog with Fluent based Builtins

tarau.jinni
Class SourceLoop

java.lang.Object
  |
  +--tarau.jinni.Term
        |
        +--tarau.jinni.Nonvar
              |
              +--tarau.jinni.SystemObject
                    |
                    +--tarau.jinni.Fluent
                          |
                          +--tarau.jinni.Source
                                |
                                +--tarau.jinni.SourceLoop

class SourceLoop
extends Source

An Infinite Source. If based on a finite Source, it moves to its the first element after reaching its last element. A SourceLoop returns 'no' if the original Source is empty. In case the original Source is infinite, a SourceLoop will return the same elements as the original Source. (In particular, this happens if the original Source is also a Source loop).


Field Summary
private  int i
           
(package private)  Source s
           
private  java.util.Vector v
           
 
Fields inherited from class tarau.jinni.Fluent
persistent
 
Fields inherited from class tarau.jinni.SystemObject
ctr, ordinal
 
Fields inherited from class tarau.jinni.Term
CONST, INT, JAVA, REAL, VAR
 
Constructor Summary
(package private) SourceLoop(Source s, Prog p)
           
 
Method Summary
 Term getElement()
           
private  Term getMemoized()
           
 void stop()
           
 
Methods inherited from class tarau.jinni.Source
toFun, toList
 
Methods inherited from class tarau.jinni.Fluent
getPersistent, setPersistent, trailMe, undo
 
Methods inherited from class tarau.jinni.SystemObject
bind_to, getArity, name, toString
 
Methods inherited from class tarau.jinni.Nonvar
eq, listify, unify_to
 
Methods inherited from class tarau.jinni.Term
action, charsToString, copy, exec, exec, fromString, getKey, isBuiltin, isClause, matches, matching_copy, numbervars, pprint, pprint, reaction, ref, stringToChars, toChars, toClause, token, toObject, toTerm, toUnquoted, unify, varsOf
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

v

private java.util.Vector v

s

Source s

i

private int i
Constructor Detail

SourceLoop

SourceLoop(Source s,
           Prog p)
Method Detail

getMemoized

private final Term getMemoized()

getElement

public Term getElement()
Overrides:
getElement in class Source

stop

public void stop()
Overrides:
stop in class Fluent

Kernel Prolog with Fluent based Builtins