202 Errorline(
"the built-in %T '%s' may not be redefined.\n",
233 Errorline(
"the %T '%s' may not be redefined from within module %s.\n",
239 Errorline(
"the %T '%s' may not be redefined as a %T.\n",
267 Syntaxerrorline(
"body missing in definition of %T '%P'.\n", typ, head);
322 if (
equ_tok((*t),
"block_struct"))
351 (void)times(&start_time);
647 alternative->
aaaa_1=aaaa_6;
648 alternative->
bbbb_1=bbbb_6;
649 alternative->
cccc_1=cccc_6;
670 #define RESTORE_TIME_STAMP global_time_stamp=\
671 choice_stack?choice_stack->time_stamp:INIT_TIME_STAMP;
697 while ((
unsigned long)
undo_stack>(
unsigned long)limit) {
740 Errorline(
"undo_actions should not be called.\n");
826 while ((
unsigned long)u > (
unsigned long)cut_limit) {
859 ((
unsigned long)u->
aaaa_3==disp) && ((
unsigned long)u->
bbbb_3==wind)) {
875 ((
unsigned long)u->
aaaa_3==disp) && ((
unsigned long)u->
bbbb_3==wind)) {
1043 merge3(&((*u)->right),v);
1049 else if (*u!=
NULL) {
1106 merge(&((*u)->left),v);
1113 merge(&((*u)->right),v);
1119 else if (*u!=
NULL) {
1121 merge(&((*u)->right),v);
1124 merge(&((*u)->left),v);
1169 t = (
end_time.tms_utime - start_time.tms_utime)/60.0;
1173 if (t!=0.0) printf(
" (%0.0f/s)",
goal_count/t);
1222 traceline(
"fetching definition of %P\n",u);
1225 if (allflag || prop->
cccc_4==utype) {
1280 long checked1, checked2;
1290 traceline(
"fetching partial definition of %P\n",u);
1367 long success=
TRUE,compare;
1374 long old1stat,old2stat;
1392 if (u>v) { tmp=v; v=u; u=tmp; }
1403 Errorline(
"attempt to unify with curried function %P\n", u);
1408 Errorline(
"attempt to unify with curried function %P\n", v);
1423 success=(compare=
glb(u->
type,v->
type,&new_type,&new_code));
1441 Errorline(
"undecipherable sort code.\n");
1485 success=(r==floor(r));
1489 success=(r==floor(r));
1507 unsigned long ulen = *((
unsigned long *)u->
value_3);
1508 unsigned long vlen = *((
unsigned long *)v->
value_3);
1509 success=(ulen==vlen &&
1588 traceline(
"pushing type disjunction choice point for %P\n",u);
1603 old1stat, old2stat);
1627 printf(
"Call to disjunct_aim\nThis routine inhibited by RM: Dec 9 1992\n");
1654 if (thegoal && rule) {
1670 if ((
unsigned long)rule==
DEFRULES) {
1738 traceline(
"prove built-in %P\n", thegoal);
1742 success=
c_rule[(
unsigned long)rule]();
1764 traceline(
"alternative clause has been retracted\n");
1789 head->
coref=thegoal;
1854 traceline(
"pushing type disjunction choice point for %P\n", t);
1895 traceline(
"pushing 'retract' choice point for %P\n", head);
1900 traceline(
"pushing 'clause' choice point for %P\n", head);
1925 traceline(
"following clause had been retracted\n");
1928 else if ((
unsigned long)(*p)>0) {
1930 Errorline(
"the built-in %P cannot be retracted.\n",head);
1932 Errorline(
"the definition of built-in %P is not accessible.\n",head);
2074 long sort,cut_loc=
FALSE;
2101 if (level==0) { result=
TRUE; }
2132 for(i=1;i<=lev1;i++) { *pr=
'-'; pr++; *pr=
'-'; pr++; }
2134 sprintf(pr,
"%ld",lev2);
2157 while (c!=
EOLN && c>0 && c<=32 && c!=EOF) {
2166 else if (c==
';' || c==
'.') {
2169 }
while (c2!=
EOLN && c2!=EOF && c2>0 && c2<=32);
2186 }
else if (sort==
QUERY) {
2192 else if (sort==
FACT) {
2198 undo(save_undo_stack);
2234 long success=
TRUE,exitloop;
2238 long old_noisy,old_file_date;
2241 long old_var_occurred;
2242 int end_of_file=
FALSE;
2272 else if (sort==
FACT) {
2276 else if (sort==
QUERY) {
2296 }
while (success && !exitloop);
2300 if(end_of_file || !success) {
2534 (*p)->aaaa_2,((*p)->aaaa_2->type->type_def==(
def_type)
function_it?
"->":
":-"),(*p)->bbbb_2);
2555 if (xcount<=0 && aim->type==
prove) {
GENERIC stack_pointer
used to allocate from stack - size allocated added - adj for alignment
#define show_subwindow
To backtrack on show sub windows RM 8/12/92.
void assert_clause(ptr_psi_term t)
assert_clause
#define prove
was enum (goal) – but must be long for error.c - now typedef
void get_one_arg_addr(ptr_node t, ptr_psi_term **a)
get_one_arg_addr
long x_exist_event()
x_exist_event
long what_next_cut()
what_next_cut
void reset_stacks()
reset_stacks
#define hide_subwindow
To backtrack on hide sub windows RM 8/12/92.
void push_window(long type, long disp, long wind)
push_window
#define function_it
was enum (def_type) in extern.h now there is typedef ptr_definition
#define undef_it
was enum (def_type) in extern.h now there is typedef ptr_definition
ptr_choice_point topmost_what_next()
topmost_what_next
ptr_definition succeed
symbol in bi module
#define HEAP
Flag to indicate heap allocation.
int global_unify(ptr_psi_term u, ptr_psi_term v)
global_unify
void push2_ptr_value(type_ptr t, GENERIC *p, GENERIC v)
push2_ptr_value
#define FEATCMP
indicates to use featcmp for comparison (in trees.c)
void clear_copy()
clear_copy
GENERIC heap_pointer
used to allocate from heap - size allocated subtracted - adj for alignment
struct wl_definition * def_type
void put_back_char(long c)
put_back_char
ptr_definition lf_false
symbol in bi module
ptr_definition integer
symbol in bi module
long do_residuation_user()
do_residuation_user()
void restore_resid(ptr_resid_block rb, ptr_psi_term *match_date)
restore_resid
ptr_module user_module
Default module for user input.
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
glb
void show_count()
show_count
#define show_window
To backtrack on show window.
GENERIC mem_limit
starting point of heap - mem_base aligned
void x_show_subwindow(Display *display, long window)
x_show_subwindow
#define def_ptr
values of type_ptr
psi_term parse(long *q)
parse
char prompt_buffer[PROMPT_BUFFER]
#define TRUEMASK
Standard boolean.
void undo(ptr_stack limit)
undo
void x_hide_subwindow(Display *display, long window)
x_hide_subwindow
void reset_step()
reset_step
long unify_aim()
unify_aim
ptr_module current_module
The current module for the tokenizer.
ptr_definition cut
symbol in syntax module
void push_goal(goals t, ptr_psi_term aaaa_5, ptr_psi_term bbbb_5, GENERIC cccc_5)
push_goal
long(* c_rule[MAX_BUILT_INS])()
ptr_int_list decode(ptr_int_list c)
decode
long redefine(ptr_psi_term t)
redefine
#define general_cut
was enum (goal) – but must be long for error.c - now typedef
void deref2_rec_eval(ptr_psi_term t)
deref2_rec_eval
void fetch_def_lazy(ptr_psi_term u, ptr_definition old1, ptr_definition old2, ptr_node old1attr, ptr_node old2attr, long old1stat, long old2stat)
fetch_def_lazy
#define implies_cut
was enum (goal) – but must be long for error.c - now typedef
void x_show_window(Display *display, long window)
x_show_window
void merge_unify(ptr_node *u, ptr_node v)
merge_unify
#define XEVENTDELAY
Maximum number of goals executed between event polling.
#define predicate_it
was enum (def_type) in extern.h now there is typedef ptr_definition
void assert_rule(psi_term t, def_type typ)
assert_rule
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
matches
#define set_empty
Set constants for deref_args in lefun.c.
#define DEFRULES
Must be different from NULL, a built-in index, and a pointer Used to indicate that the rules of the d...
#define destroy_window
To backtrack on window creation.
#define CURRENT_MODULE
feature name
void deref2_eval(ptr_psi_term t)
deref2_eval
#define FACT
Fact Kind of user input.
void push_def_ptr_value(ptr_psi_term q, GENERIC *p)
push_def_ptr_value
long num_vars(ptr_node vt)
num_vars
ptr_definition call_handlersym
symbol in bi module
void assert_complicated_type(ptr_psi_term t)
assert_complicated_type
void main_prove()
main_prove
struct wl_psi_term * ptr_psi_term
quotedStackCopy
#define cut_ptr
values of type_ptr 22.9
#define REAL
Which C type to use to represent reals and integers in Wild_Life.
void type_disj_aim()
type_disj_aim
#define PROMPT
Head of prompt.
#define QUERY
Query Kind of user input.
void merge(ptr_node *u, ptr_node v)
merge
long overlap_type(ptr_definition t1, ptr_definition t2)
overlap_type
#define c_what_next
was enum (goal) – but must be long for error.c - now typedef
ptr_definition and
symbol in syntax module
ptr_resid_list resid_vars
long abort_life(int nlflag)
abort_life
#define eval
was enum (goal) – but must be long for error.c - now typedef
void stack_add_psi_attr(ptr_psi_term t, char *attrname, ptr_psi_term g)
stack_add_psi_attr
ptr_definition sys_bytedata
symbol in sys module
void release_resid(ptr_psi_term t)
release_resid
long sub_type(ptr_definition t1, ptr_definition t2)
sub_type
void traceline(char *format,...)
traceline
ptr_definition real
symbol in bi module
long num_choices()
num_choices
#define type_it
was enum (def_type) in extern.h now there is typedef ptr_definition
#define hide_window
To backtrack on hide window.
ptr_psi_term quote_copy(ptr_psi_term t, long heap_flag)
quote_copy
void Errorline(char *format,...)
Errorline.
unsigned long * GENERIC
unsigned long *GENERIC
#define MAX_LEVEL
Maximum indent level.
long clause_aim(long r)
clause_aim
void end_terminal_io()
end_terminal_io
long x_read_stdin_or_event(long *ptreventflag)
x_read_stdin_or_event
void push_psi_ptr_value(ptr_psi_term q, GENERIC *p)
push_psi_ptr_value
void infoline(char *format,...)
infoline
long unify_body(long eval_flag)
unify_body
long trail_condition(psi_term *Q)
trail_condition
void do_currying()
do_currying
long goals
int - formerly enum
void assert_attributes(ptr_psi_term t)
assert_attributes
#define freeze_cut
was enum (goal) – but must be long for error.c - now typedef
void begin_terminal_io()
begin_terminal_io
void Syntaxerrorline(char *format,...)
Syntaxerrorline.
#define TRUE
Standard boolean.
void add_rule(ptr_psi_term head, ptr_psi_term body, def_type typ)
add_rule
#define RMASK
Bit mask for status field of psi-terms: RMASK is used as a flag to avoid infinite loops when tracing ...
static void clean_trail(ptr_choice_point cutpt)
clean_trail
ptr_definition eof
symbol in syntax module
void merge2(ptr_node *u, ptr_node v)
merge2
#define what_next
was enum (goal) – but must be long for error.c - now typedef
#define match
was enum (goal) – but must be long for error.c - now typedef
#define FALSE
Standard boolean.
long unify_aim_noeval()
unify_aim_noeval
#define clause
was enum (goal) – but must be long for error.c - now typedef
struct wl_definition * ptr_definition
ptr_psi_term stack_psi_term(long stat)
stack_psi_term
void x_hide_window(Display *display, long window)
x_hide_window
void merge3(ptr_node *u, ptr_node v)
merge3
struct wl_pair_list * ptr_pair_list
int dummy_printf(char *f, char *s, char *t)
dummy_printf
#define fail
was enum (goal) – but must be long for error.c - now typedef
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
#define retract
was enum (goal) – but must be long for error.c - now typedef
#define equal_types(A, B)
void get_one_arg(ptr_node t, ptr_psi_term *a)
get_one_arg
#define unify
was enum (goal) – but must be long for error.c - now typedef
ptr_node find(long comp, char *keystr, ptr_node tree)
find
ptr_psi_term stack_copy_psi_term(psi_term t)
stack_copy_psi_term
long featcmp(char *str1, char *str2)
featcmp
void restore_state(ptr_psi_term t)
restore_state
void undo_actions()
undo_actions
#define load
was enum (goal) – but must be long for error.c - now typedef
long prove_aim()
prove_aim
void push_ptr_value_global(type_ptr t, GENERIC *p)
push_ptr_value_global
#define unify_noeval
was enum (goal) – but must be long for error.c - now typedef
void encode_types()
encode_types
long i_eval_args(ptr_node n)
i_eval_args
#define del_clause
was enum (goal) – but must be long for error.c - now typedef
#define eval_cut
was enum (goal) – but must be long for error.c - now typedef
long disjunct_aim()
disjunct_aim
void start_chrono()
start_chrono
void handle_interrupt()
HANDLE_INTERRUPT.
void save_state(ptr_psi_term t)
save_state
void stack_info(FILE *outfile)
stack_info
#define undo_action
Fast checking for an undo action.
void backtrack()
backtrack
long print_variables(long printflag)
print_variables
#define GC_THRESHOLD
Garbage collection threshold (1/8 of MEM_SIZE is reasonable).
long read_char()
read_char
struct tms start_time end_time
unsigned long global_time_stamp
#define disj
was enum (goal) – but must be long for error.c - now typedef
GENERIC mem_base
mem_size memory allocated in init_memory by malloc
#define MAX_BUILT_INS
Maximum number of built_ins.
GENERIC get_attr(ptr_psi_term t, char *attrname)
get_attr
ptr_psi_term eval_copy(ptr_psi_term t, long heap_flag)
eval_copy
long type_ptr
Used to identify the object on the undo_stack.
#define type_disj
was enum (goal) – but must be long for error.c - now typedef
long interrupted
used in handling user using ctrl-c
void warningline(char *format,...)
warningline
void clean_undo_window(long disp, long wind)
clean_undo_window
ptr_module find_module(char *module)
find_module
ptr_definition lf_true
symbol in bi module
long no_choices()
no_choices
long memory_check()
memory_check
ptr_definition aborthooksym
symbol in bi module
void stdin_cleareof()
stdin_cleareof
ptr_psi_term xevent_existing
ptr_definition boolpredsym
symbol in bi module
long match_aim()
match_aim
ptr_triple_list properties
void fetch_def(ptr_psi_term u, long allflag)
fetch_def
#define QUOTED_TRUE
True flags for the flags field of psi-terms.
#define SMASK
Bit mask for status field of psi-terms: SMASK masks off the status bits. These are used in the 'mark'...
long open_input_file(char *file)
open_input_file
void push_ptr_value(type_ptr t, GENERIC *p)
push_ptr_value
ptr_module set_current_module(ptr_module module)
set_current_module
ptr_definition quoted_string
symbol in bi module
long i_check_out(ptr_psi_term t)
i_check_out
void push_choice_point(goals t, ptr_psi_term aaaa_6, ptr_psi_term bbbb_6, GENERIC cccc_6)
push_choice_point
ptr_choice_point choice_stack
#define STACK
Flag to indicate stack allocation.
void x_destroy_window(Display *display, Window window)
x_destroy_window
ptr_definition tracesym
symbol in bi module
void merge1(ptr_node *u, ptr_node v)
merge1
long what_next_aim()
what_next_aim
ptr_definition life_or
symbol in syntax module
#define psi_term_ptr
values of type_ptr
#define int_ptr
values of type_ptr