least upper bound of the root sorts of two psi terms More...
Go to the source code of this file.
Functions | |
ptr_int_list | appendIntList (ptr_int_list tail, ptr_int_list more) |
appendIntList More... | |
void | mark_ancestors (ptr_definition def, long *flags) |
mark_ancestors More... | |
static long | bfs (ptr_definition p, ptr_int_list ans, ptr_int_list pattern, long *flags) |
bfs More... | |
static ptr_int_list | makeUnitList (ptr_definition x) |
makeUnitList More... | |
ptr_int_list | lub (ptr_psi_term a, ptr_psi_term b, ptr_psi_term *pp) |
least upper bound of the root sorts of two psi terms
lub.c - find least upper bound of the root sorts of two psi terms
Definition in file lub.c.
ptr_int_list appendIntList | ( | ptr_int_list | tail, |
ptr_int_list | more | ||
) |
appendIntList
tail | - ptr_int_list tail |
more | - ptr_int_list more |
attach copies of more to tail
Definition at line 40 of file lub.c.
References wl_int_list::next, NULL, STACK_ALLOC, and wl_int_list::value_1.
|
static |
bfs
p | - ptr_definition p |
ans | - ptr_int_list ans |
pattern | - ptr_int_list pattern |
flags | - long *flags) |
Definition at line 88 of file lub.c.
References appendIntList(), assert, bit_length(), built_in, mark_ancestors(), wl_int_list::next, NULL, or_codes(), wl_definition::parents, STACK_ALLOC, sub_CodeType(), top, and wl_int_list::value_1.
ptr_int_list lub | ( | ptr_psi_term | a, |
ptr_psi_term | b, | ||
ptr_psi_term * | pp | ||
) |
Definition at line 173 of file lub.c.
References bfs(), wl_definition::code, copyTypeCode(), decode(), isSubTypeValue(), isValue(), makeUnitList(), NULL, or_codes(), stack_alloc(), sub_type(), top, wl_psi_term::type, and type_count.
|
static |
makeUnitList
x | - ptr_definition x |
make a decoded type list from one type
Definition at line 152 of file lub.c.
References wl_int_list::next, NULL, STACK_ALLOC, and wl_int_list::value_1.
void mark_ancestors | ( | ptr_definition | def, |
long * | flags | ||
) |
mark_ancestors
def | - ptr_definition def |
flags | - long *flags |
Set flags bit for all ancestors (i.e., higher up) of head
Definition at line 60 of file lub.c.
References bit_length(), wl_definition::code, wl_int_list::next, wl_definition::parents, and wl_int_list::value_1.