175 ans=( *(
REAL *)arg1->value_3 == *(
REAL *)arg2->value_3);
178 ans=(strcmp((
char *)arg1->value_3,(
char *)arg2->value_3)==0);
185 if (arg1->value_3 && (arg1->type==
real || arg1->type==
integer)) {
187 ans=(*(
REAL *)arg1->value_3 == floor(*(
REAL *)arg1->value_3));
196 static long isa(arg1,arg2)
201 if ( arg1->type==arg2->type
204 && (arg1->value_3 || arg2->value_3)
214 (void)
matches(arg1->type, arg2->type, &ans);
267 long success=
TRUE,ans;
361 int success=
TRUE,ans;
386 int success=
TRUE,ans;
415 int success=
TRUE,ans;
440 int success=
TRUE,ans;
467 long success=
TRUE,ans;
492 long success=
TRUE,ans;
544 return (p->value_3 !=
NULL);
565 if ((!arg1) || (!arg2)) {
575 if ((ret=
glb(arg1->
type, arg2->
type, &ans, &complexType)) == 0)
584 decodedType =
decode(complexType);
586 decodedType = decodedType->
next;
595 Errorline(
"glb of multiple-inheritance value sorts not yet implemented.\n");
624 if ((!arg1) || (!arg2))
637 decodedType =
lub(arg1, arg2, &other);
641 decodedType = decodedType->
next;
ptr_psi_term makePsiTerm(ptr_definition x)
void new_built_in(ptr_module m, char *s, def_type t, long(*r)())
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
int isSubTypeValue(ptr_psi_term arg1, ptr_psi_term arg2)
static long isa(ptr_psi_term arg1, ptr_psi_term arg2)
struct wl_definition * def_type
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
void insert_type_builtins()
void residuate(ptr_psi_term t)
long glb(ptr_definition t1, ptr_definition t2, ptr_definition *t3, ptr_int_list *c3)
void push_choice_point(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
static long c_is_number()
static long c_is_predicate()
void unify_bool_result(ptr_psi_term t, long v)
ptr_int_list decode(ptr_int_list c)
long reportAndAbort(ptr_psi_term g, char *s)
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
void get_one_arg(ptr_node t, ptr_psi_term *a)
long sub_type(ptr_definition t1, ptr_definition t2)
void Errorline(char *format,...)
ptr_psi_term global_value
ptr_int_list lub(ptr_psi_term a, ptr_psi_term b, ptr_psi_term *pp)
ptr_definition quoted_string
struct wl_definition * ptr_definition
ptr_psi_term stack_psi_term(long stat)
ptr_psi_term collect_symbols(long sel)
static long c_is_function()
static long isa_select(ptr_psi_term arg1, ptr_psi_term arg2, long sel)
static long c_isa_main(long sel)
long isValue(ptr_psi_term p)
static long c_is_persistent()
long hidden_type(ptr_definition t)