Kernel Prolog with Fluent based Builtins

Uses of Class
tarau.jinni.Term

Packages that use Term
tarau.jinni   
tarau.jinnigui   
 

Uses of Term in tarau.jinni
 

Subclasses of Term in tarau.jinni
(package private)  class answer_source
          When called as answer_source(X,G,R), it builds a new clause and maps it to an AnswerSource LD-resolution interpreter which will return one answer at a time of the form "the(X)" using G as initial resolvent and "no" when no more answers are available.
(package private)  class arg
          arg(I,Term,X) unifies X with the I-the argument of functor T
(package private)  class at_key
          collects all matching terms in a (possibly empty) list
(package private)  class barToken
           
(package private)  class char_file_writer
          opens a writer which puts characters to a file one by one
(package private)  class CharReader
          Builds Jinni Fluents from Java Streams
(package private)  class chars_to_name
          converts a name to a list of chars
(package private)  class CharWriter
          Writer
 class Clause
          Datatype for a Prolog clause (H:-B) having a head H and a body b
(package private)  class clause_file_writer
          opens a writer which puts characters to a file one by one
(package private)  class ClauseReader
          Builds Jinni Fluents from Java Streams
(package private)  class ClauseWriter
          Writer
(package private)  class collect
          Collects a reference to or the content of a Sink
(package private)  class commaToken
           
(package private)  class compute
          Performs simple arithmetic operations like compute('+',1,2,Result)
 class Conj
           
 class Cons
          List Constructor.
 class Const
          Symbolic constant, of arity 0.
 class ConstBuiltin
          Template for builtins of arity 0
(package private)  class constToken
           
(package private)  class consult
          consults a file of clauses while adding clauses to existing predicate definitions
(package private)  class Copier
          Term Copier agent.
(package private)  class ctime
          returns the real time spent up to now
(package private)  class db_add
          Puts a term on the local blackboard
(package private)  class db_collect
          collects all matching terms in a (possibly empty) list
(package private)  class db_remove
          removes a matching term if available, fails otherwise
(package private)  class db_source
          Maps a DataBase to a Source enumerating its elements
(package private)  class db_to_string
          lists all the local blackboard to a string (Linda terms + clauses)
(package private)  class def
          def(Var,Val) Initializes a Multi_Variable Var to a value Val.
(package private)  class discharge
          Flushes to a Sink the content of a Source Fluent
(package private)  class eocToken
           
(package private)  class eofToken
           
(package private)  class fail_
          Always fails
(package private)  class file_char_reader
          opens a reader returning the content of a file char by char
(package private)  class file_clause_reader
          opens a reader returning clauses from a file
 class Fluent
          A Fluent is a Jinni Object which has its own state, subject to changes over time.
 class Fun
          Implements compound terms
 class FunBuiltin
          Template for builtins of arity >0
(package private)  class funToken
           
(package private)  class get
          generic Source advancement step, similar to an iterator's nextElement operation, gets one element from the Source
(package private)  class get_arity
          gets an arity for any term: n>0 for f(A1,...,An) 0 for a constant like a -1 for a variable like X -2 for an integer like 13 -3 for real like 3.14 -4 for a wrapped JavaObject;
(package private)  class get_default_db
          gets default database
(package private)  class get_persistent
          Gets the yes/no persistentcy value of a Fluent.
(package private)  class get_stdin
          get the standard output (a reader)
(package private)  class get_stdout
          get standard output (a writer)
(package private)  class halt
          does its best to halt the program:-) to be thoroughly tested with Applets
(package private)  class iffToken
           
 class Int
           
(package private)  class integer_source
          Creates an Integer Source which advances at most Fuel (infinite if Fule==0) Steps computing each time x:= a*x+b.
(package private)  class IntegerSource
          creates a source of integers based on x=a*x+b formula
(package private)  class intToken
           
(package private)  class is_builtin
          checks if something is a builtin
 class JavaObject
          A JavaObject is a Jinni SystemObject with a val slot which containing a wrapped Java object
(package private)  class JavaSource
          Builds Jinni Iterators from Java Sequences and Iterator type classes
(package private)  class lazy_head
          returns the first element of a lazy list
(package private)  class lazy_tail
          returns the tail if a lazy list after making it grow, if possible
 class LazyList
          Lazy List: produces Cons-like sequences, based on a Source.
(package private)  class lbraToken
           
(package private)  class list_source
          maps a List to a Source
(package private)  class ListSource
          Builds an iterator from a list
(package private)  class lparToken
           
(package private)  class merge_sources
          Merges all Sources contained in a List into one Source.
(package private)  class MultiVar
          Varable-like entity, with a multiple values, in stack order.
(package private)  class name_to_chars
          converts a name to a list of chars
(package private)  class new_db
          creates new database
(package private)  class new_fun
          new_fun(F,N,T) creates a term T based on functor F with arity N and new free varables as arguments
 class Nil
          Special constant terminating a list
 class Nonvar
          Part of the Prolog Term hierarchy
 class Num
          Abstract numeric class, part of the Term hierarchy
(package private)  class numbervars
          returns a copy of a Term with variables uniformly replaced with constants
(package private)  class pred_to_string
          Returns a representation of predicate as a string constant
 class Prog
          Basic toplevel Prolog Engine.
(package private)  class PseudoVar
          Special constants, used to Name variables
(package private)  class put
          generic Sink advancement step, sends one element to the Sink
(package private)  class rbraToken
           
 class Real
          Part of the Term hierarchy, implementing double float point numbers.
(package private)  class realToken
           
(package private)  class reconsult
          reconsults a file of clauses while overwriting old predicate definitions
(package private)  class reconsult_again
          shorthand for reconsulting the last file
(package private)  class rparToken
           
(package private)  class set
          set(Var,Val) Sets a Multi_Variable Var to a value Val.
(package private)  class set_max_answers
          sets max answer counter for toplevel query if == 0, it will prompt the user for more answers if > 0 it will not print more than IO.maxAnswers if < 0 it will print them out all
(package private)  class set_persistent
          set_persistent(Fluent,yes) makes a Fluent persistent - i.e.
(package private)  class set_trace
          controls trace levels for debugging
 class Sink
           
 class Source
           
(package private)  class source_lazy_list
          Converts Source into a Lazy List which will memorize its elements as it grows.
(package private)  class source_list
          Explores a finite iterator and return its successive values as a list.
(package private)  class source_loop
          Builds a Looping Source from a Source.
(package private)  class source_term
          Builds a Source from a Term
(package private)  class SourceLoop
          An Infinite Source.
(package private)  class SourceMerger
          Merges a List of Sources into a new Source which (fairly) iterates over them breadth first.
(package private)  class split_source
          Splits a (finite) Source in two new ones which inherit the current state of the parent.
(package private)  class stack_dump
          Dumps the current Java Stack
(package private)  class stop
          frees a Fluent's resources and ensures it cannot produce/consume any new values
(package private)  class string_char_reader
          Creates a char reader from a String.
(package private)  class string_clause_reader
          Creates a clause reader from a String.
(package private)  class StringSink
          Builds Jinni Fluents from Java Streams
(package private)  class stringToken
           
(package private)  class system
          Calls an external program
(package private)  class SystemObject
          A SystemObject is a Jinni Nonvar with system assigned name
(package private)  class term_collector
          Builds a TermCollector Sink which accumulates Terms with put/1 and the return them with collect/1
(package private)  class term_source
          maps a Term to a Source
(package private)  class term_string_collector
          Builds a StringSink which concatenates String representations of Terms with put/1 and the return their concatenation with collect/1
(package private)  class TermCollector
          Builds Jinni Fluents from Java Streams
(package private)  class TermSource
          Maps a Term to an Source for iterating over its arguments
(package private)  class Token
           
(package private)  class true_
          Always succeeds
(package private)  class Unfolder
          For a given clause g= A0:-,A1,A2...,An, used as resolvent iterates over its possible unfoldings (LD-resolution steps) with clauses of the form B0:-B1,...,Bm in the default database.
(package private)  class unfolder_source
          Builds a new clause H:-B and maps it to an iterator
(package private)  class val
          val(Var,Val) gets the value Val of Multi_Variable Var.
 class Var
          Part of the Term hierarchy implmenting logical variables.
(package private)  class VarNumberer
          Used in implementing uniform replacement of variables with new constants.
(package private)  class varToken
           
 

Fields in tarau.jinni declared as Term
(package private)  Term[] Fun.args
           
protected  Term Var.val
           
 

Methods in tarau.jinni that return Term
protected  Term Term.ref()
          Dereferences if necessary.
(package private)  Term Term.token()
           
(package private)  Term Term.toTerm()
           
static Term Term.fromString(java.lang.String s)
           
 Term Term.matching_copy(Term that)
          Returns a copy of the result if the unification of this and that.
(package private)  Term Term.reaction(Term agent)
          Defines the reaction to an agent recursing over the structure of a term.
(package private)  Term Term.action(Term that)
          Identity action.
 Term Term.copy()
          Returns a copy of a term with variables standardized apart (`fresh variables').
 Term Term.varsOf()
          Returns '[]'(V1,V2,..Vn) where Vi is a variable occuring in this Term
 Term Term.numbervars()
          Replaces variables with uppercase constants named `V1', 'V2', etc.
 Term Sink.collect()
           
 Term TermCollector.collect()
           
abstract  Term Source.getElement()
           
(package private)  Term Source.toFun()
           
 Term CharReader.getElement()
           
 Term Fun.getArg(int i)
           
(package private)  Term Fun.token()
           
(package private)  Term Fun.reaction(Term that)
           
 Term Cons.getHead()
           
 Term Cons.getTail()
           
static Term Conj.getHead(Term T)
           
static Term Conj.getTail(Term T)
           
 Term Prog.getElement()
           
static Term Prog.firstSolution(Term X, Term G)
          Computes a copy of the first solution X of Goal G.
static Term Prog.ask_engine(Prog p)
           
static Term Init.askJinni(Term Answer, Term Body)
          Asks Jinni a query Answer, Goal and returns the first solution of the form "the(Answer)" or the constant "no" if no solution exists
static Term Init.askJinni(Term Goal)
          Asks Jinni a query Goal and returns the first solution of the form "the(Answer)" , where Answer is an instance of Goal or the constant "no" if no solution exists
 Term JavaSource.getElement()
           
 Term Unfolder.getElement()
          Returns a new clause by unfolding the goal with a matching clause in the database, or null if no such clause exists.
 Term TermSource.getElement()
           
private  Term BlackBoard.pick(java.lang.String k)
          Removes the first Term having key k or the first enumerated key if k is null
protected  Term BlackBoard.take(java.lang.String k, Term pattern)
          Removes the first matching Term or Clause from the blackboard, to be used by Linda in/1 operation in PrologBlackBoard
 Term ClauseReader.getElement()
           
 Term StringSink.collect()
           
 Term IntegerSource.getElement()
           
 Term DataBase.cin(java.lang.String k, Term pattern)
          Removes a matching Term from the blackboards and signals failure if no such term is found.
 Term DataBase.out(java.lang.String k, Term pattern, boolean copying)
          Adds a Term to the blackboard
 Term DataBase.out(java.lang.String key, Term pattern)
          Adds a copy of a Term to the blackboard
private  Term DataBase.all1(int max, Term FXs)
           
private  Term DataBase.all2(int max, java.lang.String k, Term FXs)
           
 Term DataBase.all(java.lang.String k, Term FX)
          Returns a (possibly empty) list of matching Term objects
(package private)  Term Copier.action(Term place)
          This action only defines what happens here (at this place ).
(package private) static Term Copier.toFun(Const c, java.util.Enumeration e)
          Converts a reified Enumeration to functor based on name of Const c and args being the elements of the Enumeration.
(package private)  Term Copier.getMyVars(Term that)
           
protected static Term Lexer.make_const(java.lang.String s)
           
private static Term Lexer.make_fun(java.lang.String s)
           
private static Term Lexer.make_int(double n)
           
private static Term Lexer.make_real(double n)
           
private static Term Lexer.make_number(double nval)
           
private  Term Lexer.make_var(java.lang.String s)
           
private  Term Lexer.getWord(boolean quoted)
           
protected  Term Lexer.next()
           
private  Term Parser.getConjCont(Term curr)
           
protected  Term Parser.getTerm(Term n)
           
protected  Term Parser.getTerm()
           
private  Term[] Parser.getArgs()
           
private  Term Parser.getList()
           
private  Term Parser.getListCont(Term curr)
           
 Term Clause.toTerm()
          Converts a clause to a term.
 Term Clause.getHead()
          Extracts the head of a clause (a Term).
 Term Clause.getBody()
          Extracts the body of a clause
(package private)  Term Clause.getFirst()
          Gets the leftmost (first) goal in the body of a clause, i.e.
(package private)  Term Clause.getRest()
          Gets all but the leftmost goal in the body of a clause, i.e.
(package private) static Term Clause.appendConj(Term x, Term y)
          Concatenates 2 Conjunctions
 Term LazyList.getTail()
          Advances the tail of a lazy list.
 Term SourceMerger.getElement()
           
private  Term SourceLoop.getMemoized()
           
 Term SourceLoop.getElement()
           
(package private)  Term VarNumberer.action(Term place)
           
 Term MultiVar.val()
           
protected  Term Var.ref()
           
(package private)  Term Var.reaction(Term agent)
           
 

Methods in tarau.jinni with parameters of type Term
(package private) abstract  boolean Term.bind_to(Term that, Trail trail)
           
(package private) abstract  boolean Term.unify_to(Term that, Trail trail)
          Unify dereferenced
protected  boolean Term.unify(Term that, Trail trail)
          Dereference and unify_to
(package private) abstract  boolean Term.eq(Term that)
           
 boolean Term.matches(Term that)
          Tests if this term unifies with that.
 Term Term.matching_copy(Term that)
          Returns a copy of the result if the unification of this and that.
(package private)  Term Term.reaction(Term agent)
          Defines the reaction to an agent recursing over the structure of a term.
(package private)  Term Term.action(Term that)
          Identity action.
(package private)  boolean Nonvar.bind_to(Term that, Trail trail)
           
(package private)  boolean Nonvar.unify_to(Term that, Trail trail)
           
(package private)  boolean Nonvar.eq(Term that)
           
(package private)  boolean SystemObject.bind_to(Term that, Trail trail)
           
abstract  int Sink.putElement(Term T)
           
 int TermCollector.putElement(Term T)
           
static Const Const.the(Term X)
           
(package private)  boolean Const.bind_to(Term that, Trail trail)
           
 boolean Const.eq(Term that)
           
 void Fun.setArg(int i, Term T)
           
 int Fun.putArg(int i, Term T, Prog p)
           
protected static java.lang.String Fun.watchNull(Term x)
           
(package private)  boolean Fun.bind_to(Term that, Trail trail)
           
(package private)  boolean Fun.unify_to(Term that, Trail trail)
           
(package private)  Term Fun.reaction(Term that)
           
static Term Conj.getHead(Term T)
           
static Term Conj.getTail(Term T)
           
static Term Prog.firstSolution(Term X, Term G)
          Computes a copy of the first solution X of Goal G.
static Prog Prog.new_engine(Term X, Term G)
           
static Term Init.askJinni(Term Answer, Term Body)
          Asks Jinni a query Answer, Goal and returns the first solution of the form "the(Answer)" or the constant "no" if no solution exists
static Term Init.askJinni(Term Goal)
          Asks Jinni a query Goal and returns the first solution of the form "the(Answer)" , where Answer is an instance of Goal or the constant "no" if no solution exists
(package private)  void Unfolder.trace_nomatch(Term first)
          Tracer for undefined predicates
 int CharWriter.putElement(Term t)
           
 int ClauseWriter.putElement(Term t)
           
protected  Term BlackBoard.take(java.lang.String k, Term pattern)
          Removes the first matching Term or Clause from the blackboard, to be used by Linda in/1 operation in PrologBlackBoard
protected  void BlackBoard.add(java.lang.String k, Term value)
          Adds a Term or Clause to the the blackboard, to be used by Linda out/1 operation
 int StringSink.putElement(Term t)
           
(package private)  boolean Real.bind_to(Term that, Trail trail)
           
 Term DataBase.cin(java.lang.String k, Term pattern)
          Removes a matching Term from the blackboards and signals failure if no such term is found.
 Term DataBase.out(java.lang.String k, Term pattern, boolean copying)
          Adds a Term to the blackboard
 Term DataBase.out(java.lang.String key, Term pattern)
          Adds a copy of a Term to the blackboard
private  void DataBase.all0(int max, java.util.Vector To, java.lang.String k, Term FXs)
           
private  Term DataBase.all1(int max, Term FXs)
           
private  Term DataBase.all2(int max, java.lang.String k, Term FXs)
           
 Term DataBase.all(java.lang.String k, Term FX)
          Returns a (possibly empty) list of matching Term objects
(package private)  Term Copier.action(Term place)
          This action only defines what happens here (at this place ).
(package private)  Term Copier.getMyVars(Term that)
           
protected static Clause Parser.toClause(Term T, HashDict dict)
           
private  Term Parser.getConjCont(Term curr)
           
protected  Term Parser.getTerm(Term n)
           
private  Term Parser.getListCont(Term curr)
           
(package private) static Term Clause.appendConj(Term x, Term y)
          Concatenates 2 Conjunctions
(package private)  boolean Int.bind_to(Term that, Trail trail)
           
(package private)  boolean LazyList.bind_to(Term that, Trail trail)
          this permissive definition for bind_to allows a Lazy List to Unify with any 2 arg constructor chain
(package private)  Term VarNumberer.action(Term place)
           
(package private)  void MultiVar.set(Term T, Prog p)
           
(package private)  boolean Var.bind_to(Term x, Trail trail)
           
(package private)  boolean Var.unify_to(Term that, Trail trail)
           
(package private)  boolean Var.eq(Term x)
           
(package private)  Term Var.reaction(Term agent)
           
 

Constructors in tarau.jinni with parameters of type Term
CharReader.CharReader(Term t, Prog p)
           
Fun.Fun(java.lang.String s, Term x0)
           
Fun.Fun(java.lang.String s, Term x0, Term x1)
           
Fun.Fun(java.lang.String s, Term x0, Term x1, Term x2)
           
Fun.Fun(java.lang.String s, Term x0, Term x1, Term x2, Term x3)
           
Cons.Cons(java.lang.String cons, Term x0, Term x1)
           
Cons.Cons(Term x0, Term x1)
           
Conj.Conj(Term x0, Term x1)
           
ClauseReader.ClauseReader(Term t, Prog p)
          parses from a string representation of a term
ParserException.ParserException(java.lang.String e, java.lang.String f, Term n)
           
Clause.Clause(Term head, Term body)
          Builds a clause given ith head and its body
LazyList.LazyList(Term head, Source source, Trail trail)
           
MultiVar.MultiVar(Term T, Prog p)
           
 

Uses of Term in tarau.jinnigui
 

Subclasses of Term in tarau.jinnigui
(package private)  class add_text
          add_text
(package private)  class add_to
          add_to(Container,What,Where) adds component What at a place Where.
(package private)  class clear_text
          add_text
(package private)  class destroy
           
(package private)  class dialog
          dialog(Query,X,Y,Answer): ask a question and collects trhe answer through a modal dialog in a window at X,Y
(package private)  class draw
           
(package private)  class file_dialog
           
(package private)  class get_applet
          detects if applet and gets applet container
(package private)  class get_text
          get_text(JinniText,Answer): collects the cpntent of thext area to new constant Answer
(package private)  class move
           
(package private)  class new_button
          new_button(JinniContainer,Name,Action,Button): creates a Button with label Name and attaches to it an action Action
(package private)  class new_canvas
           
(package private)  class new_color
           
(package private)  class new_console
           
(package private)  class new_frame
           
(package private)  class new_image
           
(package private)  class new_label
           
(package private)  class new_panel
           
(package private)  class new_text
          new(ParentContainer,oldText,JavaObject): initialises a textArea with oldText and returns a handle to it ARGS: 1=Parent Container 2=initial text content 3=rows 4=cols 5=returned handles
(package private)  class remove_all
           
(package private)  class remove_from
           
(package private)  class resize
           
(package private)  class set_bg
           
(package private)  class set_color
           
(package private)  class set_fg
           
(package private)  class set_label
           
(package private)  class set_layout
           
(package private)  class show
           
 

Fields in tarau.jinnigui declared as Term
private  Term JinniButton.action
           
 

Methods in tarau.jinnigui with parameters of type Term
(package private) static java.awt.LayoutManager GuiBuiltins.to_layout(Term L)
           
 

Constructors in tarau.jinnigui with parameters of type Term
JinniButton.JinniButton(java.lang.String name, Term action)
           
 


Kernel Prolog with Fluent based Builtins