37 perr(
"global variable");
56 perr(
"*** Are you really sure you want to do that ");
65 }
while (c!=
EOLN && c>0 && c<=32);
66 }
while (c!=
'y' && c!=
'n');
116 Errorline(
"the top sort '@' may not be extended.\n");
128 Errorline(
"the %T '%s' may not be changed.\n",
135 Errorline(
"the built-in %T '%s' may not be extended.\n",
208 Errorline(
"the top sort '@' may not be a subsort.\n");
212 Errorline(
"the declaration '%P <| %P' is illegal.\n",t1,t2);
217 Errorline(
"cyclic sort declarations are not allowed.\n");
226 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
230 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
266 warningline(
"'%s' is a sort. It can be extended without a declaration.\n",
272 warningline(
"'%s' is a built-in--it has not been made dynamic.\n",
305 warningline(
"'%s' is a sort--only functions and predicates\
378 Errorline(
"bad sort declaration '%P' (%E).\n",t);
409 long eqflag =
equ_tok((*t),
":=");
410 long ok, any_ok=
FALSE;
430 warningline(
"attributes ignored left of ':=' declaration (%E).\n");
432 while(typ2 && typ2->
type!=
nil) {
449 warningline(
"attributes ignored in sort declaration (%E).\n");
458 warningline(
"attributes ignored left of ':=' declaration (%E).\n");
470 warningline(
"attributes ignored right of '<|' declaration (%E).\n");
481 Errorline(
"argument missing in sort declaration (%E).\n");
485 Errorline(
"argument missing in sort declaration (%E).\n");
522 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
532 Errorline(
"bad argument in sort declaration '%P' (%E).\n",t);
536 Errorline(
"argument missing in sort declaration (%E).\n");
594 if ((*t)->aaaa_4==rule->
aaaa_2 && (*t)->bbbb_4==rule->
bbbb_2 && (*t)->cccc_4==d)
600 (*t)->aaaa_4=rule->
aaaa_2;
601 (*t)->bbbb_4=rule->
bbbb_2;
637 if ((*t)->aaaa_4==prop->
aaaa_4 && (*t)->bbbb_4==prop->
bbbb_4 && (*t)->cccc_4==prop->
cccc_4)
643 (*t)->aaaa_4=prop->
aaaa_4;
644 (*t)->bbbb_4=prop->
bbbb_4;
645 (*t)->cccc_4=prop->
cccc_4;
880 for (i=0; i<w; i++) {
992 if (errflag)
return TRUE;
997 Errorline(
"there is a cycle in the sort hierarchy\n");
998 perr(
"*** Cycle: [");
1028 while (child_list) {
1035 child_list = child_list->
next;
1093 long p=0,i,possible,ok=
TRUE;
1154 gamma_table[p]=xdef;
1179 while(kids && possible) {
1207 gamma_table[i]=
NULL;
1217 traceline(
"*** Encoding done, %d sorts\n",type_count);
1220 Errorline(
"the sorts 'real' and 'string' are not disjoint.\n");
1239 perr(
"*** Internal problem:\n");
1240 perr(
"*** Wild_Life may behave abnormally because some basic types\n");
1241 perr(
"*** have been defined incorrectly.\n\n");
1262 gamma_table[i]->code,
1263 gamma_table[i]->keyword->combined_name);
1294 if (!result)
return FALSE;
1314 return (*(
REAL *)value1 == *(
REAL *)value2);
1318 return (!strcmp((
char *)value1,(
char *)value2));
1354 unsigned long v1,v2,v3;
1418 else while (cd1 && cd2) {
1423 v1=(
unsigned long)(cd1->
value_1);
1424 v2=(
unsigned long)(cd2->
value_1);
1445 cd3= &((*cd3)->next);
1485 unsigned long v1,v2,v3;
1524 v1=(
unsigned long)(c1->
value_1);
1525 v2=(
unsigned long)(c2->
value_1);
1584 if (t1!=t2 && t1!=
top && t2!=
top) {
1591 while (!result && c1 && c2) {
1592 result=(((
unsigned long)(c1->
value_1)) & ((
unsigned long)(c2->
value_1)));
1755 unsigned long p=0,dp=0,v=0,dv=0;
1793 c2=gamma_table[p]->
code;
ptr_definition disjunction
symbol in bi module
void find_adults()
find_adults
long type_cyclicity(ptr_definition d, ptr_int_list anc)
type_cyclicity
#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
ptr_definition * gamma_table
void least_sorts()
void least_sorts()
struct wl_definition * def_type
void assert_complicated_type(ptr_psi_term t)
assert_complicated_type
void assert_args_not_eval(ptr_node n)
assert_args_not_eval
void encode_types()
encode_types
void exit_life(long nl_flag)
exit_life
ptr_definition lf_false
symbol in bi module
ptr_definition integer
symbol in bi module
ptr_definition nothing
symbol in bi module
ptr_definition first_definition
All definition are stores in a linked list starting at first_definition.
long strict_matches(ptr_psi_term t1, ptr_psi_term t2, long *smaller)
strict_matches
#define NOT_CODED
For LIFE boolean calculation built-in.
long redefine(ptr_psi_term t)
redefine
ptr_int_list two_to_the(long p)
two_to_the
long assert_less(ptr_psi_term t1, ptr_psi_term t2)
assert_less
void perr_sort_list(ptr_int_list anc)
perr_sort_list
void propagate_definitions()
propagate_definitions
void clear_coding()
clear_coding
#define predicate_it
was enum (def_type) in extern.h now there is typedef ptr_definition
long sub_CodeType(ptr_int_list c1, ptr_int_list c2)
sub_CodeType
void perr_sort_cycle(ptr_int_list anc)
perr_sort_cycle
#define INT_SIZE
How many types can be encoded on one integer in the transitive closure encoding.
long overlap_type(ptr_definition t1, ptr_definition t2)
overlap_type
void clear_already_loaded(ptr_node n)
clear_already_loaded
void assert_protected(ptr_node n, long prot)
assert_protected
ptr_int_list copyTypeCode(ptr_int_list u)
copyTypeCode
void perr_s(char *s1, char *s2)
perr_s
struct wl_psi_term * ptr_psi_term
quotedStackCopy
#define global_it
was enum (def_type) in extern.h now there is typedef ptr_definition
void remove_cycles(ptr_definition d, ptr_int_list *dl)
remove_cycles
ptr_int_list cons(GENERIC v, ptr_int_list l)
cons
void make_sys_type_links()
make_sys_type_links
#define REAL
Which C type to use to represent reals and integers in Wild_Life.
void inherit_always_check()
inherit_always_check
ptr_definition built_in
symbol in bi module
void traceline(char *format,...)
traceline
ptr_definition real
symbol in bi module
#define type_it
was enum (def_type) in extern.h now there is typedef ptr_definition
void make_type_link(ptr_definition t1, ptr_definition t2)
make_type_link
void Errorline(char *format,...)
Errorline.
unsigned long * GENERIC
unsigned long *GENERIC
long bit_length(ptr_int_list c)
bit_length
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
glb
void perr_sort(ptr_definition d)
perr_sort
#define TRUE
Standard boolean.
void propagate_always_check(ptr_definition d, long *ch)
propagate_always_check
void all_sorts()
all_sorts
void one_pass_always_check(long *ch)
one_pass_always_check
long glb_value(long result, long f, GENERIC c, GENERIC value1, GENERIC value2, GENERIC *value)
glb_value
#define FALSE
Standard boolean.
long glb_code(long f1, GENERIC c1, long f2, GENERIC c2, long *f3, GENERIC *c3)
glb_code
void assert_delay_check(ptr_node n)
assert_delay_check
void insert_prop(ptr_definition d, ptr_triple_list prop)
insert_prop
struct wl_definition * ptr_definition
long sub_type(ptr_definition t1, ptr_definition t2)
sub_type
ptr_definition nil
symbol in bi module
void assert_type(ptr_psi_term t)
assert_type
void restore_state(ptr_psi_term t)
restore_state
void outputline(char *format,...)
void outputline(char *format,...)
struct wl_keyword * ptr_keyword
ptr_definition top
symbol in syntax module
void print_codes()
print_codes
void equalize_codes(int len)
equalize_codes
long read_char()
read_char
#define MAX_BUILT_INS
Maximum number of built_ins.
void insert_own_prop(ptr_definition d)
insert_own_prop
ptr_int_list decode(ptr_int_list c)
decode
void add_rule(ptr_psi_term head, ptr_psi_term body, def_type typ)
add_rule
void warningline(char *format,...)
warningline
ptr_definition lf_true
symbol in bi module
void assert_attributes(ptr_psi_term t)
assert_attributes
void print_def_type(def_type t)
print_def_type
long count_sorts(long c0)
count_sorts
ptr_triple_list properties
struct wl_int_list * ptr_int_list
long open_input_file(char *file)
open_input_file
long yes_or_no()
yes_or_no
ptr_definition quoted_string
symbol in bi module
GENERIC heap_alloc(long s)
heap_alloc
long type_member(ptr_definition t, ptr_int_list tlst)
type_member
void or_codes(ptr_int_list u, ptr_int_list v)
or_codes
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
matches