Wild Life  2.29
 All Data Structures Files Functions Variables Typedefs Macros
bi_type.c
Go to the documentation of this file.
1 /* tab:4
2  *
3  * bi_type.c - builtins for doing type heierachy stuff
4  *
5  * Copyright (c) 1992 Digital Equipment Corporation
6  * All Rights Reserved.
7  *
8  * The standard digital prl copyrights exist and where compatible
9  * the below also exists.
10  * Permission to use, copy, modify, and distribute this
11  * software and its documentation for any purpose and without
12  * fee is hereby granted, provided that the above copyright
13  * notice appear in all copies. Copyright holder(s) make no
14  * representation about the suitability of this software for
15  * any purpose. It is provided "as is" without express or
16  * implied warranty.
17  *
18  */
19 /* $Id: bi_type.c,v 1.2 1994/12/08 23:08:52 duchier Exp $ */
20 
21 #include "defs.h"
22 
23 /******** C_CHILDREN
24  Return a list of roots of the children types of T (except bottom).
25 */
26 static long c_children() /* RM: Dec 14 1992 Re-wrote most of the routine */
27 {
28  long success=TRUE;
29  ptr_psi_term funct,result,arg1,arg2,t,p1;
30  ptr_int_list p;
31 
32  funct=aim->aaaa_1;
33  deref_ptr(funct);
34  result=aim->bbbb_1;
35  get_two_args(funct->attr_list,&arg1,&arg2);
36 
37  if (!arg1) {
38  curry();
39  return success;
40  }
41 
42  deref(arg1);
43  deref_args(funct,set_1);
45 
46  if (arg1->type==top)
47  t=collect_symbols(greatest_sel); /* RM: Feb 3 1993 */
48  else {
49  p=arg1->type->children;
50 
51  /* Hack: check there's enough memory to build the list */
52  /* RM: Jul 22 1993 */
53  /*
54  { int count=0;
55  while(p) {
56  count++;
57  p=p->next;
58  }
59  if (heap_pointer-stack_pointer < 3*count*sizeof(psi_term)) {
60  goal_stack=aim;
61  garbage();
62  return success;
63  }
64  */
65 
66  t=stack_nil();
67  if (!(arg1->type==real && arg1->value_3)) /* PVR 15.2.94 */
68  while (p) {
69  ptr_definition ptype;
70 
71  ptype = (ptr_definition) p->value_1;
72  if (hidden_type(ptype)) { p=p->next; continue; }
73  p1 = stack_psi_term(0);
74  p1->type = ptype;
75  t=stack_cons(p1,t);
76  p = p->next;
77  }
78  }
79  push_goal(unify,result,t,NULL);
80 
81  return success;
82 }
83 
84 
85 
86 /******** C_PARENTS
87  Return a list of roots of the parent types of T.
88 */
89 static long c_parents()
90 {
91  long success=TRUE;
92  ptr_psi_term funct,result,arg1,arg2,t,p1;
93  ptr_int_list p;
94 
95  funct=aim->aaaa_1;
96  deref_ptr(funct);
97  result=aim->bbbb_1;
98  get_two_args(funct->attr_list,&arg1,&arg2);
99  if (arg1) {
100  deref(arg1);
101  deref_args(funct,set_1);
102  resid_aim=NULL;
103  t=stack_nil(); /* RM: Dec 14 1992 */
104  p = arg1->type->parents;
105  if (arg1->type!=top && p==NULL) {
106  /* Top is the only parent */
107  p1 = stack_psi_term(4);
108  p1->type = (ptr_definition) top;
109  t=stack_cons(p1,t); /* RM: Dec 14 1992 */
110  }
111  else {
112  if ((arg1->type==quoted_string || arg1->type==integer ||
113  arg1->type==real) && arg1->value_3!=NULL) {
114  /* arg1 is a string, long or real: return a list with arg1 as
115  argument, where arg1->value_2 = NULL, MH */
116  p1 = stack_psi_term(4);
117  p1->type = arg1->type;
118  t=stack_cons(p1,t); /* RM: Dec 14 1992 */
119  }
120  else {
121  /* Look at the parents list */
122  while (p) {
123  ptr_definition ptype;
124 
125  ptype = (ptr_definition) p->value_1;
126  if (hidden_type(ptype)) { p=p->next; continue; }
127  p1 = stack_psi_term(4);
128  p1->type = ptype;
129  t=stack_cons(p1,t); /* RM: Dec 14 1992 */
130  p = p->next;
131  }
132  }
133  }
134  push_goal(unify,result,t,NULL);
135  }
136  else
137  curry();
138 
139  return success;
140 }
141 
142 
143 
144 
145 /******** C_SMALLEST
146  Return the parents of bottom.
147  This function has no arguments.
148 */
149 static long c_smallest()
150 {
151  long success=TRUE;
152  ptr_psi_term result, g, t;
153 
154  g=aim->aaaa_1;
156  result=aim->bbbb_1;
157  t=collect_symbols(least_sel); /* RM: Feb 3 1993 */
158  push_goal(unify,result,t,NULL);
159 
160  return success;
161 }
162 
163 int isSubTypeValue(arg1, arg2)
164  ptr_psi_term arg1, arg2;
165 {
166  long ans=TRUE;
167 
168  /* we already know that either arg1->type == arg2->type or that at both
169  * of the two are either long or real
170  */
171 
172  if (arg2->value_3) {
173  if (arg1->value_3) {
174  if (arg1->type==real || arg1->type==integer) {
175  ans=( *(REAL *)arg1->value_3 == *(REAL *)arg2->value_3);
176  }
177  else if (arg1->type==quoted_string) {
178  ans=(strcmp((char *)arg1->value_3,(char *)arg2->value_3)==0);
179  }
180  }
181  else
182  ans=FALSE;
183  }
184  else {
185  if (arg1->value_3 && (arg1->type==real || arg1->type==integer)) {
186  if (arg2->type==integer)
187  ans=(*(REAL *)arg1->value_3 == floor(*(REAL *)arg1->value_3));
188  else
189  ans=TRUE;
190  }
191  }
192  return ans;
193 }
194 
195 /* Boolean utility function that implements isa */
196 static long isa(arg1,arg2)
197  ptr_psi_term arg1, arg2;
198 {
199  long ans;
200 
201  if ( arg1->type==arg2->type
202  || ( (arg1->type==real || arg1->type==integer)
203  && (arg2->type==real || arg2->type==integer)
204  && (arg1->value_3 || arg2->value_3)
205  )
206  ) {
207 
208  if(arg1->type==cut) /* RM: Jan 21 1993 */
209  ans=TRUE;
210  else
211  ans=isSubTypeValue(arg1, arg2);
212  }
213  else {
214  (void)matches(arg1->type, arg2->type, &ans);
215  }
216 
217  /*Errorline("isa %P %P -> %d\n",arg1,arg2,ans);*/
218 
219  return ans;
220 }
221 
222 
223 /* Utility that selects one of several isa functions */
224 static long isa_select(arg1,arg2,sel)
225  ptr_psi_term arg1,arg2;
226  long sel;
227 {
228  long ans;
229 
230  switch (sel) {
231  case isa_le_sel: ans=isa(arg1,arg2);
232  break;
233  case isa_lt_sel: ans=isa(arg1,arg2) && !isa(arg2,arg1);
234  break;
235  case isa_ge_sel: ans=isa(arg2,arg1);
236  break;
237  case isa_gt_sel: ans=isa(arg2,arg1) && !isa(arg1,arg2);
238  break;
239  case isa_eq_sel: ans=isa(arg1,arg2) && isa(arg2,arg1);
240  break;
241 
242  case isa_nle_sel: ans= !isa(arg1,arg2);
243  break;
244  case isa_nlt_sel: ans= !(isa(arg1,arg2) && !isa(arg2,arg1));
245  break;
246  case isa_nge_sel: ans= !isa(arg2,arg1);
247  break;
248  case isa_ngt_sel: ans= !(isa(arg2,arg1) && !isa(arg1,arg2));
249  break;
250  case isa_neq_sel: ans= !(isa(arg1,arg2) && isa(arg2,arg1));
251  break;
252 
253  case isa_cmp_sel: ans=isa(arg1,arg2) || isa(arg2,arg1);
254  break;
255  case isa_ncmp_sel: ans= !(isa(arg1,arg2) || isa(arg2,arg1));
256  break;
257  }
258  return ans;
259 }
260 
261 /******** C_ISA_MAIN
262  Main routine to handle all the isa built-in functions.
263 */
264 static long c_isa_main(sel)
265  long sel;
266 {
267  long success=TRUE,ans;
268  ptr_psi_term arg1,arg2,funct,result;
269 
270  funct=aim->aaaa_1;
271  deref_ptr(funct);
272  result=aim->bbbb_1;
273  get_two_args(funct->attr_list,&arg1,&arg2);
274  if (arg1 && arg2) {
275  deref(arg1);
276  deref(arg2);
277  deref_args(funct,set_1_2);
278  ans=isa_select(arg1,arg2,sel);
279  unify_bool_result(result,ans);
280  }
281  else curry();
282 
283  return success;
284 }
285 
286 /******** C_ISA_LE
287  Type t1 isa t2 in the hierarchy, i.e. t1 is less than or equal to t2.
288  This boolean function requires two arguments and never residuates.
289  It will curry if insufficient arguments are given.
290  It works correctly on the 'value' types, i.e. on integers, reals, strings,
291  and lists. For lists, it looks only at the top level, i.e. whether the
292  object is nil or a cons cell.
293 */
294 static long c_isa_le()
295 {
296  return c_isa_main(isa_le_sel);
297 }
298 
299 static long c_isa_lt()
300 {
301  return c_isa_main(isa_lt_sel);
302 }
303 
304 static long c_isa_ge()
305 {
306  return c_isa_main(isa_ge_sel);
307 }
308 
309 static long c_isa_gt()
310 {
311  return c_isa_main(isa_gt_sel);
312 }
313 
314 static long c_isa_eq()
315 {
316  return c_isa_main(isa_eq_sel);
317 }
318 
319 static long c_isa_nle()
320 {
321  return c_isa_main(isa_nle_sel);
322 }
323 
324 static long c_isa_nlt()
325 {
326  return c_isa_main(isa_nlt_sel);
327 }
328 
329 static long c_isa_nge()
330 {
331  return c_isa_main(isa_nge_sel);
332 }
333 
334 static long c_isa_ngt()
335 {
336  return c_isa_main(isa_ngt_sel);
337 }
338 
339 static long c_isa_neq()
340 {
341  return c_isa_main(isa_neq_sel);
342 }
343 
344 static long c_isa_cmp()
345 {
346  return c_isa_main(isa_cmp_sel);
347 }
348 
349 static long c_isa_ncmp()
350 {
351  return c_isa_main(isa_ncmp_sel);
352 }
353 
354 
355 
356 /******** C_IS_FUNCTION
357  Succeed iff argument is a function (built-in or user-defined).
358 */
359 static long c_is_function() /* RM: Jan 29 1993 */
360 {
361  int success=TRUE,ans;
362  ptr_psi_term arg1,funct,result;
363 
364  funct=aim->aaaa_1;
365  deref_ptr(funct);
366  result=aim->bbbb_1;
367  get_one_arg(funct->attr_list,&arg1);
368  if (arg1) {
369  deref(arg1);
370  deref_args(funct,set_1);
371  ans=(arg1->type->type_def==(def_type)function_it);
372  unify_bool_result(result,ans);
373  }
374  else curry();
375 
376  return success;
377 }
378 
379 
380 
381 /******** C_IS_PERSISTENT
382  Succeed iff argument is a quoted persistent or on the heap.
383 */
384 static long c_is_persistent() /* RM: Feb 9 1993 */
385 {
386  int success=TRUE,ans;
387  ptr_psi_term arg1,glob,result;
388 
389  glob=aim->aaaa_1;
390  deref_ptr(glob);
391  result=aim->bbbb_1;
392  get_one_arg(glob->attr_list,&arg1);
393  if (arg1) {
394  deref(arg1);
395  deref_args(glob,set_1);
396  ans=(
397  arg1->type->type_def==(def_type)global &&
399  ) ||
400  (GENERIC)arg1>=heap_pointer;
401  unify_bool_result(result,ans);
402  }
403  else curry();
404 
405  return success;
406 }
407 
408 
409 
410 /******** C_IS_PREDICATE
411  Succeed iff argument is a predicate (built-in or user-defined).
412 */
413 static long c_is_predicate() /* RM: Jan 29 1993 */
414 {
415  int success=TRUE,ans;
416  ptr_psi_term arg1,funct,result;
417 
418  funct=aim->aaaa_1;
419  deref_ptr(funct);
420  result=aim->bbbb_1;
421  get_one_arg(funct->attr_list,&arg1);
422  if (arg1) {
423  deref(arg1);
424  deref_args(funct,set_1);
425  ans=(arg1->type->type_def==(def_type)predicate);
426  unify_bool_result(result,ans);
427  }
428  else curry();
429 
430  return success;
431 }
432 
433 
434 
435 /******** C_IS_SORT
436  Succeed iff argument is a sort (built-in or user-defined).
437 */
438 static long c_is_sort() /* RM: Jan 29 1993 */
439 {
440  int success=TRUE,ans;
441  ptr_psi_term arg1,funct,result;
442 
443  funct=aim->aaaa_1;
444  deref_ptr(funct);
445  result=aim->bbbb_1;
446  get_one_arg(funct->attr_list,&arg1);
447  if (arg1) {
448  deref(arg1);
449  deref_args(funct,set_1);
450  ans=(arg1->type->type_def==(def_type)type_it);
451  unify_bool_result(result,ans);
452  }
453  else curry();
454 
455  return success;
456 }
457 
458 
459 
460 /******** C_IS_VALUE
461  Return true iff argument has a value, i.e. if it is implemented in
462  a quirky way in Wild_Life. This is true for integers, reals,
463  strings (which are potentially infinite sets of objects), and list objects.
464 */
465 static long c_is_value()
466 {
467  long success=TRUE,ans;
468  ptr_psi_term arg1,arg2,funct,result;
469 
470  funct=aim->aaaa_1;
471  deref_ptr(funct);
472  result=aim->bbbb_1;
473  get_two_args(funct->attr_list,&arg1,&arg2);
474  if (arg1) {
475  deref(arg1);
476  deref_args(funct,set_1);
477  ans=(arg1->value_3!=NULL);
478  unify_bool_result(result,ans);
479  }
480  else curry();
481 
482  return success;
483 }
484 
485 
486 
487 /******** C_IS_NUMBER
488  Return true iff argument is an actual number.
489 */
490 static long c_is_number()
491 {
492  long success=TRUE,ans;
493  ptr_psi_term arg1,arg2,funct,result;
494 
495  funct=aim->aaaa_1;
496  deref_ptr(funct);
497  result=aim->bbbb_1;
498  get_two_args(funct->attr_list,&arg1,&arg2);
499  if (arg1) {
500  deref(arg1);
501  deref_args(funct,set_1);
502  ans=sub_type(arg1->type,real) && (arg1->value_3!=NULL);
503  unify_bool_result(result,ans);
504  }
505  else curry();
506 
507  return success;
508 }
509 
510 
511 /******** C_ISA_SUBSORT(A,B)
512  if A is a subsort of B => succeed and residuate on B
513  else => fail
514 */
516 {
517  ptr_psi_term pred,arg1,arg2;
518 
519  pred=aim->aaaa_1;
520  deref_ptr(pred);
521  get_two_args(pred->attr_list,&arg1,&arg2);
522 
523  if (!arg1) (void)reportAndAbort(pred,"no first argument");
524  deref(arg1);
525 
526  if (!arg2) (void)reportAndAbort(pred,"no second argument");
527  deref(arg2);
528 
529  deref_args(pred, set_1_2);
530 
531  if (isa(arg1, arg2))
532  {
533  residuate(arg2);
534  return TRUE;
535  }
536  return FALSE;
537 }
538 
539 
540 
541 long isValue(p)
542  ptr_psi_term p;
543 {
544  return (p->value_3 != NULL);
545 }
546 
547 
548 
549 /******** C_GLB(A,B)
550  Return glb(A,B). Continued calls will return each following type in
551  the disjunction of the glb of A,B.
552 */
553 long c_glb()
554 {
555  ptr_psi_term func,arg1,arg2, result, other;
556  ptr_definition ans;
557  ptr_int_list complexType;
558  ptr_int_list decodedType = NULL;
559  long ret;
560 
561  func=aim->aaaa_1;
562  deref_ptr(func);
563  get_two_args(func->attr_list,&arg1,&arg2);
564 
565  if ((!arg1) || (!arg2)) {
566  curry();
567  return TRUE;
568  }
569  result = aim->bbbb_1;
570  deref(result);
571  deref(arg1);
572  deref(arg2);
573  deref_args(func, set_1_2);
574 
575  if ((ret=glb(arg1->type, arg2->type, &ans, &complexType)) == 0)
576  return FALSE;
577 
578  if ((ret != 4)&&(isValue(arg1)||isValue(arg2))) {
579  /* glb is one of arg1->type or arg2->type AND at least one is a value */
580  if (!isSubTypeValue(arg1, arg2) && !isSubTypeValue(arg2, arg1))
581  return FALSE;
582  }
583  if (!ans) {
584  decodedType = decode(complexType);
585  ans = (ptr_definition)decodedType->value_1;
586  decodedType = decodedType->next;
587  }
588  other=makePsiTerm(ans);
589 
590  if (isValue(arg1)) other->value_3=arg1->value_3;
591  if (isValue(arg2)) other->value_3=arg2->value_3;
592 
593  if (isValue(arg1) || isValue(arg2)) {
594  if (decodedType) {
595  Errorline("glb of multiple-inheritance value sorts not yet implemented.\n");
596  return FALSE;
597  }
598  }
599 
600  if (decodedType)
601  push_choice_point(type_disj, result,(ptr_psi_term) decodedType,(GENERIC) NULL);
602 
603  resid_aim = NULL;
604  push_goal(unify,result,other,NULL);
605  return TRUE;
606 }
607 
608 
609 
610 /******** C_LUB(A,B)
611  Return lub(A,B). Continued calls will return each following type in
612  the disjunction of the lub of A,B.
613 */
614 long c_lub()
615 {
616  ptr_psi_term func,arg1,arg2, result, other;
617  ptr_definition ans=NULL;
618  ptr_int_list decodedType = NULL;
619 
620  func=aim->aaaa_1;
621  deref_ptr(func);
622  get_two_args(func->attr_list,&arg1,&arg2);
623 
624  if ((!arg1) || (!arg2))
625  {
626  curry();
627  return TRUE;
628  }
629  result = aim->bbbb_1;
630  deref(result);
631  deref(arg1);
632  deref(arg2);
633  deref_args(func, set_1_2);
634 
635  /* now lets find the list of types that is the lub */
636 
637  decodedType = lub(arg1, arg2, &other);
638 
639  if (decodedType) {
640  ans = (ptr_definition)decodedType->value_1;
641  decodedType = decodedType->next;
642  other = makePsiTerm(ans);
643  }
644 
645  if (decodedType)
646  push_choice_point(type_disj, result,(ptr_psi_term) decodedType,(GENERIC) NULL);
647 
648  resid_aim = NULL;
649  push_goal(unify,result,other,NULL);
650  return TRUE;
651 }
652 
653 
654 
655 void insert_type_builtins() /* RM: Jan 29 1993 */
656 {
657  /* Sort comparisons */
659  new_built_in(syntax_module,":<",(def_type)function_it,c_isa_lt);
660  new_built_in(syntax_module,":>=",(def_type)function_it,c_isa_ge);
661  new_built_in(syntax_module,":>",(def_type)function_it,c_isa_gt);
662  new_built_in(syntax_module,":==",(def_type)function_it,c_isa_eq);
663  new_built_in(syntax_module,":><",(def_type)function_it,c_isa_cmp);
664  new_built_in(syntax_module,":\\=<",(def_type)function_it,c_isa_nle);
665  new_built_in(syntax_module,":\\<",(def_type)function_it,c_isa_nlt);
666  new_built_in(syntax_module,":\\>=",(def_type)function_it,c_isa_nge);
667  new_built_in(syntax_module,":\\>",(def_type)function_it,c_isa_ngt);
668  new_built_in(syntax_module,":\\==",(def_type)function_it,c_isa_neq);
669  new_built_in(syntax_module,":\\><",(def_type)function_it,c_isa_ncmp);
670 
671 
672  /* Type checks */
673  new_built_in(bi_module,"is_value",(def_type)function_it,c_is_value);
674  new_built_in(bi_module,"is_number",(def_type)function_it,c_is_number);
675  new_built_in(bi_module,"is_function",(def_type)function_it,c_is_function);
676  new_built_in(bi_module,"is_predicate",(def_type)function_it,c_is_predicate);
677  new_built_in(bi_module,"is_sort",(def_type)function_it,c_is_sort);
678  new_built_in(bi_module,"is_persistent",(def_type)function_it,c_is_persistent);
679 
680  /* Sort hierarchy maneuvering */
681  new_built_in(bi_module,"children",(def_type)function_it,c_children);
682  new_built_in(bi_module,"parents",(def_type)function_it,c_parents);
683  new_built_in(bi_module,"least_sorts",(def_type)function_it,c_smallest);
685  new_built_in(bi_module,"glb",(def_type)function_it,c_glb);
686  new_built_in(bi_module,"lub",(def_type)function_it,c_lub);
687 }
ptr_psi_term makePsiTerm(ptr_definition x)
Definition: bi_sys.c:468
void new_built_in(ptr_module m, char *s, def_type t, long(*r)())
Definition: built_ins.c:5054
ptr_psi_term aaaa_1
Definition: def_struct.h:224
static long c_isa_cmp()
Definition: bi_type.c:344
#define predicate
Definition: def_const.h:361
#define function_it
Definition: def_const.h:362
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
Definition: login.c:37
int isSubTypeValue(ptr_psi_term arg1, ptr_psi_term arg2)
Definition: bi_type.c:163
static long c_smallest()
Definition: bi_type.c:149
static long isa(ptr_psi_term arg1, ptr_psi_term arg2)
Definition: bi_type.c:196
struct wl_definition * def_type
Definition: def_struct.h:32
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
Definition: built_ins.c:47
void insert_type_builtins()
Definition: bi_type.c:655
void residuate(ptr_psi_term t)
Definition: lefun.c:113
#define least_sel
Definition: def_const.h:6
long c_lub()
Definition: bi_type.c:614
#define isa_nlt_sel
Definition: def_const.h:305
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
Definition: types.c:1388
void push_choice_point(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
Definition: login.c:591
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
Definition: login.c:555
#define isa_eq_sel
Definition: def_const.h:303
static long c_is_number()
Definition: bi_type.c:490
static long c_is_predicate()
Definition: bi_type.c:413
static long c_isa_lt()
Definition: bi_type.c:299
#define global
Definition: def_const.h:364
void unify_bool_result(ptr_psi_term t, long v)
Definition: built_ins.c:329
static long c_isa_ncmp()
Definition: bi_type.c:349
long c_glb()
Definition: bi_type.c:553
ptr_int_list decode(ptr_int_list c)
Definition: types.c:1678
long reportAndAbort(ptr_psi_term g, char *s)
Definition: error.c:732
def_type type_def
Definition: def_struct.h:133
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
Definition: types.c:1565
#define set_empty
Definition: def_const.h:193
#define isa_le_sel
Definition: def_const.h:299
void get_one_arg(ptr_node t, ptr_psi_term *a)
Definition: login.c:86
#define set_1
Definition: def_const.h:194
ptr_definition top
Definition: def_glob.h:106
void curry()
Definition: lefun.c:157
#define NULL
Definition: def_const.h:203
ptr_goal resid_aim
Definition: def_glob.h:220
#define REAL
Definition: def_const.h:72
static long c_children()
Definition: bi_type.c:26
static long c_isa_nle()
Definition: bi_type.c:319
long sub_type(ptr_definition t1, ptr_definition t2)
Definition: types.c:1544
#define isa_nge_sel
Definition: def_const.h:306
#define isa_ngt_sel
Definition: def_const.h:307
#define type_it
Definition: def_const.h:363
void Errorline(char *format,...)
Definition: error.c:414
#define set_1_2
Definition: def_const.h:196
ptr_definition real
Definition: def_glob.h:102
#define greatest_sel
Definition: def_const.h:7
#define deref_ptr(P)
Definition: def_macro.h:95
#define isa_neq_sel
Definition: def_const.h:308
static long c_isa_ge()
Definition: bi_type.c:304
#define TRUE
Definition: def_const.h:127
long c_isa_subsort()
Definition: bi_type.c:515
static long c_isa_nlt()
Definition: bi_type.c:324
static long c_isa_ngt()
Definition: bi_type.c:334
static long c_isa_gt()
Definition: bi_type.c:309
ptr_definition integer
Definition: def_glob.h:93
ptr_psi_term global_value
Definition: def_struct.h:141
#define FALSE
Definition: def_const.h:128
#define deref(P)
Definition: def_macro.h:142
ptr_int_list lub(ptr_psi_term a, ptr_psi_term b, ptr_psi_term *pp)
Definition: lub.c:150
ptr_definition quoted_string
Definition: def_glob.h:101
struct wl_definition * ptr_definition
Definition: def_struct.h:31
ptr_psi_term stack_psi_term(long stat)
Definition: lefun.c:15
GENERIC value_3
Definition: def_struct.h:170
ptr_module syntax_module
Definition: def_glob.h:159
ptr_psi_term stack_nil()
Definition: built_ins.c:29
ptr_goal aim
Definition: def_glob.h:49
static long c_is_value()
Definition: bi_type.c:465
GENERIC heap_pointer
Definition: def_glob.h:12
#define isa_cmp_sel
Definition: def_const.h:309
static long c_isa_nge()
Definition: bi_type.c:329
#define unify
Definition: def_const.h:274
#define isa_nle_sel
Definition: def_const.h:304
static long c_parents()
Definition: bi_type.c:89
static long c_is_sort()
Definition: bi_type.c:438
#define deref_args(P, S)
Definition: def_macro.h:145
#define isa_ge_sel
Definition: def_const.h:301
ptr_psi_term collect_symbols(long sel)
Definition: built_ins.c:3446
ptr_definition cut
Definition: def_glob.h:83
static long c_is_function()
Definition: bi_type.c:359
static long isa_select(ptr_psi_term arg1, ptr_psi_term arg2, long sel)
Definition: bi_type.c:224
static long c_isa_eq()
Definition: bi_type.c:314
static long c_isa_main(long sel)
Definition: bi_type.c:264
#define type_disj
Definition: def_const.h:284
ptr_module bi_module
Definition: def_glob.h:155
#define isa_gt_sel
Definition: def_const.h:302
long isValue(ptr_psi_term p)
Definition: bi_type.c:541
static long c_isa_le()
Definition: bi_type.c:294
ptr_definition type
Definition: def_struct.h:165
static long c_is_persistent()
Definition: bi_type.c:384
#define isa_lt_sel
Definition: def_const.h:300
GENERIC value_1
Definition: def_struct.h:54
ptr_psi_term bbbb_1
Definition: def_struct.h:225
#define isa_ncmp_sel
Definition: def_const.h:310
unsigned long * GENERIC
Definition: def_struct.h:17
static long c_isa_neq()
Definition: bi_type.c:339
long hidden_type(ptr_definition t)
Definition: built_ins.c:3421
ptr_int_list children
Definition: def_struct.h:131
ptr_node attr_list
Definition: def_struct.h:171
ptr_int_list next
Definition: def_struct.h:55
ptr_int_list parents
Definition: def_struct.h:130