C:/Users/Dennis/src/lang/Life_start/Life/life-1.02/source/bi_type.c File Reference

#include "extern.h"
#include "trees.h"
#include "login.h"
#include "parser.h"
#include "copy.h"
#include "token.h"
#include "print.h"
#include "lefun.h"
#include "memory.h"
#include "modules.h"
#include "built_ins.h"
#include "error.h"

Go to the source code of this file.

Defines

#define isa_le_sel   0
#define isa_lt_sel   1
#define isa_ge_sel   2
#define isa_gt_sel   3
#define isa_eq_sel   4
#define isa_nle_sel   5
#define isa_nlt_sel   6
#define isa_nge_sel   7
#define isa_ngt_sel   8
#define isa_neq_sel   9
#define isa_cmp_sel   10
#define isa_ncmp_sel   11

Functions

static long c_children ()
static long c_parents ()
static long c_smallest ()
 isSubTypeValue (ptr_psi_term arg1, ptr_psi_term arg2)
static long isa (ptr_psi_term arg1, ptr_psi_term arg2)
static long isa_select (ptr_psi_term arg1, ptr_psi_term arg2, long sel)
static long c_isa_main (long sel)
static long c_isa_le ()
static long c_isa_lt ()
static long c_isa_ge ()
static long c_isa_gt ()
static long c_isa_eq ()
static long c_isa_nle ()
static long c_isa_nlt ()
static long c_isa_nge ()
static long c_isa_ngt ()
static long c_isa_neq ()
static long c_isa_cmp ()
static long c_isa_ncmp ()
static int c_is_function ()
static int c_is_persistent ()
static int c_is_predicate ()
static int c_is_sort ()
static long c_is_value ()
static long c_is_number ()
 c_isa_subsort ()
 isValue (ptr_psi_term p)
 c_glb ()
 c_lub ()
void insert_type_builtins ()

Variables

static char vcid [] = "$Id: bi_type.c,v 1.2 1994/12/08 23:08:52 duchier Exp $"


Define Documentation

#define isa_cmp_sel   10

Definition at line 257 of file bi_type.c.

Referenced by c_isa_cmp(), and isa_select().

#define isa_eq_sel   4

Definition at line 251 of file bi_type.c.

Referenced by c_isa_eq(), and isa_select().

#define isa_ge_sel   2

Definition at line 249 of file bi_type.c.

Referenced by c_isa_ge(), and isa_select().

#define isa_gt_sel   3

Definition at line 250 of file bi_type.c.

Referenced by c_isa_gt(), and isa_select().

#define isa_le_sel   0

Definition at line 247 of file bi_type.c.

Referenced by c_isa_le(), and isa_select().

#define isa_lt_sel   1

Definition at line 248 of file bi_type.c.

Referenced by c_isa_lt(), and isa_select().

#define isa_ncmp_sel   11

Definition at line 258 of file bi_type.c.

Referenced by c_isa_ncmp(), and isa_select().

#define isa_neq_sel   9

Definition at line 256 of file bi_type.c.

Referenced by c_isa_neq(), and isa_select().

#define isa_nge_sel   7

Definition at line 254 of file bi_type.c.

Referenced by c_isa_nge(), and isa_select().

#define isa_ngt_sel   8

Definition at line 255 of file bi_type.c.

Referenced by c_isa_ngt(), and isa_select().

#define isa_nle_sel   5

Definition at line 252 of file bi_type.c.

Referenced by c_isa_nle(), and isa_select().

#define isa_nlt_sel   6

Definition at line 253 of file bi_type.c.

Referenced by c_isa_nlt(), and isa_select().


Function Documentation

static long c_children (  )  [static]

Definition at line 50 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, wl_definition::children, collect_symbols(), curry(), deref, deref_args, deref_ptr, get_two_args(), greatest_sel, hidden_type(), wl_int_list::next, NULL, push_goal(), real, resid_aim, set_1, stack_cons(), stack_nil(), stack_psi_term(), top, TRUE, wl_psi_term::type, unify, wl_int_list::value, and wl_psi_term::value.

Referenced by insert_type_builtins().

c_glb (  ) 

Definition at line 590 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), decode(), deref, deref_args, deref_ptr, Errorline(), FALSE, get_two_args(), glb(), isSubTypeValue(), isValue(), makePsiTerm(), wl_int_list::next, NULL, push_choice_point(), push_goal(), resid_aim, set_1_2, TRUE, wl_psi_term::type, type_disj, unify, wl_psi_term::value, and wl_int_list::value.

Referenced by insert_type_builtins().

static int c_is_function (  )  [static]

Definition at line 396 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, function, get_one_arg(), set_1, TRUE, wl_definition::type, wl_psi_term::type, and unify_bool_result().

Referenced by init_built_in_types(), and insert_type_builtins().

static long c_is_number (  )  [static]

Definition at line 527 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_two_args(), NULL, real, set_1, sub_type(), TRUE, wl_psi_term::type, unify_bool_result(), and wl_psi_term::value.

Referenced by insert_type_builtins().

static int c_is_persistent (  )  [static]

Definition at line 421 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_one_arg(), global, wl_definition::global_value, heap_pointer, set_1, TRUE, wl_definition::type, wl_psi_term::type, and unify_bool_result().

Referenced by insert_type_builtins().

static int c_is_predicate (  )  [static]

Definition at line 450 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_one_arg(), predicate, set_1, TRUE, wl_definition::type, wl_psi_term::type, and unify_bool_result().

Referenced by init_built_in_types(), and insert_type_builtins().

static int c_is_sort (  )  [static]

Definition at line 475 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_one_arg(), set_1, TRUE, type, wl_definition::type, wl_psi_term::type, and unify_bool_result().

Referenced by init_built_in_types(), and insert_type_builtins().

static long c_is_value (  )  [static]

Definition at line 502 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_two_args(), NULL, set_1, TRUE, unify_bool_result(), and wl_psi_term::value.

Referenced by insert_type_builtins().

static long c_isa_cmp (  )  [static]

Definition at line 381 of file bi_type.c.

References c_isa_main(), and isa_cmp_sel.

Referenced by insert_type_builtins().

static long c_isa_eq (  )  [static]

Definition at line 351 of file bi_type.c.

References c_isa_main(), and isa_eq_sel.

Referenced by insert_type_builtins().

static long c_isa_ge (  )  [static]

Definition at line 341 of file bi_type.c.

References c_isa_main(), and isa_ge_sel.

Referenced by insert_type_builtins().

static long c_isa_gt (  )  [static]

Definition at line 346 of file bi_type.c.

References c_isa_main(), and isa_gt_sel.

Referenced by insert_type_builtins().

static long c_isa_le (  )  [static]

Definition at line 331 of file bi_type.c.

References c_isa_main(), and isa_le_sel.

Referenced by insert_type_builtins().

static long c_isa_lt (  )  [static]

Definition at line 336 of file bi_type.c.

References c_isa_main(), and isa_lt_sel.

Referenced by insert_type_builtins().

static long c_isa_main ( long  sel  )  [static]

Definition at line 301 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_two_args(), isa_select(), set_1_2, TRUE, and unify_bool_result().

Referenced by c_isa_cmp(), c_isa_eq(), c_isa_ge(), c_isa_gt(), c_isa_le(), c_isa_lt(), c_isa_ncmp(), c_isa_neq(), c_isa_nge(), c_isa_ngt(), c_isa_nle(), and c_isa_nlt().

static long c_isa_ncmp (  )  [static]

Definition at line 386 of file bi_type.c.

References c_isa_main(), and isa_ncmp_sel.

Referenced by insert_type_builtins().

static long c_isa_neq (  )  [static]

Definition at line 376 of file bi_type.c.

References c_isa_main(), and isa_neq_sel.

Referenced by insert_type_builtins().

static long c_isa_nge (  )  [static]

Definition at line 366 of file bi_type.c.

References c_isa_main(), and isa_nge_sel.

Referenced by insert_type_builtins().

static long c_isa_ngt (  )  [static]

Definition at line 371 of file bi_type.c.

References c_isa_main(), and isa_ngt_sel.

Referenced by insert_type_builtins().

static long c_isa_nle (  )  [static]

Definition at line 356 of file bi_type.c.

References c_isa_main(), and isa_nle_sel.

Referenced by insert_type_builtins().

static long c_isa_nlt (  )  [static]

Definition at line 361 of file bi_type.c.

References c_isa_main(), and isa_nlt_sel.

Referenced by insert_type_builtins().

c_isa_subsort (  ) 

Definition at line 552 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, deref, deref_args, deref_ptr, FALSE, get_two_args(), isa(), reportAndAbort(), residuate(), set_1_2, and TRUE.

Referenced by insert_type_builtins().

c_lub (  ) 

Definition at line 651 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_two_args(), lub(), makePsiTerm(), wl_int_list::next, NULL, push_choice_point(), push_goal(), resid_aim, set_1_2, TRUE, type_disj, unify, and wl_int_list::value.

Referenced by insert_type_builtins().

static long c_parents (  )  [static]

Definition at line 113 of file bi_type.c.

References wl_goal::a, aim, wl_psi_term::attr_list, wl_goal::b, curry(), deref, deref_args, deref_ptr, get_two_args(), hidden_type(), integer, wl_int_list::next, NULL, wl_definition::parents, push_goal(), quoted_string, real, resid_aim, set_1, stack_cons(), stack_nil(), stack_psi_term(), top, TRUE, wl_psi_term::type, unify, wl_int_list::value, and wl_psi_term::value.

Referenced by insert_type_builtins().

static long c_smallest (  )  [static]

Definition at line 173 of file bi_type.c.

References wl_goal::a, aim, wl_goal::b, collect_symbols(), deref_args, least_sel, NULL, push_goal(), set_empty, TRUE, and unify.

Referenced by insert_type_builtins().

void insert_type_builtins (  ) 

Definition at line 692 of file bi_type.c.

References bi_module, c_children(), c_glb(), c_is_function(), c_is_number(), c_is_persistent(), c_is_predicate(), c_is_sort(), c_is_value(), c_isa_cmp(), c_isa_eq(), c_isa_ge(), c_isa_gt(), c_isa_le(), c_isa_lt(), c_isa_ncmp(), c_isa_neq(), c_isa_nge(), c_isa_ngt(), c_isa_nle(), c_isa_nlt(), c_isa_subsort(), c_lub(), c_parents(), c_smallest(), function, new_built_in(), predicate, and syntax_module.

Referenced by init_built_in_types().

static long isa ( ptr_psi_term  arg1,
ptr_psi_term  arg2 
) [static]

Definition at line 220 of file bi_type.c.

References cut, integer, isSubTypeValue(), matches(), real, TRUE, and wl_definition::type.

Referenced by c_isa_subsort(), and isa_select().

static long isa_select ( ptr_psi_term  arg1,
ptr_psi_term  arg2,
long  sel 
) [static]

Definition at line 261 of file bi_type.c.

References isa(), isa_cmp_sel, isa_eq_sel, isa_ge_sel, isa_gt_sel, isa_le_sel, isa_lt_sel, isa_ncmp_sel, isa_neq_sel, isa_nge_sel, isa_ngt_sel, isa_nle_sel, and isa_nlt_sel.

Referenced by c_isa_main().

isSubTypeValue ( ptr_psi_term  arg1,
ptr_psi_term  arg2 
)

Definition at line 187 of file bi_type.c.

References FALSE, integer, quoted_string, REAL, real, TRUE, and wl_definition::type.

Referenced by c_glb(), isa(), and lub().

isValue ( ptr_psi_term  p  ) 

Definition at line 578 of file bi_type.c.

References NULL.

Referenced by c_glb(), and lub().


Variable Documentation

char vcid[] = "$Id: bi_type.c,v 1.2 1994/12/08 23:08:52 duchier Exp $" [static]

Definition at line 22 of file bi_type.c.


Generated on Sat Jan 26 08:48:08 2008 for WildLife by  doxygen 1.5.4