documentation.

This commit is contained in:
Vitor Santos Costa 2017-07-24 18:20:00 +01:00
parent 023c254d03
commit 63a1957d8e
16 changed files with 337 additions and 367 deletions

View File

@ -540,7 +540,7 @@ Int p_compare(USES_REGS1) { /* compare(?Op,?T1,?T2) */
return Yap_unify_constant(ARG1, MkAtomTerm(p)); return Yap_unify_constant(ARG1, MkAtomTerm(p));
} }
/** @pred _X_ \== _Y_ is iso /** @pred X \== Y is iso
Terms _X_ and _Y_ are not strictly identical. Terms _X_ and _Y_ are not strictly identical.
*/ */
@ -548,7 +548,7 @@ static Int a_noteq(Term t1, Term t2) { return (compare(t1, t2) != 0); }
static Int a_gen_lt(Term t1, Term t2) { return (compare(t1, t2) < 0); } static Int a_gen_lt(Term t1, Term t2) { return (compare(t1, t2) < 0); }
/** @pred _X_ @=< _Y_ is iso /** @pred X @=< Y is iso
Term _X_ does not follow term _Y_ in the standard order. Term _X_ does not follow term _Y_ in the standard order.
@ -556,14 +556,14 @@ Term _X_ does not follow term _Y_ in the standard order.
*/ */
static Int a_gen_le(Term t1, Term t2) { return (compare(t1, t2) <= 0); } static Int a_gen_le(Term t1, Term t2) { return (compare(t1, t2) <= 0); }
/** @pred _X_ @> _Y_ is iso /** @pred X @> Y is iso
Term _X_ does not follow term _Y_ in the standard order Term _X_ does not follow term _Y_ in the standard order
*/ */
static Int a_gen_gt(Term t1, Term t2) { return compare(t1, t2) > 0; } static Int a_gen_gt(Term t1, Term t2) { return compare(t1, t2) > 0; }
/** @pred _X_ @>= _Y_ is iso /** @pred X @>= Y is iso
Term _X_ does not precede term _Y_ in the standard order. Term _X_ does not precede term _Y_ in the standard order.
*/ */
@ -778,7 +778,7 @@ static Int a_gt(Term t1, Term t2) { /* A > B */
} }
/** /**
@pred +_X_ >= +_Y_ is iso @pred +X >= +Y is iso
Greater than or equal to arithmetic expressions Greater than or equal to arithmetic expressions
The value of the expression _X_ is greater than or equal to the The value of the expression _X_ is greater than or equal to the
@ -791,7 +791,7 @@ static Int a_ge(Term t1, Term t2) { /* A >= B */
} }
/** /**
@pred +_X_ \< +_Y_ is iso @pred +X < +Y is iso
Lesser than arithmetic expressions Lesser than arithmetic expressions
The value of the expression _X_ is less than the value of expression The value of the expression _X_ is less than the value of expression
@ -806,7 +806,7 @@ static Int a_lt(Term t1, Term t2) { /* A < B */
/** /**
* *
@pred _X_ =< + _Y_ @pred +X =< +Y
Lesser than or equal to arithmetic expressions Lesser than or equal to arithmetic expressions

View File

@ -1658,7 +1658,7 @@ mark_environments(CELL_PTR gc_ENV, size_t size, CELL *pvbmap USES_REGS)
} }
} }
#endif #endif
mark_external_reference(saved_var PASS_REGS); mark_external_reference(saved_var PASS_REGS);
} }
bmap <<= 1; bmap <<= 1;
currv++; currv++;

View File

@ -1,379 +1,364 @@
#define EXECUTE_INSTINIT \ #define EXECUTE_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \ print_instruction((*_PREG), ON_NATIVE); \
BLOCKADDRESS = (CELL)(*_PREG); \ BLOCKADDRESS = (CELL)(*_PREG); \
register CELL d0; \ register CELL d0; \
PredEntry *pt0; \ PredEntry *pt0; \
register CELL *ENV_YREG = (YREG); \ register CELL *ENV_YREG = (YREG); \
pt0 = (*_PREG)->u.pp.p; pt0 = (*_PREG)->u.Osbpp.p;
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
#define EXECUTE_LOW_LEVEL_TRACER \ #define EXECUTE_LOW_LEVEL_TRACER low_level_trace(enter_pred, pt0, XREGS + 1);
low_level_trace(enter_pred,pt0,XREGS+1);
#endif #endif
#define EXECUTE_POST_LOW_LEVEL_TRACER \ #define EXECUTE_POST_LOW_LEVEL_TRACER \
CACHE_A1(); \ CACHE_A1(); \
ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); \ ALWAYS_LOOKAHEAD(pt0->OpcodeOfPred); \
d0 = (CELL)B; d0 = (CELL)B;
#define EXECUTE_POST_NOCHECKING \ #define EXECUTE_POST_NOCHECKING \
(*_PREG) = pt0->CodeOfPred; \ (*_PREG) = pt0->CodeOfPred; \
save_pc(); \ save_pc(); \
ENV_YREG[E_CB] = d0; ENV_YREG[E_CB] = d0;
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define EXECUTE_DEPTH_MINOR \ #define EXECUTE_DEPTH_MINOR \
FAILED = 0; \ FAILED = 0; \
if (pt0->ModuleOfPred) { \ if (pt0->ModuleOfPred) { \
if (DEPTH == MkIntTerm(0)) { \ if (DEPTH == MkIntTerm(0)) { \
YAAM_FAIL; \ YAAM_FAIL; \
} \ } else { \
else { \ DEPTH = RESET_DEPTH(); \
DEPTH = RESET_DEPTH(); \ } \
} \ }
}
#define EXECUTE_DEPTH_MOFPRED \
FAILED = 0; \
DEPTH -= MkIntConstant(2);
#define EXECUTE_DEPTH_END \ #define EXECUTE_DEPTH_MOFPRED \
FAILED = 0; FAILED = 0; \
DEPTH -= MkIntConstant(2);
#define EXECUTE_DEPTH_END FAILED = 0;
#endif #endif
#define EXECUTE_END_END \ #define EXECUTE_END_END \
BLOCK = (CELL)EXECUTE_END_END; \ BLOCK = (CELL)EXECUTE_END_END; \
if (!FAILED) { \ if (!FAILED) { \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} \ }
#define DEXECUTE_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \
BLOCKADDRESS = (CELL)(*_PREG);
#define DEXECUTE_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \
BLOCKADDRESS = (CELL)(*_PREG); \
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
#define DEXECUTE_LOW_LEVEL_TRACER \ #define DEXECUTE_LOW_LEVEL_TRACER \
low_level_trace(enter_pred,(*_PREG)->u.pp.p,XREGS+1); low_level_trace(enter_pred, (*_PREG)->u.Osbpp.p, XREGS + 1);
#endif #endif
#define DEXECUTE_POST_LOW_LEVEL_TRACER \ #define DEXECUTE_POST_LOW_LEVEL_TRACER \
CACHE_Y_AS_ENV(YREG); \ CACHE_Y_AS_ENV(YREG); \
PredEntry *pt0; \ PredEntry *pt0; \
CACHE_A1(); \ CACHE_A1(); \
pt0 = (*_PREG)->u.pp.p; pt0 = (*_PREG)->u.Osbpp.p;
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define DEXECUTE_DEPTH_MINOR \ #define DEXECUTE_DEPTH_MINOR \
FAILED = 0; \ FAILED = 0; \
if (pt0->ModuleOfPred) { \ if (pt0->ModuleOfPred) { \
if (DEPTH == MkIntTerm(0)) { \ if (DEPTH == MkIntTerm(0)) { \
YAAM_FAIL; \ YAAM_FAIL; \
} \ } else { \
else { \ DEPTH = RESET_DEPTH(); \
DEPTH = RESET_DEPTH(); \ } \
} \ }
}
#define DEXECUTE_DEPTH_MOFPRED \
#define DEXECUTE_DEPTH_MOFPRED \ FAILED = 0; \
FAILED = 0; \ DEPTH -= MkIntConstant(2);
DEPTH -= MkIntConstant(2);
#define DEXECUTE_DEPTH_END FAILED = 0;
#define DEXECUTE_DEPTH_END \
FAILED = 0;
#endif #endif
#ifdef FROZEN_STACKS #ifdef FROZEN_STACKS
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
#define DEXECUTE_END_END \ #define DEXECUTE_END_END \
BLOCK = (CELL)DEXECUTE_END_END; \ BLOCK = (CELL)DEXECUTE_END_END; \
if (!FAILED) { \ if (!FAILED) { \
(*_PREG) = pt0->CodeOfPred; \ (*_PREG) = pt0->CodeOfPred; \
save_pc(); \ save_pc(); \
(*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ (*_CPREG) = (yamop *)ENV_YREG[E_CP]; \
ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; \ ENV_YREG = ENV = (CELL *)ENV_YREG[E_E]; \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) { \ if (ENV_YREG > (CELL *)top_b || ENV_YREG < HR) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } else { \
else { \ ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size((*_CPREG))); \
ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size((*_CPREG))); \ } \
} \ WRITEBACK_Y_AS_ENV(); \
WRITEBACK_Y_AS_ENV(); \ ENV_YREG[E_CB] = (CELL)B; \
ENV_YREG[E_CB] = (CELL) B; \ ALWAYS_GONext(); \
ALWAYS_GONext(); \ } \
} \ ENDCACHE_Y_AS_ENV();
ENDCACHE_Y_AS_ENV();
#else /* YAPOR_SBA */ #else /* YAPOR_SBA */
#define DEXECUTE_END_END \ #define DEXECUTE_END_END \
BLOCK = (CELL)DEXECUTE_END_END; \ BLOCK = (CELL)DEXECUTE_END_END; \
if (!FAILED) { \ if (!FAILED) { \
(*_PREG) = pt0->CodeOfPred; \ (*_PREG) = pt0->CodeOfPred; \
save_pc(); \ save_pc(); \
(*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ (*_CPREG) = (yamop *)ENV_YREG[E_CP]; \
ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; \ ENV_YREG = ENV = (CELL *)ENV_YREG[E_E]; \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b) { \ if (ENV_YREG > (CELL *)top_b) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } else { \
else { \ ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size((*_CPREG))); \
ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size((*_CPREG))); \ } \
} \ WRITEBACK_Y_AS_ENV(); \
WRITEBACK_Y_AS_ENV(); \ ENV_YREG[E_CB] = (CELL)B; \
ENV_YREG[E_CB] = (CELL) B; \ ALWAYS_GONext(); \
ALWAYS_GONext(); \ } \
} \ ENDCACHE_Y_AS_ENV();
ENDCACHE_Y_AS_ENV();
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
#else /* FROZEN_STACKS */ #else /* FROZEN_STACKS */
#define DEXECUTE_END_END \ #define DEXECUTE_END_END \
BLOCK = (CELL)DEXECUTE_END_END; \ BLOCK = (CELL)DEXECUTE_END_END; \
if (!FAILED) { \ if (!FAILED) { \
(*_PREG) = pt0->CodeOfPred; \ (*_PREG) = pt0->CodeOfPred; \
save_pc(); \ save_pc(); \
(*_CPREG) = (yamop *) ENV_YREG[E_CP]; \ (*_CPREG) = (yamop *)ENV_YREG[E_CP]; \
ENV_YREG = ENV = (CELL *) ENV_YREG[E_E]; \ ENV_YREG = ENV = (CELL *)ENV_YREG[E_E]; \
if (ENV_YREG > (CELL *)B) { \ if (ENV_YREG > (CELL *)B) { \
ENV_YREG = (CELL *)B; \ ENV_YREG = (CELL *)B; \
} \ } else { \
else { \ ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size((*_CPREG))); \
ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size((*_CPREG))); \ } \
} \ WRITEBACK_Y_AS_ENV(); \
WRITEBACK_Y_AS_ENV(); \ ENV_YREG[E_CB] = (CELL)B; \
ENV_YREG[E_CB] = (CELL) B; \ ALWAYS_GONext(); \
ALWAYS_GONext(); \ } \
} \ ENDCACHE_Y_AS_ENV();
ENDCACHE_Y_AS_ENV();
#endif /* FROZEN_STACKS */ #endif /* FROZEN_STACKS */
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define FCALL_INST \ #define FCALL_INST \
CACHE_Y_AS_ENV(YREG); \ CACHE_Y_AS_ENV(YREG); \
ENV_YREG[E_CP] = (CELL) (*_CPREG); \ ENV_YREG[E_CP] = (CELL)(*_CPREG); \
ENV_YREG[E_E] = (CELL) ENV; \ ENV_YREG[E_E] = (CELL)ENV; \
ENV_YREG[E_DEPTH] = DEPTH; \ ENV_YREG[E_DEPTH] = DEPTH; \
ENDCACHE_Y_AS_ENV(); ENDCACHE_Y_AS_ENV();
#else /* DEPTH_LIMIT */ #else /* DEPTH_LIMIT */
#define FCALL_INST \ #define FCALL_INST \
CACHE_Y_AS_ENV(YREG); \ CACHE_Y_AS_ENV(YREG); \
ENV_YREG[E_CP] = (CELL) (*_CPREG); \ ENV_YREG[E_CP] = (CELL)(*_CPREG); \
ENV_YREG[E_E] = (CELL) ENV; \ ENV_YREG[E_E] = (CELL)ENV; \
ENDCACHE_Y_AS_ENV(); ENDCACHE_Y_AS_ENV();
#endif /* DEPTH_LIMIT */ #endif /* DEPTH_LIMIT */
#define CALL_INSTINIT \ #define CALL_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \ print_instruction((*_PREG), ON_NATIVE); \
BLOCKADDRESS = (CELL)(*_PREG); \ BLOCKADDRESS = (CELL)(*_PREG); \
if (Yap_op_from_opcode((*_PREG)->opc) == _fcall) { \ if (Yap_op_from_opcode((*_PREG)->opc) == _fcall) { \
FCALL_INST; \ FCALL_INST; \
} }
#ifdef LOW_LEVEL_TRACER #ifdef LOW_LEVEL_TRACER
#define CALL_LOW_LEVEL_TRACER \ #define CALL_LOW_LEVEL_TRACER \
low_level_trace(enter_pred,(*_PREG)->u.Osbpp.p,XREGS+1); low_level_trace(enter_pred, (*_PREG)->u.Osbpp.p, XREGS + 1);
#endif #endif
#define CALL_POST_LOW_LEVEL_TRACER \ #define CALL_POST_LOW_LEVEL_TRACER \
register CELL *ENV_YREG = (YREG); \ register CELL *ENV_YREG = (YREG); \
PredEntry *pt; \ PredEntry *pt; \
pt = (*_PREG)->u.Osbpp.p; \ pt = (*_PREG)->u.Osbpp.p; \
CACHE_A1(); CACHE_A1();
#define CALL_POST_NO_CHECKING \ #define CALL_POST_NO_CHECKING \
ENV = ENV_YREG; \ ENV = ENV_YREG; \
ENV_YREG = (CELL *) (((char *) ENV_YREG) + (*_PREG)->u.Osbpp.s); \ ENV_YREG = (CELL *)(((char *)ENV_YREG) + (*_PREG)->u.Osbpp.s); \
(*_CPREG) = NEXTOP((*_PREG), Osbpp); \ (*_CPREG) = NEXTOP((*_PREG), Osbpp); \
(*_PREG) = pt->CodeOfPred; \ (*_PREG) = pt->CodeOfPred; \
save_pc(); \ save_pc();
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define CALL_DEPTH_MINOR \ #define CALL_DEPTH_MINOR \
FAILED = 0; \ FAILED = 0; \
if (pt->ModuleOfPred) { \ if (pt->ModuleOfPred) { \
if (DEPTH == MkIntTerm(0)){ \ if (DEPTH == MkIntTerm(0)) { \
YAAM_FAIL; \ YAAM_FAIL; \
} else { \ } else { \
DEPTH = RESET_DEPTH(); \ DEPTH = RESET_DEPTH(); \
} \ } \
} }
#define CALL_DEPTH_MOFPRED \ #define CALL_DEPTH_MOFPRED \
FAILED = 0; \ FAILED = 0; \
DEPTH -= MkIntConstant(2); DEPTH -= MkIntConstant(2);
#define CALL_DEPTH_END \ #define CALL_DEPTH_END FAILED = 0;
FAILED = 0;
#endif #endif
#ifdef YAPOR #ifdef YAPOR
#ifdef FROZEN_STACKS #ifdef FROZEN_STACKS
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
{ \ { \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) { \ if (ENV_YREG > (CELL *)top_b || ENV_YREG < HR) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
SCH_check_requests(); \ SCH_check_requests(); \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#else /* YAPOR_SBA */ #else /* YAPOR_SBA */
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
{ \ { \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b) { \ if (ENV_YREG > (CELL *)top_b) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
SCH_check_requests(); \ SCH_check_requests(); \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
#else /* FROZEN_STACKS */ #else /* FROZEN_STACKS */
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
if (ENV_YREG > (CELL *) B) { \ if (ENV_YREG > (CELL *)B) { \
ENV_YREG = (CELL *) B; \ ENV_YREG = (CELL *)B; \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
SCH_check_requests(); \ SCH_check_requests(); \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#endif /* FROZEN_STACKS */ #endif /* FROZEN_STACKS */
#else /* YAPOR */ #else /* YAPOR */
#ifdef FROZEN_STACKS #ifdef FROZEN_STACKS
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
{ \ { \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) { \ if (ENV_YREG > (CELL *)top_b || ENV_YREG < HR) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#else /* YAPOR_SBA */ #else /* YAPOR_SBA */
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
{ \ { \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b) { \ if (ENV_YREG > (CELL *)top_b) { \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
} \ } \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
#else /* FROZEN_STACKS */ #else /* FROZEN_STACKS */
#define CALL_END_END \ #define CALL_END_END \
BLOCK = (CELL)CALL_END_END; \ BLOCK = (CELL)CALL_END_END; \
if (!FAILED) { \ if (!FAILED) { \
if (ENV_YREG > (CELL *) B) { \ if (ENV_YREG > (CELL *)B) { \
ENV_YREG = (CELL *) B; \ ENV_YREG = (CELL *)B; \
} \ } \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENV_YREG[E_CB] = (CELL) B; \ ENV_YREG[E_CB] = (CELL)B; \
ALWAYS_GONext(); \ ALWAYS_GONext(); \
} }
#endif /* FROZEN_STACKS */ #endif /* FROZEN_STACKS */
#endif /* YAPOR */ #endif /* YAPOR */
#define PROCCEED_INSTINIT \ #define PROCCEED_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \ print_instruction((*_PREG), ON_NATIVE); \
BLOCKADDRESS = (CELL)(*_PREG); \ BLOCKADDRESS = (CELL)(*_PREG); \
CACHE_Y_AS_ENV(YREG); \ CACHE_Y_AS_ENV(YREG); \
(*_PREG) = (*_CPREG); \ (*_PREG) = (*_CPREG); \
save_pc(); \ save_pc(); \
ENV_YREG = ENV; ENV_YREG = ENV;
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define PROCCEED_DEPTH \ #define PROCCEED_DEPTH DEPTH = ENV_YREG[E_DEPTH];
DEPTH = ENV_YREG[E_DEPTH];
#endif #endif
#define PROCCEED_END \ #define PROCCEED_END \
BLOCK = (CELL)PROCCEED_END; \ BLOCK = (CELL)PROCCEED_END; \
WRITEBACK_Y_AS_ENV(); \ WRITEBACK_Y_AS_ENV(); \
ENDCACHE_Y_AS_ENV(); \ ENDCACHE_Y_AS_ENV(); \
ALWAYS_GONext(); ALWAYS_GONext();
#define ALLOCATE_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \
CACHE_Y_AS_ENV(YREG); \
(*_PREG) = NEXTOP((*_PREG), e); \
ENV_YREG[E_CP] = (CELL)(*_CPREG); \
ENV_YREG[E_E] = (CELL)ENV;
#define ALLOCATE_INSTINIT \
print_instruction((*_PREG), ON_NATIVE); \
CACHE_Y_AS_ENV(YREG); \
(*_PREG) = NEXTOP((*_PREG), e); \
ENV_YREG[E_CP] = (CELL) (*_CPREG); \
ENV_YREG[E_E] = (CELL) ENV;
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define ALLOCATE_DEPTH \ #define ALLOCATE_DEPTH ENV_YREG[E_DEPTH] = DEPTH;
ENV_YREG[E_DEPTH] = DEPTH;
#endif #endif
#define ALLOCATE_END \ #define ALLOCATE_END \
ENV = ENV_YREG; \ ENV = ENV_YREG; \
ENDCACHE_Y_AS_ENV(); \ ENDCACHE_Y_AS_ENV(); \
GONext(); GONext();
#define DEALLOCATE_INSTINIT \ #define DEALLOCATE_INSTINIT print_instruction((*_PREG), ON_NATIVE);
print_instruction((*_PREG), ON_NATIVE); \
#define DEALLOCATE_POST_CHECK \
CACHE_Y_AS_ENV(YREG); \
(*_PREG) = NEXTOP((*_PREG), p); \
(*_SREG) = YREG; \
(*_CPREG) = (yamop *)ENV_YREG[E_CP]; \
ENV = ENV_YREG = (CELL *)ENV_YREG[E_E];
#define DEALLOCATE_POST_CHECK \
CACHE_Y_AS_ENV(YREG); \
(*_PREG) = NEXTOP((*_PREG), p); \
(*_SREG) = YREG; \
(*_CPREG) = (yamop *) ENV_YREG[E_CP]; \
ENV = ENV_YREG = (CELL *) ENV_YREG[E_E];
#ifdef DEPTH_LIMIT #ifdef DEPTH_LIMIT
#define DEALLOCATE_DEPTH \ #define DEALLOCATE_DEPTH DEPTH = ENV_YREG[E_DEPTH];
DEPTH = ENV_YREG[E_DEPTH];
#endif #endif
#ifdef FROZEN_STACKS #ifdef FROZEN_STACKS
#ifdef YAPOR_SBA #ifdef YAPOR_SBA
#define DEALLOCATE_FROZEN \ #define DEALLOCATE_FROZEN \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b || ENV_YREG < HR) \ if (ENV_YREG > (CELL *)top_b || ENV_YREG < HR) \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
else \ else \
ENV_YREG = (CELL *)((CELL) ENV_YREG + ENV_Size(CPREG)); ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG));
#else /* YAPOR_SBA */ #else /* YAPOR_SBA */
#define DEALLOCATE_FROZEN \ #define DEALLOCATE_FROZEN \
choiceptr top_b = PROTECT_FROZEN_B(B); \ choiceptr top_b = PROTECT_FROZEN_B(B); \
if (ENV_YREG > (CELL *) top_b) \ if (ENV_YREG > (CELL *)top_b) \
ENV_YREG = (CELL *) top_b; \ ENV_YREG = (CELL *)top_b; \
else \ else \
ENV_YREG = (CELL *)((CELL) ENV_YREG + ENV_Size(CPREG)); ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG));
#endif /* YAPOR_SBA */ #endif /* YAPOR_SBA */
#else /* FROZEN_STACKS */ #else /* FROZEN_STACKS */
#define DEALLOCATE_FROZEN \ #define DEALLOCATE_FROZEN \
if (ENV_YREG > (CELL *) B) \ if (ENV_YREG > (CELL *)B) \
ENV_YREG = (CELL *) B; \ ENV_YREG = (CELL *)B; \
else \ else \
ENV_YREG = (CELL *) ((CELL) ENV_YREG + ENV_Size(CPREG)); ENV_YREG = (CELL *)((CELL)ENV_YREG + ENV_Size(CPREG));
#endif /* FROZEN_STACKS */ #endif /* FROZEN_STACKS */
#define DEALLOCATE_POST_FROZEN \
WRITEBACK_Y_AS_ENV();
#define DEALLOCATE_END \ #define DEALLOCATE_POST_FROZEN WRITEBACK_Y_AS_ENV();
ENDCACHE_Y_AS_ENV(); \
GONext();
#define DEALLOCATE_END \
ENDCACHE_Y_AS_ENV(); \
GONext();

View File

@ -1153,9 +1153,10 @@ HTML_STYLESHEET =
# list). For an example see the documentation. # list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES. # This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = @CMAKE_SOURCE_DIR@/docs/custom/customdoxygen.css \ HTML_EXTRA_STYLESHEET = \
@CMAKE_SOURCE_DIR@/docs/custom/pygments.css \ @CMAKE_SOURCE_DIR@/docs/custom/customdoxygen.css \
@CMAKE_SOURCE_DIR@/docs/solarized-light.css @CMAKE_SOURCE_DIR@/docs/custom/pygments.css \
@CMAKE_SOURCE_DIR@/docs/custom/solarized-light.css \
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note # other source files which should be copied to the HTML output directory. Note

View File

@ -29,7 +29,7 @@ interface.
+ @ref sicsatts + @ref sicsatts
+ @ref New_Style_Attribute_Declarations + @ref New_Style_Attribute_Declarations
+ @ref AttributedVariables_Builtins + @ref AttributedVariables_Builtins
+ @ref corout + @ref CohYroutining
### SICStus Style attribute declarations. {#SICS_attributes} ### SICStus Style attribute declarations. {#SICS_attributes}
@ -374,7 +374,6 @@ The argument to `wait/1` is a predicate descriptor or a conjunction
of these predicates. These predicates will suspend until their first of these predicates. These predicates will suspend until their first
argument is bound. argument is bound.
The following primitives can be used: The following primitives can be used:
- freeze/2 - freeze/2
@ -385,6 +384,7 @@ The following primitives can be used:
- frozen/2 - frozen/2
See @ref attscorouts for more details.
@} @}

View File

@ -26,7 +26,8 @@
`use_module(library(dbusage))` command. `use_module(library(dbusage))` command.
*/ */
/** @pred db_usage /** @pred db_usage
Give general overview of data-base usage in the system. Give general overview of data-base usage in the system.
*/ */
db_usage :- db_usage :-

View File

@ -309,7 +309,7 @@ flag_group_chk(FlagGroup):-
flag_type(Type):- flag_type(Type):-
flags_type_definition(Type, _, _). flags_type_definition(Type, _, _).
% flags_type_definition(TypeName, TypeHandler, TypeValidator). %% @pred flags_type_definition(TypeName, TypeHandler, TypeValidator).
flags_type_definition(nonvar, nonvar, true). flags_type_definition(nonvar, nonvar, true).
flags_type_definition(atom, atom, true). flags_type_definition(atom, atom, true).
flags_type_definition(atomic, atomic, true). flags_type_definition(atomic, atomic, true).
@ -586,4 +586,4 @@ defined_flag(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, H
nonvar(FlagName), nonvar(FlagGroup), nonvar(FlagName), nonvar(FlagGroup),
'$defined_flag$'(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Handler). '$defined_flag$'(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Handler).
%% @} %% @}

View File

@ -147,7 +147,7 @@ open_log(F) :-
). ).
/** /**
* @pred `<--`( +Tag , :Goal ) * @pred +Tag <-- :Goal
* *
* @param [in] output goal _Goal_ before and after being evaluated, but only * @param [in] output goal _Goal_ before and after being evaluated, but only
* taking the first solution. The _Tag_ must be an atom or a string. * taking the first solution. The _Tag_ must be an atom or a string.

View File

@ -150,7 +150,7 @@ min(red(Right,_,_,_), Key, Val) :-
min(black(Right,_,_,_), Key, Val) :- min(black(Right,_,_,_), Key, Val) :-
min(Right,Key,Val). min(Right,Key,Val).
%% @pred rb_max(+T, -Key, -Value) is semidet. %% @pred rb_max( +T, -Key, -Value) is semidet.
% %
% Key is the maximal key in T, and is associated with Val. % Key is the maximal key in T, and is associated with Val.
@ -612,8 +612,8 @@ pretty_print(black(L,K,_,R),D) :-
rb_delete(t(Nil,T), K, t(Nil,NT)) :- rb_delete(t(Nil,T), K, t(Nil,NT)) :-
delete(T, K, _, NT, _). delete(T, K, _, NT, _).
%% rb_delete(+T, +Key, -TN). %% @pred rb_delete(+T, +Key, -TN).
%% rb_delete(+T, +Key, -Val, -TN). %% @pred rb_delete(+T, +Key, -Val, -TN).
% %
% Delete element with key Key from the tree T, returning the value % Delete element with key Key from the tree T, returning the value
% Val associated with the key and a new tree TN. % Val associated with the key and a new tree TN.
@ -648,7 +648,7 @@ delete(black(L,_,V,R), _, V, OUT, Flag) :-
% K == K0, % K == K0,
delete_black_node(L,R,OUT,Flag). delete_black_node(L,R,OUT,Flag).
%% rb_del_min(+T, -Key, -Val, -TN) %% @pred rb_del_min(+T, -Key, -Val, -TN)
% %
% Delete the least element from the tree T, returning the key Key, % Delete the least element from the tree T, returning the key Key,
% the value Val associated with the key and a new tree TN. % the value Val associated with the key and a new tree TN.
@ -668,7 +668,7 @@ del_min(black(L,K0,V0,R), K, V, Nil, NT, Flag) :-
fixup_left(Flag0,black(NL,K0,V0,R),NT, Flag). fixup_left(Flag0,black(NL,K0,V0,R),NT, Flag).
%% rb_del_max(+T, -Key, -Val, -TN) %% @pred rb_del_max( +T, -Key, -Val, -TN)
% %
% Delete the largest element from the tree T, returning the key % Delete the largest element from the tree T, returning the key
% Key, the value Val associated with the key and a new tree TN. % Key, the value Val associated with the key and a new tree TN.

View File

@ -1,5 +1,5 @@
The MYDDAS Data-base interface {#myddas}
=============================== ## The MYDDAS Data-base interface {#myddas}
The MYDDAS database project was developed within a FCT project aiming at The MYDDAS database project was developed within a FCT project aiming at
the development of a highly efficient deductive database system, based the development of a highly efficient deductive database system, based
@ -63,8 +63,8 @@ The MYDDAS Data-base interface {#myddas}
Prolog cut operator, which has exactly the same behaviour from Prolog cut operator, which has exactly the same behaviour from
predicates defined in the Prolog program source code, or from predicates predicates defined in the Prolog program source code, or from predicates
defined in database as relations. defined in database as relations.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name = 'John Doe', Name = 'John Doe',
Number = 123456789 ? Number = 123456789 ?
yes yes
@ -92,9 +92,6 @@ The MYDDAS Data-base interface {#myddas}
@pred db view(+,+,+). @pred db view(+,+,+).
@pred db view(+,+). @pred db view(+,+).
@ -186,9 +183,6 @@ The MYDDAS Data-base interface {#myddas}
@pred db_sql(+,+,?). @pred db_sql(+,+,?).
@pred db_sql(+,?). @pred db_sql(+,?).
@ -284,15 +278,7 @@ The MYDDAS Data-base interface {#myddas}
@pred db_get_attributes_types(+,+,?). @pred db_get_attributes_types(+,+,?).
otype for this predicate is the following:
@pred db_get_attributes_types(+,?).
The prototype for this predicate is the following:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
?- db_get_attributes_types(Conn,RelationName,ListOfFields). ?- db_get_attributes_types(Conn,RelationName,ListOfFields).
@ -552,9 +538,6 @@ The MYDDAS Data-base interface {#myddas}
this by doing again `db_my_result_set(store_result)`. this by doing again `db_my_result_set(store_result)`.
@pred db_my_sql_mode(+Conn,?SQL_Mode). @pred db_my_sql_mode(+Conn,?SQL_Mode).
@pred db_my_sql_mode(?SQL_Mode). @pred db_my_sql_mode(?SQL_Mode).
@ -570,4 +553,4 @@ The MYDDAS Data-base interface {#myddas}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can see the available SQL Modes at the MySQL homepage at You can see the available SQL Modes at the MySQL homepage at
<http://www.mysql.org>. <http://www.mysql.org>.
b

View File

@ -55,7 +55,7 @@ all_attvars/1,
:- dynamic attributed_module/3. :- dynamic attributed_module/3.
/** @pred get_attr(+ _Var_,+ _Module_,- _Value_) /** @pred get_attr( + Var,+ Module,- Value)
Request the current _value_ for the attribute named _Module_. If Request the current _value_ for the attribute named _Module_. If
_Var_ is not an attributed variable or the named attribute is not _Var_ is not an attributed variable or the named attribute is not
@ -339,7 +339,7 @@ printing and other special purpose operations.
*/ */
/** @pred _Module_:attribute_goal( _-Var_, _-Goal_) /** @pred Module:attribute_goal( -Var, Goal)
User-defined procedure, called to convert the attributes in _Var_ to User-defined procedure, called to convert the attributes in _Var_ to
a _Goal_. Should fail when no interpretation is available. a _Goal_. Should fail when no interpretation is available.
@ -469,11 +469,11 @@ att_vars([_|LGs], AttVars) :-
% make sure we set the suspended goal list to its previous state! % make sure we set the suspended goal list to its previous state!
% make sure we have installed a SICStus like constraint solver. % make sure we have installed a SICStus like constraint solver.
/** @pred _Module_:project_attributes(+AttrVars, +Goal) /** @pred Module:project_attributes( +AttrVars, +Goal)
Given a goal _Goa]l_ with variables _QueryVars_ and list of attributed Given a goal _Goal_ with variables _QueryVars_ and list of attributed
variables _AttrVars_, project all attributes in _AttrVars_ to variables _AttrVars_, project all attributes in _AttrVars_ to
_QueryVars_. Although projection is constraint system dependent, _QueryVars_. Although projection is constraint system dependent,
typically this will involve expressing all constraints in terms of typically this will involve expressing all constraints in terms of

View File

@ -41,7 +41,7 @@ should be read as "p( _X_) if q( _X_) or r( _X_)".
*/ */
/** @pred \+ :_P_ is iso /** @pred \+ 0:P is iso
Negation by failure. Negation by failure.
Goal _P_ is not provable. The execution of this predicate fails if Goal _P_ is not provable. The execution of this predicate fails if
@ -68,7 +68,7 @@ If _P_ includes cuts, the cuts are defined to be scoped by _P_: they cannot cut
*/ */
/** @pred :_Condition__ -> :_Action_ is iso /** @pred 0:Condition -> 0:Action is iso
@short If _Condition__ has a solution, call _Action_; @short If _Condition__ has a solution, call _Action_;
@ -119,7 +119,7 @@ arguments.
*/ */
/** @pred :_Condition_ *-> :_Action_ is iso /** @pred 0:Condition *-> 0:Action is iso
This construct implements the so-called <em>soft-cut</em>. The control is This construct implements the so-called <em>soft-cut</em>. The control is
defined as follows: defined as follows:

View File

@ -41,7 +41,7 @@
/** /**
* @defgroup corout Implementing Attributed Variables and Co-Routining * @defgroup attscorouts Implementing Attributed Variables and Co-Routining
* *
* @ingroup attributes * @ingroup attributes
* @{ * @{

View File

@ -18,9 +18,9 @@
* @file flagd.ysp * @file flagd.ysp
* *
* @defgroup Flags Yap Flags * @defgroup Flags Yap Flags
*n@{} * @{}
* @ingroup builtins * @ingroup builtins
* @}@[ ] *
*/ */
@ -79,7 +79,7 @@
unknown(_,error). unknown(_,error).
/** @pred create_prolog_flag(+ _Flag_,+ _Value_,+ _Options_) /** @pred create_prolog_flag( +Flag, +Value, +Options)
Create a new YAP Prolog flag. _Options_ include Create a new YAP Prolog flag. _Options_ include