Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

alice.tuprolog
Class Library  view Library download Library.java

java.lang.Object
  extended byalice.tuprolog.Library
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CoreLibrary

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

this abstract class is the base class for developing tuProlog built-in libraries, which can be dynamically loaded by prolog objects.

each library can expose to engine:

typically theory is assigned in library constructor


Field Summary
(package private)  PrologVM engine
          prolog core which loaded the library
protected  java.lang.String theory
          theory provided by the library
 
Constructor Summary
Library()
           
 
Method Summary
 void dismiss()
          method invoked by prolog engine when library is going to be removed
 PrologVM getEngine()
           
(package private)  java.lang.String[] getFunctors()
          used by core engine to retrieve built-in functors
(package private)  java.lang.String[] getPredicates()
          used by core engine to retrieve built-in predicates
 Term getRenamedCopy(Term t0)
          gets a copy of a term with variables renamed.
 java.lang.String getTheory()
           
 void onSolveBegin(Term goal)
          method invoked when the engine is going to demonstrate a goal
 void onSolveEnd()
          method invoked when the engine has finished a demostration
 void setEngine(PrologVM e)
           
 boolean unify(Term t0, Term t1)
          unification of two terms
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

engine

PrologVM engine
prolog core which loaded the library


theory

protected java.lang.String theory
theory provided by the library

Constructor Detail

Library

public Library()
Method Detail

unify

public final boolean unify(Term t0,
                           Term t1)
unification of two terms


getRenamedCopy

public final Term getRenamedCopy(Term t0)
gets a copy of a term with variables renamed.


getTheory

public final java.lang.String getTheory()

getPredicates

final java.lang.String[] getPredicates()
used by core engine to retrieve built-in predicates


getFunctors

final java.lang.String[] getFunctors()
used by core engine to retrieve built-in functors


dismiss

public void dismiss()
method invoked by prolog engine when library is going to be removed


onSolveBegin

public void onSolveBegin(Term goal)
method invoked when the engine is going to demonstrate a goal


onSolveEnd

public void onSolveEnd()
method invoked when the engine has finished a demostration


setEngine

public final void setEngine(PrologVM e)

getEngine

public final PrologVM getEngine()