From: John W. <joe...@us...> - 2004-11-01 05:01:42
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4192/net/sf/javabdd Modified Files: JFactory.java Log Message: Exclude target/** from Eclipse build path. Index: JFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/JFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** JFactory.java 19 Oct 2004 11:11:35 -0000 1.5 --- JFactory.java 1 Nov 2004 05:01:32 -0000 1.6 *************** *** 884,887 **** --- 884,888 ---- CHECKa(r, bddfalse); + if (applycache == null) applycache = BddCacheI_init(cachesize); again : for (;;) { try { *************** *** 946,949 **** --- 947,953 ---- CHECKa(h, bddfalse); + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (itecache == null) itecache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1054,1057 **** --- 1058,1063 ---- CHECKa(r, bddfalse); + if (replacecache == null) replacecache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1155,1158 **** --- 1161,1166 ---- } + if (applycache == null) applycache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1430,1433 **** --- 1438,1445 ---- return bdd_apply(l, r, opr); + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (appexcache == null) appexcache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 1651,1654 **** --- 1663,1668 ---- CHECKa(c, bddfalse); + if (misccache == null) misccache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1746,1749 **** --- 1760,1766 ---- } + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (itecache == null) itecache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1822,1825 **** --- 1839,1846 ---- CHECKa(f, bddfalse); + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (itecache == null) itecache = BddCacheI_init(cachesize); + if (replacecache == null) replacecache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 1887,1890 **** --- 1908,1914 ---- return r; + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 1926,1929 **** --- 1950,1956 ---- return r; + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 1964,1967 **** --- 1991,1997 ---- return r; + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 2002,2005 **** --- 2032,2037 ---- return r; + if (misccache == null) misccache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2svartable(var) < 0) *************** *** 2072,2075 **** --- 2104,2109 ---- CHECKa(d, bddfalse); + if (applycache == null) applycache = BddCacheI_init(cachesize); + again : for (;;) { try { *************** *** 2237,2240 **** --- 2271,2278 ---- return bdd_apply(l, r, opr); + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (appexcache == null) appexcache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 2283,2286 **** --- 2321,2328 ---- return bdd_apply(l, r, opr); + if (applycache == null) applycache = BddCacheI_init(cachesize); + if (appexcache == null) appexcache = BddCacheI_init(cachesize); + if (quantcache == null) quantcache = BddCacheI_init(cachesize); + again : for (;;) { if (varset2vartable(var) < 0) *************** *** 2569,2572 **** --- 2611,2616 ---- miscid = CACHEID_PATHCOU; + if (countcache == null) countcache = BddCacheD_init(cachesize); + return bdd_pathcount_rec(r); } *************** *** 2653,2656 **** --- 2697,2702 ---- CHECK(r); + if (countcache == null) countcache = BddCacheD_init(cachesize); + miscid = CACHEID_SATCOU; size = Math.pow(2.0, (double) LEVEL(r)); *************** *** 3158,3168 **** void bdd_operator_init(int cachesize) { ! applycache = BddCacheI_init(cachesize); ! itecache = BddCacheI_init(cachesize); ! quantcache = BddCacheI_init(cachesize); ! appexcache = BddCacheI_init(cachesize); ! replacecache = BddCacheI_init(cachesize); ! misccache = BddCacheI_init(cachesize); ! countcache = BddCacheD_init(cachesize); quantvarsetID = 0; --- 3204,3216 ---- void bdd_operator_init(int cachesize) { ! if (false) { ! applycache = BddCacheI_init(cachesize); ! itecache = BddCacheI_init(cachesize); ! quantcache = BddCacheI_init(cachesize); ! appexcache = BddCacheI_init(cachesize); ! replacecache = BddCacheI_init(cachesize); ! misccache = BddCacheI_init(cachesize); ! countcache = BddCacheD_init(cachesize); ! } quantvarsetID = 0; *************** *** 3274,3277 **** --- 3322,3327 ---- void BddCache_done(BddCache cache) { + if (cache == null) return; + free(cache.table); cache.table = null; *************** *** 3280,3283 **** --- 3330,3334 ---- int BddCache_resize(BddCache cache, int newsize) { + if (cache == null) return 0; int n; *************** *** 3315,3318 **** --- 3366,3370 ---- void BddCache_reset(BddCache cache) { + if (cache == null) return; int n; for (n = 0; n < cache.tablesize; n++) |