2015-01-20 03:00:42 +00:00
|
|
|
/************************************************************************
|
|
|
|
** **
|
|
|
|
** The YapTab/YapOr/OPTYap systems **
|
|
|
|
** **
|
|
|
|
** YapTab extends the Yap Prolog engine to support sequential tabling **
|
|
|
|
** YapOr extends the Yap Prolog engine to support or-parallelism **
|
|
|
|
** OPTYap extends the Yap Prolog engine to support or-parallel tabling **
|
|
|
|
** **
|
|
|
|
** **
|
|
|
|
** Yap Prolog was developed at University of Porto, Portugal **
|
|
|
|
** **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
#define TOP_STACK YENV
|
2015-01-20 03:00:42 +00:00
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
#define HEAP_ARITY_ENTRY (0)
|
|
|
|
#define VARS_ARITY_ENTRY (1 + heap_arity)
|
|
|
|
#define SUBS_ARITY_ENTRY (1 + heap_arity + 1 + vars_arity)
|
|
|
|
|
|
|
|
/* macros 'HEAP_ENTRY', 'VARS_ENTRY' and 'SUBS_ENTRY' **
|
|
|
|
** assume that INDEX starts at 1 (and not at 0 !!!) */
|
|
|
|
#define HEAP_ENTRY(INDEX) (HEAP_ARITY_ENTRY + (INDEX))
|
|
|
|
#define VARS_ENTRY(INDEX) (VARS_ARITY_ENTRY + 1 + vars_arity - (INDEX))
|
|
|
|
#define SUBS_ENTRY(INDEX) (SUBS_ARITY_ENTRY + 1 + subs_arity - (INDEX))
|
2015-01-20 03:00:42 +00:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** clause_with_cut **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
Op(clause_with_cut, e)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Tabling not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_load_answer **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_load_answer, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_try_answer **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_try_answer, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_try_single **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_try_single, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_try_me **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_try_me, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_try **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_try, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_retry_me **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
Op(table_retry_me, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_retry **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
Op(table_retry, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_trust_me **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
Op(table_trust_me, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_trust **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
Op(table_trust, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_new_answer **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
PBOp(table_new_answer, s)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDPBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_answer_resolution **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
BOp(table_answer_resolution, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
ENDBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_completion **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
BOp(table_completion, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
ENDBOp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
** table_answer_resolution_completion **
|
|
|
|
************************************************************************/
|
|
|
|
|
2015-02-06 18:11:52 +00:00
|
|
|
BOp(table_answer_resolution_completion, Otapl)
|
2015-01-20 03:00:42 +00:00
|
|
|
#ifdef THREADS_CONSUMER_SHARING
|
|
|
|
{ printf("Or-parallelism not supported by JIT!!\n"); exit(1); }
|
|
|
|
#endif /* THREADS_CONSUMER_SHARING */
|
|
|
|
ENDBOp();
|