All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class kl1.lang.KL1Machine

java.lang.Object
   |
   +----kl1.lang.KL1Machine

public class KL1Machine
extends Object
implements Runnable
This class represents an environment.

Author:
Satoshi KURAMOCHI

Variable Index

 o command_argv
 o copied_susp
 o current_prio
current priority
 o current_queue
queue for current priority
 o DEBUGLIB
 o DIST
 o finished
 o goal_queue_tail
 o heaplimit
copy of real_heaplimit or 0
 o higher_priority_goal
 o HIGHESTPRIO
 o interrupt_off
 o interrupt_qp
 o maxactiveratio
 o MAXGENERICARGS
 o MAXKLICINT
 o MAXSTDARGS
 o MAXSUSPENSION
 o MINKLICINT
 o module_builtin
 o module_farith
 o module_generic
 o module_iarith
 o module_uterms
 o my_node
 o node_wtc
 o prioq
 o PRIOQRECBULK
 o queue_empty_pred
 o real_heaplimit
 o reasons
suspension reasons
 o rest_of_stream
 o resumed_goals
spontaneous goals during reduction
 o resumes
 o shoen_wtc
 o suspension_reason
 o suspensions
 o top_prio
highest priority with ready goal
 o topsucceed_pred
 o total_node
 o UNIFYDEBUG
 o wait_penum_preds

Constructor Index

 o KL1Machine()
Constructs an environment.
 o KL1Machine(String, String, int, KL1Object[])
Constructs an environment with a specified goal.
 o KL1Machine(String[])
Constructs an environment.

Method Index

 o add_3(KL1Object, KL1Object)
 o addhook(Hook, Hook)
 o and_3(KL1Object, KL1Object)
 o builtin_compare_terms(KL1Object, KL1Object)
 o check_stack_for_alternatively(int)
 o complement_2(KL1Object)
 o debug_print(String)
 o divide_3(KL1Object, KL1Object)
 o enqueue_after_waiting(Goalrec, KL1Object, Goalrec, boolean)
 o enqueue_goal(Goalrec, int, Goalrec)
Enqueues a goal.
 o enqueue_resumed_goals(Goalrec)
 o enqueue_throw_goal(KL1Object, Goalrec, Goalrec)
 o enqueue_unify_goal(KL1Object, KL1Object)
 o enqueue_unify_terms(KL1Object, KL1Object)
Enqueues an unify goal.
 o exclusive_or_3(KL1Object, KL1Object)
 o fatal(String)
Handles a fatal error.
 o feof(Object)
 o fopen(GString, String)
 o get_top_priority_queue()
 o get_wtc()
Obtains a WTC.
 o interrupt_goal(KL1Object[], Predicate, int)
 o klic_fread(byte[], InputStream)
 o klic_fwrite(String, PrintStream)
 o klic_getc(InputStream)
 o klic_interrupt(Goalrec)
 o klic_putc(int, PrintStream)
 o load_module(String)
Loads a specified module.
 o load_module(String, boolean)
Loads a specified module.
 o locate_predicate_in_module(String, String, int)
 o makenewsusp(Var, Susprec)
 o minus_2(KL1Object)
 o modulo_3(KL1Object, KL1Object)
 o multiply_3(KL1Object, KL1Object)
 o or_3(KL1Object, KL1Object)
 o plus_2(KL1Object)
 o print(String)
 o printl(KL1Object)
 o put_priority_queue(Goalrec, int)
 o resume_goals(KL1Object, KL1Object)
 o resume_same_prio(Goalrec)
 o return_wtc(WTC)
Returns a WTC.
 o run()
 o send_unify(WTC, KL1Object, KL1Object)
Sends an unification message.
 o shift_left_3(KL1Object, KL1Object)
 o shift_right_3(KL1Object, KL1Object)
 o subtract_3(KL1Object, KL1Object)
 o suspend_goal(Goalrec, Var)
 o topmost()

Variables

 o DIST
 static final boolean DIST
 o UNIFYDEBUG
 static final boolean UNIFYDEBUG
 o DEBUGLIB
 static final boolean DEBUGLIB
 o heaplimit
 public int heaplimit
copy of real_heaplimit or 0

 o current_queue
 public Goalrec current_queue
queue for current priority

 o resumed_goals
 Goalrec resumed_goals
spontaneous goals during reduction

 o current_prio
 public int current_prio
current priority

 o top_prio
 int top_prio
highest priority with ready goal

 o prioq
 Prioqrec prioq
 o real_heaplimit
 final int real_heaplimit
 o maxactiveratio
 double maxactiveratio
 o interrupt_off
 int interrupt_off
 o interrupt_qp
 Goalrec interrupt_qp
 o my_node
 int my_node
 o total_node
 int total_node
 o command_argv
 String command_argv[]
 o suspensions
 int suspensions
 o resumes
 int resumes
 o copied_susp
 int copied_susp
 o reasons
 public Var reasons[]
suspension reasons

 o higher_priority_goal
 boolean higher_priority_goal
 o suspension_reason
 KL1Object suspension_reason
 o rest_of_stream
 KL1Object rest_of_stream
 o shoen_wtc
 WTC shoen_wtc
 o node_wtc
 WTC node_wtc
 o MAXSUSPENSION
 static final int MAXSUSPENSION
 o MAXSTDARGS
 static final int MAXSTDARGS
 o MAXGENERICARGS
 static final int MAXGENERICARGS
 o MAXKLICINT
 static final int MAXKLICINT
 o MINKLICINT
 static final int MINKLICINT
 o HIGHESTPRIO
 static final int HIGHESTPRIO
 o PRIOQRECBULK
 static final int PRIOQRECBULK
 o finished
 boolean finished
 o module_builtin
 public final Module_builtin module_builtin
 o module_generic
 public final Module_generic module_generic
 o module_iarith
 public final Module_integer_arithmetics module_iarith
 o module_uterms
 public final Module_unify_term_dcode module_uterms
 o module_farith
 public final Module_floating_arithmetics module_farith
 o queue_empty_pred
 final Predicate queue_empty_pred
 o topsucceed_pred
 final Predicate topsucceed_pred
 o goal_queue_tail
 Goalrec goal_queue_tail
 o wait_penum_preds
 Predicate wait_penum_preds[]

Constructors

 o KL1Machine
 public KL1Machine()
Constructs an environment.

 o KL1Machine
 public KL1Machine(String argv[])
Constructs an environment.

Parameters:
argv - arguments.
 o KL1Machine
 public KL1Machine(String module,
                   String pred,
                   int arity,
                   KL1Object args[])
Constructs an environment with a specified goal.

Parameters:
module - the module where the predicate is defined.
pred - the name of the predicate.
arity - the arity of the predicate.
args - the argument.

Methods

 o run
 public void run()
 o load_module
 public Module load_module(String name)
Loads a specified module.

Parameters:
name - the name of the module.
Returns:
the loaded module.
 o load_module
 public Module load_module(String name,
                           boolean quiet)
Loads a specified module.

Parameters:
name - the name of the module.
Returns:
the loaded module.
 o topmost
 void topmost()
 o enqueue_throw_goal
 public Goalrec enqueue_throw_goal(KL1Object penum,
                                   Goalrec gp,
                                   Goalrec qp)
 o enqueue_goal
 public Goalrec enqueue_goal(Goalrec qp,
                             int prio,
                             Goalrec gp)
Enqueues a goal.

 o enqueue_after_waiting
 public Goalrec enqueue_after_waiting(Goalrec qp,
                                      KL1Object prio,
                                      Goalrec gp,
                                      boolean is_relative)
 o get_top_priority_queue
 Goalrec get_top_priority_queue()
 o put_priority_queue
 void put_priority_queue(Goalrec qp,
                         int prio)
 o enqueue_resumed_goals
 Goalrec enqueue_resumed_goals(Goalrec qp)
 o klic_interrupt
 public void klic_interrupt(Goalrec qp)
 o makenewsusp
 final void makenewsusp(Var var,
                        Susprec srec)
 o addhook
 final void addhook(Hook oldhook,
                    Hook newhook)
 o suspend_goal
 public void suspend_goal(Goalrec goal,
                          Var reason)
 o interrupt_goal
 public final void interrupt_goal(KL1Object args[],
                                  Predicate pred,
                                  int reasonp)
 o check_stack_for_alternatively
 public final boolean check_stack_for_alternatively(int reasonp)
 o enqueue_unify_terms
 public final void enqueue_unify_terms(KL1Object x,
                                       KL1Object y)
Enqueues an unify goal.

 o enqueue_unify_goal
 final void enqueue_unify_goal(KL1Object x,
                               KL1Object y)
 o resume_same_prio
 final void resume_same_prio(Goalrec gp)
 o resume_goals
 final void resume_goals(KL1Object x,
                         KL1Object y)
 o print
 public static final void print(String s)
 o printl
 public static final void printl(KL1Object x)
 o debug_print
 public static final void debug_print(String s)
 o fatal
 public final void fatal(String s)
Handles a fatal error.

Parameters:
s - a message to be printed.
 o fopen
 public GObject fopen(GString path_,
                      String mode)
 o klic_putc
 public void klic_putc(int c,
                       PrintStream out)
 o klic_getc
 public int klic_getc(InputStream in)
 o klic_fread
 public int klic_fread(byte b[],
                       InputStream in)
 o klic_fwrite
 public int klic_fwrite(String s,
                        PrintStream out)
 o feof
 public boolean feof(Object s)
 o builtin_compare_terms
 public KL1Object builtin_compare_terms(KL1Object x,
                                        KL1Object y)
 o add_3
 public KL1Object add_3(KL1Object x,
                        KL1Object y)
 o subtract_3
 public KL1Object subtract_3(KL1Object x,
                             KL1Object y)
 o multiply_3
 public KL1Object multiply_3(KL1Object x,
                             KL1Object y)
 o divide_3
 public KL1Object divide_3(KL1Object x,
                           KL1Object y)
 o modulo_3
 public KL1Object modulo_3(KL1Object x,
                           KL1Object y)
 o and_3
 public KL1Object and_3(KL1Object x,
                        KL1Object y)
 o or_3
 public KL1Object or_3(KL1Object x,
                       KL1Object y)
 o exclusive_or_3
 public KL1Object exclusive_or_3(KL1Object x,
                                 KL1Object y)
 o shift_right_3
 public KL1Object shift_right_3(KL1Object x,
                                KL1Object y)
 o shift_left_3
 public KL1Object shift_left_3(KL1Object x,
                               KL1Object y)
 o plus_2
 public KL1Object plus_2(KL1Object x)
 o minus_2
 public KL1Object minus_2(KL1Object x)
 o complement_2
 public KL1Object complement_2(KL1Object x)
 o locate_predicate_in_module
 Predicate locate_predicate_in_module(String mname,
                                      String pname,
                                      int arity)
 o get_wtc
 public WTC get_wtc()
Obtains a WTC.

 o send_unify
 public void send_unify(WTC wtc,
                        KL1Object x,
                        KL1Object y)
Sends an unification message.

 o return_wtc
 public void return_wtc(WTC wtc)
Returns a WTC.


All Packages  Class Hierarchy  This Package  Previous  Next  Index