10 #define copyPsiTerm(a,b) (ptr_psi_term )memcpy(a,b,sizeof(psi_term))
49 Errorline(
"bad first argument in %P.\n",t);
65 Errorline(
"bad second argument in %P.\n",t);
122 printf(
"*** Verbose mode is turned ");
123 printf(
verbose?
"on.\n":
"off.\n");
220 thetime=(
life_end.tms_utime-life_start.tms_utime)/60.0;
222 success=(val==thetime);
250 gettimeofday(&tp, &tzp);
251 thetime=(
REAL)tp.tv_sec + ((
REAL)tp.tv_usec/1000000.0);
254 success=(val==thetime);
282 gettimeofday(&tp, &tzp);
283 thetime=localtime((time_t *) &(tp.tv_sec));
321 printf(
"Stack size : %8ld bytes (%5ldK) (%ld%%)\n",t1,t1/1024,100*t1/t3);
322 printf(
"Heap size : %8ld bytes (%5ldK) (%ld%%)\n",t2,t2/1024,100*t2/t3);
323 printf(
"Total memory: %8ld bytes (%5ldK)\n",t3,t3/1024);
326 printf(
"X predicates are installed.\n");
328 printf(
"X predicates are not installed.\n");
376 s=getenv((
char *)arg1->
value_3);
389 Errorline(
"argument missing in %P\n",funct);
419 Errorline(
"could not execute shell in %P.\n",funct);
428 Errorline(
"bad argument in %P.\n",funct);
432 Errorline(
"bad argument in %P.\n",funct);
599 head=(*nextFunc)(head);
672 if ((!arg1)||(!arg2)) {
673 Errorline(
"%P requires two arguments.\n",pred);
708 if ((!arg1)||(!arg2)) {
709 Errorline(
"%P requires two arguments.\n",pred);
732 Errorline(
"%P should be a nil-terminated list in mresiduate.\n",arg1);
ptr_psi_term makePsiTerm(ptr_definition x)
void new_built_in(ptr_module m, char *s, def_type t, long(*r)())
new_built_in
static long c_mresiduate()
c_mresiduate
GENERIC unitListNext()
set unitListElement to NULL & return NULL
static long c_garbage()
force garbage collection
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
stack_cons
static long c_step()
toggle trace single step
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
push_goal
static long c_realtime()
real time since 00:00:00 GMT, January 1, 1970
void unify_bool_result(ptr_psi_term t, long v)
unify_bool_result
#define copyPsiTerm(a, b)
long get_real_value(ptr_psi_term t, REAL *v, long *n)
get_real_value
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
long residuateGoalOnVar(ptr_goal g, ptr_psi_term var, ptr_psi_term othervar)
residuateGoalOnVar
void get_one_arg(ptr_node t, ptr_psi_term *a)
get_one_arg
struct tms life_start life_end
ptr_psi_term quotedStackCopy(psi_term p)
make psi term from unitListElement
void insert_system_builtins()
insert_system_builtins
ptr_psi_term unitListValue()
make psi term from unitListElement
static long c_verbose()
toggle verbose flag
void Errorline(char *format,...)
char * heap_copy_string(char *s)
void stack_add_int_attr(ptr_psi_term t, char *attrname, long value)
void set_trace_to_prove()
void infoline(char *format,...)
static long c_residuate()
c_residuate
static long c_getenv()
get value environment variable
ptr_definition quoted_string
ptr_psi_term stack_psi_term(long stat)
stack_psi_term
ptr_psi_term intListValue(ptr_int_list p)
make psi term from ptr_int_list [->value_1]
ptr_psi_term stack_nil()
stack_nil
ptr_goal makeGoal(ptr_psi_term p)
makeGoal
void mark_quote(ptr_psi_term t)
mark_quote
static long c_warning()
toggle warning flag
ptr_psi_term stack_copy_psi_term(psi_term t)
GENERIC residListNext(ptr_residuation p)
static long c_system()
pass string to system to execute
static long c_cputime()
cpu time used
struct wl_psi_term * ptr_psi_term
static long c_residList()
c_residList()
long unify_real_result(ptr_psi_term t, REAL v)
unify_real_result
GENERIC intListNext(ptr_int_list p)
return p->next
ptr_psi_term makePsiList(GENERIC head, ptr_psi_term(*valueFunc)(), GENERIC(*nextFunc)())
makePsiList
static long c_encode()
encode type
static long c_localtime()
localtime
static GENERIC unitListElement
ptr_psi_term residListGoalQuote(ptr_residuation p)
static long c_maxint()
return greatest exact integer
static long c_statistics()
wild_life stats
void setUnitList(GENERIC x)
set static unitListElement