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
-
command_argv
-
-
copied_susp
-
-
current_prio
- current priority
-
current_queue
- queue for current priority
-
DEBUGLIB
-
-
DIST
-
-
finished
-
-
goal_queue_tail
-
-
heaplimit
- copy of real_heaplimit or 0
-
higher_priority_goal
-
-
HIGHESTPRIO
-
-
interrupt_off
-
-
interrupt_qp
-
-
maxactiveratio
-
-
MAXGENERICARGS
-
-
MAXKLICINT
-
-
MAXSTDARGS
-
-
MAXSUSPENSION
-
-
MINKLICINT
-
-
module_builtin
-
-
module_farith
-
-
module_generic
-
-
module_iarith
-
-
module_uterms
-
-
my_node
-
-
node_wtc
-
-
prioq
-
-
PRIOQRECBULK
-
-
queue_empty_pred
-
-
real_heaplimit
-
-
reasons
- suspension reasons
-
rest_of_stream
-
-
resumed_goals
- spontaneous goals during reduction
-
resumes
-
-
shoen_wtc
-
-
suspension_reason
-
-
suspensions
-
-
top_prio
- highest priority with ready goal
-
topsucceed_pred
-
-
total_node
-
-
UNIFYDEBUG
-
-
wait_penum_preds
-
-
KL1Machine()
- Constructs an environment.
-
KL1Machine(String, String, int, KL1Object[])
- Constructs an environment with a specified goal.
-
KL1Machine(String[])
- Constructs an environment.
-
add_3(KL1Object, KL1Object)
-
-
addhook(Hook, Hook)
-
-
and_3(KL1Object, KL1Object)
-
-
builtin_compare_terms(KL1Object, KL1Object)
-
-
check_stack_for_alternatively(int)
-
-
complement_2(KL1Object)
-
-
debug_print(String)
-
-
divide_3(KL1Object, KL1Object)
-
-
enqueue_after_waiting(Goalrec, KL1Object, Goalrec, boolean)
-
-
enqueue_goal(Goalrec, int, Goalrec)
- Enqueues a goal.
-
enqueue_resumed_goals(Goalrec)
-
-
enqueue_throw_goal(KL1Object, Goalrec, Goalrec)
-
-
enqueue_unify_goal(KL1Object, KL1Object)
-
-
enqueue_unify_terms(KL1Object, KL1Object)
- Enqueues an unify goal.
-
exclusive_or_3(KL1Object, KL1Object)
-
-
fatal(String)
- Handles a fatal error.
-
feof(Object)
-
-
fopen(GString, String)
-
-
get_top_priority_queue()
-
-
get_wtc()
- Obtains a WTC.
-
interrupt_goal(KL1Object[], Predicate, int)
-
-
klic_fread(byte[], InputStream)
-
-
klic_fwrite(String, PrintStream)
-
-
klic_getc(InputStream)
-
-
klic_interrupt(Goalrec)
-
-
klic_putc(int, PrintStream)
-
-
load_module(String)
- Loads a specified module.
-
load_module(String, boolean)
- Loads a specified module.
-
locate_predicate_in_module(String, String, int)
-
-
makenewsusp(Var, Susprec)
-
-
minus_2(KL1Object)
-
-
modulo_3(KL1Object, KL1Object)
-
-
multiply_3(KL1Object, KL1Object)
-
-
or_3(KL1Object, KL1Object)
-
-
plus_2(KL1Object)
-
-
print(String)
-
-
printl(KL1Object)
-
-
put_priority_queue(Goalrec, int)
-
-
resume_goals(KL1Object, KL1Object)
-
-
resume_same_prio(Goalrec)
-
-
return_wtc(WTC)
- Returns a WTC.
-
run()
-
-
send_unify(WTC, KL1Object, KL1Object)
- Sends an unification message.
-
shift_left_3(KL1Object, KL1Object)
-
-
shift_right_3(KL1Object, KL1Object)
-
-
subtract_3(KL1Object, KL1Object)
-
-
suspend_goal(Goalrec, Var)
-
-
topmost()
-
DIST
static final boolean DIST
UNIFYDEBUG
static final boolean UNIFYDEBUG
DEBUGLIB
static final boolean DEBUGLIB
heaplimit
public int heaplimit
- copy of real_heaplimit or 0
current_queue
public Goalrec current_queue
- queue for current priority
resumed_goals
Goalrec resumed_goals
- spontaneous goals during reduction
current_prio
public int current_prio
- current priority
top_prio
int top_prio
- highest priority with ready goal
prioq
Prioqrec prioq
real_heaplimit
final int real_heaplimit
maxactiveratio
double maxactiveratio
interrupt_off
int interrupt_off
interrupt_qp
Goalrec interrupt_qp
my_node
int my_node
total_node
int total_node
command_argv
String command_argv[]
suspensions
int suspensions
resumes
int resumes
copied_susp
int copied_susp
reasons
public Var reasons[]
- suspension reasons
higher_priority_goal
boolean higher_priority_goal
suspension_reason
KL1Object suspension_reason
rest_of_stream
KL1Object rest_of_stream
shoen_wtc
WTC shoen_wtc
node_wtc
WTC node_wtc
MAXSUSPENSION
static final int MAXSUSPENSION
MAXSTDARGS
static final int MAXSTDARGS
MAXGENERICARGS
static final int MAXGENERICARGS
MAXKLICINT
static final int MAXKLICINT
MINKLICINT
static final int MINKLICINT
HIGHESTPRIO
static final int HIGHESTPRIO
PRIOQRECBULK
static final int PRIOQRECBULK
finished
boolean finished
module_builtin
public final Module_builtin module_builtin
module_generic
public final Module_generic module_generic
module_iarith
public final Module_integer_arithmetics module_iarith
module_uterms
public final Module_unify_term_dcode module_uterms
module_farith
public final Module_floating_arithmetics module_farith
queue_empty_pred
final Predicate queue_empty_pred
topsucceed_pred
final Predicate topsucceed_pred
goal_queue_tail
Goalrec goal_queue_tail
wait_penum_preds
Predicate wait_penum_preds[]
KL1Machine
public KL1Machine()
- Constructs an environment.
KL1Machine
public KL1Machine(String argv[])
- Constructs an environment.
- Parameters:
- argv - arguments.
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.
run
public void run()
load_module
public Module load_module(String name)
- Loads a specified module.
- Parameters:
- name - the name of the module.
- Returns:
- the loaded module.
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.
topmost
void topmost()
enqueue_throw_goal
public Goalrec enqueue_throw_goal(KL1Object penum,
Goalrec gp,
Goalrec qp)
enqueue_goal
public Goalrec enqueue_goal(Goalrec qp,
int prio,
Goalrec gp)
- Enqueues a goal.
enqueue_after_waiting
public Goalrec enqueue_after_waiting(Goalrec qp,
KL1Object prio,
Goalrec gp,
boolean is_relative)
get_top_priority_queue
Goalrec get_top_priority_queue()
put_priority_queue
void put_priority_queue(Goalrec qp,
int prio)
enqueue_resumed_goals
Goalrec enqueue_resumed_goals(Goalrec qp)
klic_interrupt
public void klic_interrupt(Goalrec qp)
makenewsusp
final void makenewsusp(Var var,
Susprec srec)
addhook
final void addhook(Hook oldhook,
Hook newhook)
suspend_goal
public void suspend_goal(Goalrec goal,
Var reason)
interrupt_goal
public final void interrupt_goal(KL1Object args[],
Predicate pred,
int reasonp)
check_stack_for_alternatively
public final boolean check_stack_for_alternatively(int reasonp)
enqueue_unify_terms
public final void enqueue_unify_terms(KL1Object x,
KL1Object y)
- Enqueues an unify goal.
enqueue_unify_goal
final void enqueue_unify_goal(KL1Object x,
KL1Object y)
resume_same_prio
final void resume_same_prio(Goalrec gp)
resume_goals
final void resume_goals(KL1Object x,
KL1Object y)
print
public static final void print(String s)
printl
public static final void printl(KL1Object x)
debug_print
public static final void debug_print(String s)
fatal
public final void fatal(String s)
- Handles a fatal error.
- Parameters:
- s - a message to be printed.
fopen
public GObject fopen(GString path_,
String mode)
klic_putc
public void klic_putc(int c,
PrintStream out)
klic_getc
public int klic_getc(InputStream in)
klic_fread
public int klic_fread(byte b[],
InputStream in)
klic_fwrite
public int klic_fwrite(String s,
PrintStream out)
feof
public boolean feof(Object s)
builtin_compare_terms
public KL1Object builtin_compare_terms(KL1Object x,
KL1Object y)
add_3
public KL1Object add_3(KL1Object x,
KL1Object y)
subtract_3
public KL1Object subtract_3(KL1Object x,
KL1Object y)
multiply_3
public KL1Object multiply_3(KL1Object x,
KL1Object y)
divide_3
public KL1Object divide_3(KL1Object x,
KL1Object y)
modulo_3
public KL1Object modulo_3(KL1Object x,
KL1Object y)
and_3
public KL1Object and_3(KL1Object x,
KL1Object y)
or_3
public KL1Object or_3(KL1Object x,
KL1Object y)
exclusive_or_3
public KL1Object exclusive_or_3(KL1Object x,
KL1Object y)
shift_right_3
public KL1Object shift_right_3(KL1Object x,
KL1Object y)
shift_left_3
public KL1Object shift_left_3(KL1Object x,
KL1Object y)
plus_2
public KL1Object plus_2(KL1Object x)
minus_2
public KL1Object minus_2(KL1Object x)
complement_2
public KL1Object complement_2(KL1Object x)
locate_predicate_in_module
Predicate locate_predicate_in_module(String mname,
String pname,
int arity)
get_wtc
public WTC get_wtc()
- Obtains a WTC.
send_unify
public void send_unify(WTC wtc,
KL1Object x,
KL1Object y)
- Sends an unification message.
return_wtc
public void return_wtc(WTC wtc)
- Returns a WTC.
All Packages Class Hierarchy This Package Previous Next Index