From: Terrance S. <ts...@us...> - 2010-07-29 17:19:36
|
Update of /cvsroot/xsb/XSB/emu In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv2682 Modified Files: incr_xsb.c incr_xsb_defs.h Log Message: Changes to allow psc_get_incr/2 to find out whether a table is declared opaque. Index: incr_xsb.c =================================================================== RCS file: /cvsroot/xsb/XSB/emu/incr_xsb.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- incr_xsb.c 24 Apr 2010 20:50:42 -0000 1.7 +++ incr_xsb.c 29 Jul 2010 17:19:26 -0000 1.8 @@ -153,7 +153,7 @@ Psc psc = (Psc)ptoc_addr(2); if (get_tabled(psc) != T_TABLED_SUB) { set_incr(psc,ptoc_int(CTXTc 3)); - // printf("%s/%d:%u incr set to %d\n",get_name(psc),get_arity(psc),psc,ptoc_int(3)); + // printf("%s/%d:%u incr set to %d\n",get_name(psc),get_arity(psc),psc,ptoc_int(3)); } else { xsb_abort("Cannot incrementally maintain a subsumptive table (%s/%d)",get_name(psc),get_arity(psc)); } @@ -162,7 +162,11 @@ case PSC_GET_INCR: { Psc psc = (Psc)ptoc_addr(2); - ctop_int(CTXTc 3,get_incr(psc)); + if (get_incr(psc)) + ctop_int(CTXTc 3,INCREMENTAL); + else if (get_opaque(psc)) + ctop_int(CTXTc 3,OPAQUE); + else ctop_int(CTXTc 3,0); break; } Index: incr_xsb_defs.h =================================================================== RCS file: /cvsroot/xsb/XSB/emu/incr_xsb_defs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- incr_xsb_defs.h 24 Apr 2010 20:50:43 -0000 1.3 +++ incr_xsb_defs.h 29 Jul 2010 17:19:26 -0000 1.4 @@ -35,3 +35,7 @@ #define IS_AFFECTED 12 #define PSC_GET_INCR 13 #define INVALIDATE_CALLNODE_TRIE 14 + +// for psc hacking +#define INCREMENTAL 1 +#define OPAQUE 2 |