35 perr(
"global variable");
50 perr(
"*** Are you really sure you want to do that ");
59 }
while (c!=
EOLN && c>0 && c<=32);
60 }
while (c!=
'y' && c!=
'n');
104 Errorline(
"the top sort '@' may not be extended.\n");
116 Errorline(
"the %T '%s' may not be changed.\n",
123 Errorline(
"the built-in %T '%s' may not be extended.\n",
192 Errorline(
"the top sort '@' may not be a subsort.\n");
195 if (t1->value_3 || t2->value_3) {
196 Errorline(
"the declaration '%P <| %P' is illegal.\n",t1,t2);
200 if (t1->type==t2->type) {
201 Errorline(
"cyclic sort declarations are not allowed.\n");
210 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
214 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
248 warningline(
"'%s' is a sort. It can be extended without a declaration.\n",
254 warningline(
"'%s' is a built-in--it has not been made dynamic.\n",
285 warningline(
"'%s' is a sort--only functions and predicates\
352 Errorline(
"bad sort declaration '%P' (%E).\n",t);
380 long eqflag =
equ_tok((*t),
":=");
381 long ok, any_ok=
FALSE;
401 warningline(
"attributes ignored left of ':=' declaration (%E).\n");
403 while(typ2 && typ2->
type!=
nil) {
420 warningline(
"attributes ignored in sort declaration (%E).\n");
429 warningline(
"attributes ignored left of ':=' declaration (%E).\n");
441 warningline(
"attributes ignored right of '<|' declaration (%E).\n");
452 Errorline(
"argument missing in sort declaration (%E).\n");
456 Errorline(
"argument missing in sort declaration (%E).\n");
491 Errorline(
"the %T '%s' may not be redefined as a sort.\n",
501 Errorline(
"bad argument in sort declaration '%P' (%E).\n",t);
505 Errorline(
"argument missing in sort declaration (%E).\n");
559 if ((*t)->aaaa_4==rule->
aaaa_2 && (*t)->bbbb_4==rule->
bbbb_2 && (*t)->cccc_4==d)
565 (*t)->aaaa_4=rule->
aaaa_2;
566 (*t)->bbbb_4=rule->
bbbb_2;
599 if ((*t)->aaaa_4==prop->
aaaa_4 && (*t)->bbbb_4==prop->
bbbb_4 && (*t)->cccc_4==prop->
cccc_4)
605 (*t)->aaaa_4=prop->
aaaa_4;
606 (*t)->bbbb_4=prop->
bbbb_4;
607 (*t)->cccc_4=prop->
cccc_4;
784 u->
value_1= (
GENERIC)(((
unsigned long)(u->value_1)) | ((
unsigned long)(v->value_1)));
786 if (u->next==
NULL && v) {
828 for (i=0; i<w; i++) {
879 perr_s(
"%s",d->keyword->symbol);
887 if (anc->next)
perr(
" <| ");
924 if (errflag)
return TRUE;
929 Errorline(
"there is a cycle in the sort hierarchy\n");
930 perr(
"*** Cycle: [");
957 child_list = d->children;
965 child_list = child_list->
next;
1017 long p=0,i,possible,ok=
TRUE;
1078 gamma_table[p]=xdef;
1103 while(kids && possible) {
1131 gamma_table[i]=
NULL;
1141 traceline(
"*** Encoding done, %d sorts\n",type_count);
1144 Errorline(
"the sorts 'real' and 'string' are not disjoint.\n");
1163 perr(
"*** Internal problem:\n");
1164 perr(
"*** Wild_Life may behave abnormally because some basic types\n");
1165 perr(
"*** have been defined incorrectly.\n\n");
1184 gamma_table[i]->code,
1185 gamma_table[i]->keyword->combined_name);
1214 if (!result)
return FALSE;
1234 return (*(
REAL *)value1 == *(
REAL *)value2);
1238 return (!strcmp((
char *)value1,(
char *)value2));
1268 unsigned long v1,v2,v3;
1332 else while (cd1 && cd2) {
1337 v1=(
unsigned long)(cd1->
value_1);
1338 v2=(
unsigned long)(cd2->
value_1);
1359 cd3= &((*cd3)->next);
1396 unsigned long v1,v2,v3;
1435 v1=(
unsigned long)(c1->
value_1);
1436 v2=(
unsigned long)(c2->
value_1);
1493 if (t1!=t2 && t1!=
top && t2!=
top) {
1500 while (!result && c1 && c2) {
1501 result=(((
unsigned long)(c1->
value_1)) & ((
unsigned long)(c2->
value_1)));
1528 if ((
unsigned long)c1->value_1 & ~(
unsigned long)c2->
value_1)
return FALSE;
1619 if (t1->type==t2->
type) {
1651 unsigned long p=0,dp=0,v=0,dv=0;
1688 c2=gamma_table[p]->
code;
long type_cyclicity(ptr_definition d, ptr_int_list anc)
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
ptr_definition * gamma_table
struct wl_definition * def_type
void assert_complicated_type(ptr_psi_term t)
void assert_args_not_eval(ptr_node n)
void exit_life(long nl_flag)
exit_life
long strict_matches(ptr_psi_term t1, ptr_psi_term t2, long *smaller)
long redefine(ptr_psi_term t)
ptr_int_list two_to_the(long p)
long assert_less(ptr_psi_term t1, ptr_psi_term t2)
void perr_sort_list(ptr_int_list anc)
void propagate_definitions()
void perr_sort_cycle(ptr_int_list anc)
long overlap_type(ptr_definition t1, ptr_definition t2)
void clear_already_loaded(ptr_node n)
void assert_protected(ptr_node n, long prot)
ptr_int_list copyTypeCode(ptr_int_list u)
void perr_s(char *s1, char *s2)
void remove_cycles(ptr_definition d, ptr_int_list *dl)
ptr_int_list cons(GENERIC v, ptr_int_list l)
void make_sys_type_links()
void inherit_always_check()
void traceline(char *format,...)
void make_type_link(ptr_definition t1, ptr_definition t2)
void Errorline(char *format,...)
long bit_length(ptr_int_list c)
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
void perr_sort(ptr_definition d)
void propagate_always_check(ptr_definition d, long *ch)
ptr_definition first_definition
void one_pass_always_check(long *ch)
long glb_value(long result, long f, GENERIC c, GENERIC value1, GENERIC value2, GENERIC *value)
long glb_code(long f1, GENERIC c1, long f2, GENERIC c2, long *f3, GENERIC *c3)
void assert_delay_check(ptr_node n)
ptr_definition quoted_string
void insert_prop(ptr_definition d, ptr_triple_list prop)
struct wl_definition * ptr_definition
long sub_type(ptr_definition t1, ptr_definition t2)
ptr_definition disjunction
void assert_type(ptr_psi_term t)
void restore_state(ptr_psi_term t)
void outputline(char *format,...)
struct wl_keyword * ptr_keyword
void equalize_codes(int len)
struct wl_psi_term * ptr_psi_term
void insert_own_prop(ptr_definition d)
ptr_int_list decode(ptr_int_list c)
void add_rule(ptr_psi_term head, ptr_psi_term body, def_type typ)
add_rule
void warningline(char *format,...)
void assert_attributes(ptr_psi_term t)
void print_def_type(def_type t)
long count_sorts(long c0)
ptr_triple_list properties
struct wl_int_list * ptr_int_list
long open_input_file(char *file)
GENERIC heap_alloc(long s)
heap_alloc
void or_codes(ptr_int_list u, ptr_int_list v)
long matches(ptr_definition t1, ptr_definition t2, long *smaller)