13 static unsigned int randomseed;
393 printf(
"*** BUG: value already present in UNIFY_REAL_RESULT\n");
424 warningline(
"the persistent term '%P' appears in an arithmetic constraint and cannot be refined\n",t);
454 if(success && arg2) {
466 switch(num1+num2*2+num3*4) {
489 success=(val3==(
REAL)(val1>val2));
522 if(success && arg2) {
534 switch(num1+2*num2+4*num3) {
551 if(arg1==arg2 && !val3)
569 success=(val3==(
REAL)(val1==val2));
617 Errorline(
"malformed disjunction '%P'\n",funct);
648 if(success && arg2) {
660 switch(num1+num2*2+num3*4) {
683 success=(val3==(
REAL)(val1<val2));
716 if(success && arg2) {
728 switch(num1+num2*2+num3*4) {
751 success=(val3==(
REAL)(val1>=val2));
784 if(success && arg2) {
796 switch(num1+num2*2+num3*4) {
819 success=(val3==(
REAL)(val1<=val2));
840 long success=
TRUE,succ,lesseq;
877 Errorline(
"function result '%P' should be a boolean or a predicate.\n",
886 Errorline(
"missing argument to '*boolpred*'.\n");
933 long a1comp, a2comp, a3comp;
949 if (a1comp && a2comp && a3comp) {
953 if (a1== !sel || a2== !sel) {
955 }
else if (a1==sel) {
960 }
else if (a2==sel) {
965 }
else if (a3==sel) {
968 }
else if (arg1==arg2) {
984 Errorline(
"Non-boolean argument or result in '%P'.\n",funct);
1031 long a1comp, a2comp;
1045 if (a1comp && a2comp) {
1052 }
else if (arg1==arg2) {
1063 Errorline(
"Non-boolean argument or result in '%P'.\n",funct);
1085 long a1comp, a2comp, a3comp;
1101 if (a1comp && a2comp && a3comp) {
1112 }
else if (a1==
TRUE && arg3==arg2) {
1114 }
else if (a2==
TRUE && arg3==arg2) {
1116 }
else if (a3==
TRUE && arg1==arg2) {
1119 }
else if (a1==
FALSE) {
1121 }
else if (a2==
FALSE) {
1123 }
else if (a3==
FALSE) {
1126 }
else if (arg1==arg2) {
1128 }
else if (arg1==arg3) {
1130 }
else if (arg3==arg2) {
1143 Errorline(
"Non-boolean argument or result in '%P'.\n",funct);
1177 Errorline(
"argument is not a function in %P.\n",funct);
1238 (void)snprintf(thebuffer,20,
"%ld",(
long)v);
1242 Errorline(
"non-integer numeric feature in %P\n",funct);
1260 Errorline(
"attempt to add a feature to curried function %P\n",
1276 arity_add(arg1,label);
1312 long num1,num2,num3;
1313 REAL val1,val2,val3;
1323 if(success && arg2) {
1335 switch(num1+2*num2+4*num3) {
1352 if(arg1==arg2 && val3)
1370 success=(val3==(
REAL)(val1!=val2));
1718 if ((f=fopen(e,
"r"))) {
1816 long gts,success=
TRUE;
1857 long num,success=
TRUE;
1870 gts=(
unsigned long)gts_r;
1913 long ans,gts1,gts2,num,success=
TRUE;
1927 if (success && num) {
1928 gts1 = (
unsigned long) gts_r;
1930 if (success && num) {
1931 gts2 = (
unsigned long) gts_r;
1944 Errorline(
"bad second argument to %P.\n",funct);
1949 Errorline(
"bad first argument %P.\n",funct);
1996 ((sort==
QUERY)?
"query":
1997 ((sort==
FACT)?
"declaration":
"error")));
2016 long smaller,sort,old_var_occurred;
2050 ((sort==
QUERY)?
"query":((sort==
FACT)?
"declaration":
"error"))
2090 static long c_read(
long);
2137 Errorline(
"attempt to read past end of file (%E).\n");
2158 ((sort==
QUERY)?
"query":((sort==
FACT)?
"declaration":
"error"))
2194 Errorline(
"argument missing in %P.\n",g);
2224 if (nl_flag) printf(
"\n");
2225 printf(
"*** Exiting Wild_Life ");
2226 printf(
"[%1.3fs cpu, %1.3fs gc (%2.1f%%)]\n",
2267 if(
NOTQUIET) fprintf(stderr,
"\n*** Abort");
2268 if(
NOTQUIET && nlflag) fprintf(stderr,
"\n");
2279 if(
NOTQUIET) fprintf(stderr,
"\n*** Abort");
2280 if(
NOTQUIET && nlflag) fprintf(stderr,
"\n");
2285 fprintf(stderr,
"\n*** END Abort");
2302 Errorline(
"built-in %P is not implemented yet.\n",t);
2319 Errorline(
"%P is a declaration, not a query.\n",t);
2364 Errorline(
"%P may not have arguments in %P.\n",arg1,g);
2367 Errorline(
"%P should be dynamic in %P.\n",arg1,g);
2370 Errorline(
"%P should be a function or uninterpreted in %P.\n",arg1,g);
2373 Errorline(
"%P is missing one or both arguments.\n",g);
2503 Errorline(
"bad argument in %s.\n", (r?
"retract":
"clause"));
2572 if (eval_2)
return !error;
2577 Errorline(
"argument(s) missing in %P\n",g);
2603 Errorline(
"%P is an incorrect global variable declaration (%E).\n",t);
2614 Errorline(
"%T %P cannot be redeclared as a global variable (%E).\n",
2701 Errorline(
"argument(s) missing in %P\n",g);
2723 Errorline(
"%T %P cannot be redeclared persistent (%E).\n",
2799 Errorline(
"bad input stream in %P.\n",g);
2884 if (thestream!=
NULL) {
2939 long inclose,outclose;
2962 if (inclose || outclose) {
2964 (void)fclose((FILE *)arg1->
value_3);
3029 Errorline(
"argument missing in %P.\n",g);
3078 long i,success=
FALSE;
3080 char tstr[2], *str=tstr;
3090 i = (
unsigned long) floor(*(
REAL *) arg1->
value_3);
3091 if (i==(
unsigned long)(
unsigned char)i) {
3092 str[0] = i; str[1] = 0;
3096 Errorline(
"out-of-range character value in %P.\n",g);
3106 Errorline(
"argument missing in %P.\n",g);
3288 Errorline(
"argument in %P must be positive.\n",g);
3299 Errorline(
"argument missing in %P.\n",g);
3328 Errorline(
"argument in %P must be positive or zero.\n",g);
3401 traceline(
"pushing predicate disjunction choice point for %P\n",g);
3404 if (!arg1 && !arg2) {
3406 Errorline(
"neither first nor second arguments exist in %P.\n",g);
3453 *arg1addr=call_once;
3480 Errorline(
"argument to cond is not boolean in %P\n",g);
3501 long success=
TRUE,v;
3534 (
void)snprintf(thebuffer,20,
"%ld",(
long)v);
3589 if(arg1 && success) {
3642 if(arg1 && success) {
3880 success=(arg1!=arg2);
3924 success=(arg1==arg2);
4084 Errorline(
"non-numeric arguments in %P\n",funct);
4133 Errorline(
"result is not a real in %P\n",funct);
4137 Errorline(
"argument is not a string in %P\n",funct);
4167 Errorline(
"bad argument in %P\n",funct);
4170 Errorline(
"argument missing in %P\n",funct);
4198 Errorline(
"argument of %P should be a predicate.\n",funct);
4254 Errorline(
"argument of %P should be a predicate.\n",funct);
4305 Errorline(
"cannot use '<-' on persistent value in %P\n",g);
4331 Errorline(
"argument missing in %P.\n",g);
4366 Errorline(
"argument missing in %P.\n",g);
4413 Errorline(
"argument missing in %P.\n",g);
4468 Errorline(
"argument missing in %P.\n",g);
4566 Errorline(
"argument missing in %P.\n",g);
4619 Errorline(
"the argument %P of freeze must be a predicate.\n",arg1);
4637 traceline(
"evaluate frozen predicate %P\n",g);
4642 Errorline(
"the argument %P of freeze must be user-defined.\n",arg1);
4649 traceline(
"alternative clause has been retracted\n");
4753 str[0] = (
unsigned char) floor(*(
REAL *) arg1->
value_3);
4763 Errorline(
"argument of %P must be an integer.\n",funct);
4808 Errorline(
"String argument expected in '%P'\n",funct);
4878 warningline(
"argument of '%P' is not a string.\n",funct);
4886 Errorline(
"error occurred in '%P'\n",funct);
4918 (void)snprintf(buf,100,
"%g", *((
double *)(arg1->
value_3)));
4946 long success=
TRUE,i;
4948 REAL the_int,next,neg;
4963 if (the_int!=floor(the_int))
return FALSE;
4965 neg = (the_int<0.0);
4966 if (neg) the_int = -the_int;
4973 Errorline(
"internal buffer too small for int2str(%P).\n",arg1);
4976 next = floor(the_int/10);
4977 val[i]=
'0' + (
unsigned long) (the_int-next*10);
4981 if (neg) { i--; val[i]=
'-'; }
5120 return ((
unsigned long)r>0 && (
unsigned long)r<
MAX_BUILT_INS);
5198 s2=
" with an empty definition";
5222 outputline(
"'%s' is a %sglobal variable worth %P.\n",
5243 else if (fp==(
def_type)predicate_it)
5266 Errorline(
"argument of %P must be a predicate, function, or sort.\n",g);
5272 Errorline(
"argument missing in %P.\n",g);
5318 Errorline(
"argument(s) missing in %P.\n",g);
5379 fprintf(stderr,
"Too many primitives, increase MAX_BUILT_INS in extern.h\n");
5410 Errorline(
"operator precedence must be in the range 0..%d.\n",
5449 if (n && prec && type) {
5476 Errorline(
"precedence must range from 1 to 1200 in %P.\n",t);
5479 Errorline(
"precedence must be a positive integer in %P.\n",t);
5482 Errorline(
"numbers or strings may not be operators in %P.\n",t);
5485 Errorline(
"argument missing in %P.\n",t);
5500 result=(
char *)
heap_alloc(strlen(s1)+strlen(s2)+1);
5501 sprintf(result,
"%s%s",s1,s2);
5521 if(p>l || p<0 || n<0)
5529 *(result+i)= *(s+p+i-1);
5554 (void)fputc(fgetc(f2),f1);
5610 c_arg1= (
char *)arg1->
value_3;
5628 c_arg2= (
char *)arg2->
value_3;
5642 if(success && all_args) {
5643 c_result=
str_conc( c_arg1, c_arg2 );
5646 temp_result->value_3= (
GENERIC)c_result;
5752 c_arg1= (
char *)arg1->
value_3;
5766 if (success && all_args) {
5767 c_result=strlen(c_arg1);
5821 c_arg1= (
char *)arg1->
value_3;
5839 c_arg2= (long)(* (
double *)(arg2->
value_3));
5857 c_arg3= (long)(* (
double *)(arg3->value_3));
5871 if (success && all_args) {
5872 c_result=
sub_str(c_arg1,c_arg2,c_arg3);
5875 temp_result->value_3=(
GENERIC)c_result;
5920 c_arg1= (
char *)arg1->
value_3;
5938 c_arg2= (
char *)arg2->
value_3;
5992 c_arg1= (long)(* (
double *)(arg1->
value_3));
6006 if (success && all_args) {
6009 c_result=(rand_r(&randomseed)<<15) + rand_r(&randomseed);
6013 c_result=c_result-(c_result/c_arg1)*c_arg1;
6057 c_arg1= (long)(* (
double *)(arg1->
value_3));
6071 if (success && all_args) randomseed=c_arg1;
6073 if (success && all_args) srandom(c_arg1);
6103 while(arg1->
coref) {
6132 for(i=
arg_c-1; i>=0; i--) {
GENERIC stack_pointer
used to allocate from stack - size allocated added - adj for alignment
static long c_diff()
c_diff
#define prove
was enum (goal) – but must be long for error.c - now typedef
long indent
Global flag that modifies how writing is done.
void new_built_in(ptr_module m, char *s, def_type t, long(*r)())
new_built_in
static long c_listing()
c_listing
static long c_char()
c_char
ptr_definition disjunction
symbol in bi module
void insert_math_builtins()
insert math builtins into table
static long c_is_sort()
c_is_sort
ptr_keyword hash_lookup(ptr_hash_table table, char *symbol)
HASH_LOOKUP.
long c_initrandom()
c_initrandom
ptr_definition alist
symbol in bi module
long trail_condition(psi_term *Q)
trail_condition
static long built_in_index
long write_corefs
Global flag that modifies how writing is done.
#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
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
void push_ptr_value(type_ptr t, GENERIC *p)
push_ptr_value
float garbage_time
total time on garbage collections - seconds
ptr_definition succeed
symbol in bi module
static long c_exists()
c_exists
long open_output_file(char *file)
void undo(ptr_stack limit)
undo
static long c_combined_name()
c_combined_name
void get_one_arg_addr(ptr_node t, ptr_psi_term **a)
get_one_arg_addr
#define HEAP
Flag to indicate heap allocation.
static long c_exists_choice()
c_exists_choice
#define yfx
was enum (operator) but va_arg could not handle - now typedef
static long c_static()
c_static
static long c_read(long)
c_read
#define FEATCMP
indicates to use featcmp for comparison (in trees.c)
ptr_definition xf_sym
symbol in bi module
void clear_copy()
clear_copy
static long c_write()
c_write
static long c_pwriteq()
c_pwriteq
static long c_unify_func()
c_unify_func
GENERIC heap_pointer
used to allocate from heap - size allocated subtracted - adj for alignment
static long c_clause()
c_clause
ptr_definition apply
symbol in bi module
struct wl_definition * def_type
static long c_declaration()
c_declaration
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
stack_cons
void insert_type_builtins()
void insert_type_builtins
void residuate(ptr_psi_term t)
residuate
#define least_sel
used by collect_symbols in built_ins.c
void listing_pred_write(ptr_node n, long fflag)
listing_pred_write
void exit_life(long nl_flag)
exit_life
FILE * get_stream(ptr_psi_term t)
get_stream
ptr_definition lf_false
symbol in bi module
ptr_definition eqsym
symbol in syntax module
ptr_definition nothing
symbol in bi module
ptr_definition integer
symbol in bi module
ptr_definition functor
symbol in bi module
static long c_put_main(long)
c_put_main
long pred_clause(ptr_psi_term t, long r, ptr_psi_term g)
pred_clause
static long c_pwrite()
c_pwrite
ptr_definition quote
symbol in syntax module
static long c_ascii()
c_ascii
static long c_retract()
c_retract
long c_display_modules()
c_display_modules
static long c_features()
c_features
ptr_definition final_question
symbol in syntax module
#define xfx
was enum (operator) but va_arg could not handle - now typedef
static long c_delay_check()
static long c_delay_check()
static long c_fail()
c_fail
static long c_quote()
c_quote
ptr_psi_term real_stack_psi_term(long stat, REAL thereal)
real_stack_psi_term
static long c_exist_feature()
c_exist_feature
static long c_rootsort()
c_rootsort
void push_choice_point(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
push_choice_point
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
push_goal
#define def_ptr
values of type_ptr
psi_term parse(long *q)
parse
ptr_node bk_stack_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
bk_stack_insert
ptr_definition first_definition
All definition are stores in a linked list starting at first_definition.
static long c_persistent()
c_persistent
long c_deref_length()
c_deref_length
void init_system()
init_system
void list_special(ptr_psi_term t)
list_special
static long generic_write()
generic_write
static long c_call_once()
c_call_once
ptr_psi_term exact_copy(ptr_psi_term t, long heap_flag)
exact_copy
void unify_bool_result(ptr_psi_term t, long v)
unify_bool_result
#define NOT_CODED
For LIFE boolean calculation built-in.
ptr_definition calloncesym
symbol in bi module
long only_arg1(ptr_psi_term t, ptr_psi_term *arg1)
only_arg1
ptr_module current_module
The current module for the tokenizer.
ptr_definition delay_checksym
symbol in bi module
void save_parse_state(ptr_parse_block pb)
save_parse_state
ptr_definition cut
symbol in syntax module
static long c_freeze_inner(long freeze_flag)
c_freeze_inner
ptr_definition iff
symbol in bi module
static long c_project()
c_project
void merge_unify(ptr_node *u, ptr_node v)
merge_unify
long(* c_rule[MAX_BUILT_INS])()
static long c_int2string()
c_int2string
ptr_psi_term heap_psi_term(long stat)
heap_psi_term
void delete_attr(char *s, ptr_node *n)
delete_attr
char * heap_ncopy_string(char *s, int n)
heap_ncopy_string
long redefine(ptr_psi_term t)
redefine
static long c_same_address()
c_same_address
void push_psi_ptr_value(ptr_psi_term q, GENERIC *p)
push_psi_ptr_value
ptr_definition timesym
symbol in bi module
ptr_module syntax_module
Module for minimal Prolog syntax.
#define implies_cut
was enum (goal) – but must be long for error.c - now typedef
void persistent_error_check(ptr_node n, int *error)
persistent_error_check
void restore_parse_state(ptr_parse_block pb)
restore_parse_state
#define fx
was enum (operator) but va_arg could not handle - now typedef
void display_psi_stream(ptr_psi_term t)
display_psi_stream
ptr_psi_term new_psi_term(long numargs, ptr_definition typ, ptr_psi_term **a1, ptr_psi_term **a2)
new_psi_term
long get_real_value(ptr_psi_term t, REAL *v, long *n)
get_real_value
ptr_definition comment
symbol in bi module
void persistent_tree(ptr_node n)
persistent_tree
static long c_unify_pred()
c_unify_pred
static void unify_bool(ptr_psi_term arg)
unify_bool
static long c_cond()
c_cond
#define predicate_it
was enum (def_type) in extern.h now there is typedef ptr_definition
long c_set_module()
c_set_module
long c_append_file()
c_append_file
long write_resids
Global flag that modifies how writing is done.
ptr_definition listingsym
symbol in bi module
void global_error_check(ptr_node n, int *error, int *eval_2)
global_error_check
ptr_psi_term stack_bytes(char *s, int n)
stack_bytes
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
matches
void assert_protected(ptr_node n, long prot)
assert_protected
long print_depth
Global flag that modifies how writing is done.
static long c_string2psi()
c_string2psi
#define set_empty
Set constants for deref_args in lefun.c.
static long c_read_psi()
c_read_psi
#define DEFRULES
Must be different from NULL, a built-in index, and a pointer Used to indicate that the rules of the d...
ptr_definition fx_sym
symbol in bi module
static long c_lt()
c_lt C_LT Less than.
static long c_boolpred()
c_boolpred
static long c_diff_address()
c_diff_address
void persistent_one(ptr_psi_term t)
persistent_one
ptr_definition stream
symbol in bi module
static long c_open_out()
c_open_out
void nonnum_warning(ptr_psi_term t, ptr_psi_term arg1, ptr_psi_term arg2)
nonnum_warning
#define FACT
Fact Kind of user input.
static long c_print_codes()
c_print_codes
ptr_definition call_handlersym
symbol in bi module
ptr_hash_table symbol_table
void get_one_arg(ptr_node t, ptr_psi_term *a)
get_one_arg
#define set_1
Set constants for deref_args in lefun.c.
struct wl_psi_term * ptr_psi_term
quotedStackCopy
#define global_it
was enum (def_type) in extern.h now there is typedef ptr_definition
ptr_definition dynamicsym
symbol in bi module
ptr_definition opsym
symbol in bi module
ptr_node distinct_tree(ptr_node t)
distinct_tree
ptr_definition add_module3
symbol in bi module for feature_values
#define xfy
was enum (operator) but va_arg could not handle - now typedef
static long c_string_address()
c_string_address
ptr_definition add_module2
symbol in bi module for str2psi
static long c_ltoe()
c_ltoe
#define REAL
Which C type to use to represent reals and integers in Wild_Life.
long c_open_module()
c_open_module
#define nop
was enum (operator) but va_arg could not handle - now typedef
ptr_definition funcsym
symbol in syntax module
#define QUERY
Query Kind of user input.
ptr_definition boolean
symbol in bi module
long overlap_type(ptr_definition t1, ptr_definition t2)
overlap_type
ptr_definition eval_argsym
symbol in bi module
static long c_assign()
c_assign
ptr_definition update_symbol(ptr_module module, char *symbol)
update_symbol
#define op_sel
used by collect_symbols in built_ins.c
static long c_parse()
c_parse
static long c_freeze()
c_freeze
ptr_node heap_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
heap_insert
void insert_system_builtins()
insert_system_builtins
ptr_definition and
symbol in syntax module
ptr_resid_list resid_vars
static long c_page_width()
c_page_width
int get_module(ptr_psi_term psi, ptr_module *module)
get_module
long abort_life(int nlflag)
abort_life
#define eval
was enum (goal) – but must be long for error.c - now typedef
static long c_gtoe()
c_gtoe
ptr_psi_term null_psi_term
Used to represent an empty parse token.
ptr_definition built_in
symbol in bi module
void stack_add_psi_attr(ptr_psi_term t, char *attrname, ptr_psi_term g)
stack_add_psi_attr
void release_resid(ptr_psi_term t)
release_resid
static long c_psi2string()
c_psi2string
static long c_pred()
c_pred
long sub_type(ptr_definition t1, ptr_definition t2)
sub_type
void traceline(char *format,...)
traceline
static long c_repeat()
c_repeat
ptr_definition real
symbol in bi module
#define type_it
was enum (def_type) in extern.h now there is typedef ptr_definition
long c_display_persistent()
c_display_persistent
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
static long c_global_assign()
c_global_assign
static long c_split_double()
c_split_double
ptr_definition inputfilesym
symbol in bi module
ptr_definition yf_sym
symbol in bi module
struct tms life_start
time life started - seconds
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
static long c_write_err()
c_write_err
static long c_apply()
c_apply
ptr_definition variable
symbol in bi module
#define set_1_2
Set constants for deref_args in lefun.c.
void assert_delay_check(ptr_node n)
assert_delay_check
ptr_int_list cons(GENERIC v, ptr_int_list l)
cons
void stack_add_int_attr(ptr_psi_term t, char *attrname, long value)
stack_add_int_attr
static long c_writeq_err()
c_writeq_err
ptr_psi_term stack_pair(ptr_psi_term left, ptr_psi_term right)
stack_pair
#define UNDEF
For LIFE boolean calculation built-in.
static long c_global()
c_global
#define greatest_sel
used by collect_symbols in built_ins.c
long check_real(ptr_psi_term t, REAL *v, long *n)
check_real
void residuate2(ptr_psi_term u, ptr_psi_term v)
residuate2
ptr_node stack_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
stack_insert
char * sub_str(char *s, long p, long n)
sub_str
void bk_mark_quote(ptr_psi_term t)
bk_mark_quote
static long c_get_choice()
c_get_choice
char * heap_copy_string(char *s)
heap_copy_string
ptr_definition final_dot
symbol in syntax module
void print_codes()
print_codes
void insert_sys_builtins()
insert_sys_builtins
ptr_definition colonsym
symbol in syntax module
void global_tree(ptr_node n)
global_tree
static long c_writeq()
c_writeq
#define freeze_cut
was enum (goal) – but must be long for error.c - now typedef
int arg_c
set from argc in either life.c or lib.c
ptr_psi_term distinct_copy(ptr_psi_term t)
distinct_copy
long c_sub_string()
c_sub_string
#define TRUE
Standard boolean.
#define STREAM
feature name
long all_public_symbols()
all_public_symbols
static long c_open_in()
c_open_in
long has_rules(ptr_pair_list r)
has_rules
ptr_definition minus_symbol
symbol in syntax module
static long c_dynamic()
c_dynamic
static void clean_trail(ptr_choice_point cutpt)
clean_trail
static long c_logical_main(long sel)
c_logical_main
long append_files(char *s1, char *s2)
append_files
ptr_definition eof
symbol in syntax module
long c_string_length()
c_string_length
#define match
was enum (goal) – but must be long for error.c - now typedef
void mark_eval(ptr_psi_term t)
mark_eval
ptr_psi_term stack_int(long n)
stack_int
ptr_definition constant
symbol in bi module
void release_resid_notrail(ptr_psi_term t)
release_resid_notrail
static long c_non_strict()
c_non_strict
static long c_copy_term()
c_copy_term
ptr_psi_term global_value
static long c_undo()
c_undo
#define FALSE
Standard boolean.
static long c_eval()
c_eval
static long c_nonvar()
c_nonvar
long is_built_in(ptr_pair_list r)
is_built_in
#define set_1_2_3
Set constants for deref_args in lefun.c.
ptr_definition abortsym
symbol in bi module
ptr_definition add_module1
symbol in bi module for features
ptr_definition staticsym
symbol in bi module
#define clause
was enum (goal) – but must be long for error.c - now typedef
static long c_disj()
c_disj
static long c_eval_disjunction()
c_eval_disjunction
ptr_psi_term stack_psi_term(long stat)
stack_psi_term
ptr_definition such_that
symbol in syntax module
ptr_definition typesym
symbol in syntax module
char * expand_file_name(char *s)
expand_file_name
ptr_definition nil
symbol in bi module
struct wl_operator_data * ptr_operator_data
struct wl_pair_list * ptr_pair_list
ptr_definition xfy_sym
symbol in bi module
long c_current_module()
c_current_module
static long c_succeed()
c_succeed
void init_parse_state()
init_parse_state
ptr_psi_term stack_nil()
stack_nil
void pred_write(ptr_node n)
pred_write
ptr_definition disj_nil
symbol in syntax module
static long c_implies()
c_implies
static long c_strip()
c_strip
ptr_psi_term inc_heap_copy(ptr_psi_term t)
inc_heap_copy
static long get_bool(ptr_definition typ)
get_bool
#define equal_types(A, B)
void mark_quote(ptr_psi_term t)
mark_quote
static long c_put_err()
c_put_err
#define xf
was enum (operator) but va_arg could not handle - now typedef
long c_private_feature()
c_private_feature
#define unify
was enum (goal) – but must be long for error.c - now typedef
ptr_definition commasym
symbol in syntax module
static long c_assert_last()
c_assert_last
ptr_node find(long comp, char *keystr, ptr_node tree)
find
char * arg_v[ARGNN]
set from argv in either life.c or lib.c
void save_resid(ptr_resid_block rb, ptr_psi_term match_date)
save_resid
#define PRINT_DEPTH
Initial depth limit for printing.
ptr_psi_term stack_copy_psi_term(psi_term t)
stack_copy_psi_term
long featcmp(char *str1, char *str2)
featcmp
static long c_close()
c_close
static long c_read_token()
c_read_token
void restore_state(ptr_psi_term t)
restore_state
#define yf
was enum (operator) but va_arg could not handle - now typedef
void outputline(char *format,...)
void outputline(char *format,...)
long c_trace_input()
c_trace_input
#define load
was enum (goal) – but must be long for error.c - now typedef
ptr_node one_attr()
one_attr
long str_to_int(char *s)
str_to_int
long const_quote
Global flag that modifies how writing is done.
ptr_psi_term make_feature_list(ptr_node tree, ptr_psi_term tail, ptr_module module, int val)
make_feature_list
ptr_module bi_module
Module for public built-ins.
static long c_is_predicate()
c_is_predicate
static long c_var()
static long c_var()
ptr_psi_term error_psi_term
symbol in bi module
#define MAX_PRECEDENCE
Maximum operator precedence.
ptr_definition top
symbol in syntax module
void encode_types()
encode_types
long deref_eval(ptr_psi_term t)
deref_eval
long c_concatenate()
c_concatenate
ptr_definition yfx_sym
symbol in bi module
static long c_is_function()
c_is_function
char * str_conc(char *s1, char *s2)
str_conc
static long c_funct()
c_funct
#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
static long c_eval_inplace()
c_eval_inplace
ptr_psi_term collect_symbols(long sel)
collect_symbols
void read_token_b(ptr_psi_term tok)
read_token_b
void save_state(ptr_psi_term t)
save_state
ptr_definition loadsym
symbol in bi module
void init_built_in_types()
init_built_in_types
long c_private()
c_private
long print_variables(long printflag)
print_variables
long unify_real_result(ptr_psi_term t, REAL v)
unify_real_result
static long c_not_implemented()
c_not_implemented
ptr_definition leftarrowsym
symbol in syntax module
long file_exists(char *s)
file_exists
long read_char()
read_char
ptr_definition nullsym
symbol in bi module
unsigned long global_time_stamp
long c_replace()
c_replace
long declare_operator(ptr_psi_term t)
declare_operator
long write_stderr
Global flag that modifies how writing is done.
static long c_chdir()
c_chdir
#define MAX_BUILT_INS
Maximum number of built_ins.
#define STRLEN
Maximum size of file names and input tokens (which includes input strings) (Note: calculated tokens c...
void inherit_always_check()
inherit_always_check
ptr_definition encodesym
symbol in bi module
ptr_definition fy_sym
symbol in bi module
void global_one(ptr_psi_term t)
global_one
static long c_bk_assign()
c_bk_assign
ptr_psi_term eval_copy(ptr_psi_term t, long heap_flag)
eval_copy
ptr_definition update_feature(ptr_module module, char *feature)
update_feature
static ptr_node copy_attr_list(ptr_node n)
copy_attr_list
void warningline(char *format,...)
warningline
ptr_definition lf_true
symbol in bi module
static long c_set_input()
c_set_input
static long c_equal()
static long c_equal()
static void op_declare(long p, operator t, char *s)
op_declare
ptr_definition aborthooksym
symbol in bi module
void stdin_cleareof()
stdin_cleareof
ptr_definition boolpredsym
symbol in bi module
static long c_setq()
c_setq
ptr_psi_term stack_string(char *s)
stack_string
static long c_module_name()
c_module_name
static long c_write_canonical()
c_write_canonical
#define QUOTED_TRUE
True flags for the flags field of psi-terms.
ptr_definition xfx_sym
symbol in bi module
long hidden_type(ptr_definition t)
hidden_type
static long c_load()
c_load
static long get_bool_value(ptr_psi_term t, REAL *v, long *n)
get_bool_value
static long c_print_depth()
c_print_depth
long open_input_file(char *file)
open_input_file
static long c_copy_pointer()
c_copy_pointer
static long c_call()
c_call
long write_canon
Global flag that modifies how writing is done.
static long c_feature_values()
c_feature_values
ptr_module set_current_module(ptr_module module)
set_current_module
static long c_assert_first()
c_assert_first
void assert_clause(ptr_psi_term t)
assert_clause
static long c_print_variables()
c_print_variables
ptr_definition quoted_string
symbol in bi module
static long c_set_choice()
c_set_choice
ptr_operator_data op_data
long i_check_out(ptr_psi_term t)
i_check_out
GENERIC heap_alloc(long s)
heap_alloc
static void set_parse_queryflag(ptr_node thelist, long sort)
set_parse_queryflag
ptr_choice_point choice_stack
static long c_set_output()
c_set_output
ptr_definition predsym
symbol in syntax module
static long c_such_that()
c_such_that
#define STACK
Flag to indicate stack allocation.
#define fy
was enum (operator) but va_arg could not handle - now typedef
void assert_args_not_eval(ptr_node n)
assert_args_not_eval
ptr_definition tracesym
symbol in bi module
ptr_definition life_or
symbol in syntax module
long psi_to_string(ptr_psi_term t, char **fn)
psi_to_string
#define psi_term_ptr
values of type_ptr
#define int_ptr
values of type_ptr