alice.tuprolog.lib
Class BasicLibrary

java.lang.Object
  extended by alice.tuprolog.Library
      extended by alice.tuprolog.lib.BasicLibrary
All Implemented Interfaces:
IPrimitives, java.io.Serializable

public class BasicLibrary
extends Library

This class defines a set of basic built-in predicates for the tuProlog engine Library/Theory dependency: none

See Also:
Serialized Form

Field Summary
 
Fields inherited from class alice.tuprolog.Library
engine
 
Constructor Summary
BasicLibrary()
           
 
Method Summary
 boolean $s_next0_3(Term witness, Term wtList, Term sNext)
           
 boolean $wt_unify_3(Term witness, Term wtList, Term tList)
           
 boolean add_theory_1(Term th)
          adds a new theory provided as a text
 boolean agent_1(Term th)
          spawns a separate prolog agent providing it a theory text
 boolean agent_2(Term th, Term g)
          spawns a separate prolog agent providing it a theory text and a goal
 boolean atom_1(Term t)
           
 boolean atomic_1(Term t)
           
 boolean compound_1(Term t)
           
 boolean constant_1(Term t)
           
 Term expression_bitwise_and_2(Term arg0, Term arg1)
           
 Term expression_bitwise_not_1(Term arg0)
           
 Term expression_bitwise_or_2(Term arg0, Term arg1)
           
 Term expression_bitwise_shift_left_2(Term arg0, Term arg1)
           
 Term expression_bitwise_shift_right_2(Term arg0, Term arg1)
           
 Term expression_div_2(Term arg0, Term arg1)
           
 boolean expression_equality_2(Term arg0, Term arg1)
           
 boolean expression_greater_or_equal_than_2(Term arg0, Term arg1)
           
 boolean expression_greater_than_2(Term arg0, Term arg1)
           
 Term expression_integer_div_2(Term arg0, Term arg1)
           
 boolean expression_less_or_equal_than_2(Term arg0, Term arg1)
           
 boolean expression_less_than_2(Term arg0, Term arg1)
           
 Term expression_minus_1(Term arg1)
           
 Term expression_minus_2(Term arg0, Term arg1)
           
 Term expression_multiply_2(Term arg0, Term arg1)
           
 Term expression_plus_1(Term arg0)
           
 Term expression_plus_2(Term arg0, Term arg1)
           
 Term expression_pow_2(Term arg0, Term arg1)
           
 boolean float_1(Term t)
           
 boolean get_operators_list_1(Term argument)
           
 boolean get_theory_1(Term arg)
          gets current theory text
 java.lang.String[][] getSynonymMap()
          Defines some synonyms
 java.lang.String getTheory()
          Gets the theory provided with the library Empty theory is provided by default.
 boolean ground_1(Term t)
           
 boolean integer_1(Term t)
           
 boolean iterated_goal_term_2(Term term, Term goal)
           
 boolean list_1(Term t)
           
 boolean load_library_2(Term className, Term libName)
           
 boolean load_library_from_theory_2(Term th, Term libName)
          Loads a library constructed from a theory.
 boolean nonvar_1(Term t)
           
 boolean nospy_0()
           
 boolean nowarning_0()
           
 boolean num_atom_2(Term arg0, Term arg1)
           
 boolean number_1(Term t)
           
 boolean set_theory_1(Term th)
          sets a new theory provided as a text
 boolean spy_0()
           
 boolean term_equality_2(Term arg0, Term arg1)
           
 boolean term_greater_than_2(Term arg0, Term arg1)
           
 boolean term_less_than_2(Term arg0, Term arg1)
           
 boolean text_concat_3(Term source1, Term source2, Term dest)
           
 boolean text_term_2(Term arg0, Term arg1)
          bidirectional text/term conversion.
 boolean var_1(Term t)
           
 boolean warning_0()
           
 
Methods inherited from class alice.tuprolog.Library
dismiss, evalExpression, getEngine, getName, getPrimitives, match, onSolveBegin, onSolveEnd, unify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicLibrary

public BasicLibrary()
Method Detail

set_theory_1

public boolean set_theory_1(Term th)
sets a new theory provided as a text


add_theory_1

public boolean add_theory_1(Term th)
adds a new theory provided as a text


get_theory_1

public boolean get_theory_1(Term arg)
gets current theory text


load_library_2

public boolean load_library_2(Term className,
                              Term libName)

load_library_from_theory_2

public boolean load_library_from_theory_2(Term th,
                                          Term libName)
Loads a library constructed from a theory.

Parameters:
theory - theory text
libName - name of the library
Returns:
true if the library has been succesfully loaded.

get_operators_list_1

public boolean get_operators_list_1(Term argument)

agent_1

public boolean agent_1(Term th)
spawns a separate prolog agent providing it a theory text


agent_2

public boolean agent_2(Term th,
                       Term g)
spawns a separate prolog agent providing it a theory text and a goal


spy_0

public boolean spy_0()

nospy_0

public boolean nospy_0()

warning_0

public boolean warning_0()

nowarning_0

public boolean nowarning_0()

constant_1

public boolean constant_1(Term t)

number_1

public boolean number_1(Term t)

integer_1

public boolean integer_1(Term t)

float_1

public boolean float_1(Term t)

atom_1

public boolean atom_1(Term t)

compound_1

public boolean compound_1(Term t)

list_1

public boolean list_1(Term t)

var_1

public boolean var_1(Term t)

nonvar_1

public boolean nonvar_1(Term t)

atomic_1

public boolean atomic_1(Term t)

ground_1

public boolean ground_1(Term t)

expression_equality_2

public boolean expression_equality_2(Term arg0,
                                     Term arg1)

expression_greater_than_2

public boolean expression_greater_than_2(Term arg0,
                                         Term arg1)

expression_less_or_equal_than_2

public boolean expression_less_or_equal_than_2(Term arg0,
                                               Term arg1)

expression_less_than_2

public boolean expression_less_than_2(Term arg0,
                                      Term arg1)

expression_greater_or_equal_than_2

public boolean expression_greater_or_equal_than_2(Term arg0,
                                                  Term arg1)

term_equality_2

public boolean term_equality_2(Term arg0,
                               Term arg1)

term_greater_than_2

public boolean term_greater_than_2(Term arg0,
                                   Term arg1)

term_less_than_2

public boolean term_less_than_2(Term arg0,
                                Term arg1)

expression_plus_1

public Term expression_plus_1(Term arg0)

expression_minus_1

public Term expression_minus_1(Term arg1)

expression_bitwise_not_1

public Term expression_bitwise_not_1(Term arg0)

expression_plus_2

public Term expression_plus_2(Term arg0,
                              Term arg1)

expression_minus_2

public Term expression_minus_2(Term arg0,
                               Term arg1)

expression_multiply_2

public Term expression_multiply_2(Term arg0,
                                  Term arg1)

expression_div_2

public Term expression_div_2(Term arg0,
                             Term arg1)

expression_integer_div_2

public Term expression_integer_div_2(Term arg0,
                                     Term arg1)

expression_pow_2

public Term expression_pow_2(Term arg0,
                             Term arg1)

expression_bitwise_shift_right_2

public Term expression_bitwise_shift_right_2(Term arg0,
                                             Term arg1)

expression_bitwise_shift_left_2

public Term expression_bitwise_shift_left_2(Term arg0,
                                            Term arg1)

expression_bitwise_and_2

public Term expression_bitwise_and_2(Term arg0,
                                     Term arg1)

expression_bitwise_or_2

public Term expression_bitwise_or_2(Term arg0,
                                    Term arg1)

text_term_2

public boolean text_term_2(Term arg0,
                           Term arg1)
bidirectional text/term conversion.


text_concat_3

public boolean text_concat_3(Term source1,
                             Term source2,
                             Term dest)

num_atom_2

public boolean num_atom_2(Term arg0,
                          Term arg1)

getTheory

public java.lang.String getTheory()
Description copied from class: Library
Gets the theory provided with the library Empty theory is provided by default.

Overrides:
getTheory in class Library

$wt_unify_3

public boolean $wt_unify_3(Term witness,
                           Term wtList,
                           Term tList)

$s_next0_3

public boolean $s_next0_3(Term witness,
                          Term wtList,
                          Term sNext)

iterated_goal_term_2

public boolean iterated_goal_term_2(Term term,
                                    Term goal)

getSynonymMap

public java.lang.String[][] getSynonymMap()
Defines some synonyms

Overrides:
getSynonymMap in class Library