18static char SccsId[] =
"%W% %G%";
138 Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
"evaluating infinity");
139 P = (
yamop *)FAILCODE;
142 if (isoLanguageFlag()) {
143 Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
"evaluating infinity");
144 P = (
yamop *)FAILCODE;
154 Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
"evaluating infinity");
157 if (isoLanguageFlag()) {
158 Yap_ArithError(TYPE_ERROR_EVALUABLE, TermNil,
"evaluating not-a-number");
167 RFLOAT(Yap_random());
171 RFLOAT((Float)Yap_cputime()/1000.0);
194 RINT(LCL0 - (CELL *)B);
212 RINT(((CELL *)TR)-LCL0);
218 RINT(Unsigned(ASP) - Unsigned(HR));
233Term Yap_eval_atom(Int f)
249 {
"random", op_random},
250 {
"cputime", op_cputime},
251 {
"heapused", op_heapused},
252 {
"local_sp", op_localsp},
253 {
"global_sp", op_globalsp},
254 {
"$last_choice_pt", op_b},
257 {
"stackfree", op_stackfree},
261Yap_InitConstExps(
void)
266 for (i = 0; i <
sizeof(InitConstTab)/
sizeof(
InitConstEntry); ++i) {
267 AtomEntry *ae = RepAtom(Yap_LookupAtom(InitConstTab[i].OpName));
269 Yap_EvalError(RESOURCE_ERROR_HEAP,TermNil,
"at InitConstExps");
272 WRITE_LOCK(ae->ARWLock);
273 if (Yap_GetExpPropHavingLock(ae, 0)) {
274 WRITE_UNLOCK(ae->ARWLock);
278 p->KindOfPE = ExpProperty;
281 p->FOfEE = InitConstTab[i].f;
283 WRITE_UNLOCK(ae->ARWLock);
289Yap_ReInitConstExps(
void)
arith0_op
constant operators