javabdd-checkins Mailing List for JavaBDD (Page 8)
Brought to you by:
joewhaley
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
|
Mar
(6) |
Apr
(6) |
May
(4) |
Jun
(31) |
Jul
(64) |
Aug
(19) |
Sep
(28) |
Oct
(50) |
Nov
(25) |
Dec
|
2005 |
Jan
(44) |
Feb
(8) |
Mar
(2) |
Apr
(15) |
May
(48) |
Jun
(8) |
Jul
(7) |
Aug
|
Sep
(1) |
Oct
(3) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
(14) |
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
(4) |
2007 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
2011 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: John W. <joe...@us...> - 2004-11-17 23:49:21
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31082 Modified Files: maven.xml Log Message: Getting ready for 1.0beta1 release. Index: maven.xml =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/maven.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** maven.xml 27 Jul 2004 22:26:39 -0000 1.2 --- maven.xml 17 Nov 2004 23:49:12 -0000 1.3 *************** *** 14,18 **** <postGoal name="native:compile"> <echo message="*** renaming BuDDy library ***"/> ! <move file="target/native/libjavabdd-0.6.so" tofile="target/native/libbuddy.so" overwrite="true"/> --- 14,18 ---- <postGoal name="native:compile"> <echo message="*** renaming BuDDy library ***"/> ! <move file="target/native/libjavabdd-1.0b1.so" tofile="target/native/libbuddy.so" overwrite="true"/> |
From: John W. <joe...@us...> - 2004-11-17 23:33:42
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26789 Modified Files: Makefile Log Message: Update to work around bug in icc with static linking. Index: Makefile =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/Makefile,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Makefile 17 Nov 2004 05:55:59 -0000 1.36 --- Makefile 17 Nov 2004 23:33:25 -0000 1.37 *************** *** 69,74 **** ifeq (${CC},icc) # Intel Linux compiler CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -O2 -Ob2 -ip $(EXTRA_CFLAGS) ! LINK = icc ! LINKFLAGS = -static -shared $(CFLAGS) endif ifeq (${CC},pathcc) # Pathscale compiler --- 69,75 ---- ifeq (${CC},icc) # Intel Linux compiler CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -O2 -Ob2 -ip $(EXTRA_CFLAGS) ! LINK = xild # Bug in icc link makes it ignore -static, so use xild ! # Include libirc for _intel_fast_memset ! LINKFLAGS = -static -shared /opt/intel_cc_80/lib/libirc.a endif ifeq (${CC},pathcc) # Pathscale compiler |
From: John W. <joe...@us...> - 2004-11-17 23:13:18
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21628 Removed Files: bddtrace.c Log Message: --- bddtrace.c DELETED --- |
From: John W. <joe...@us...> - 2004-11-17 23:07:05
|
Update of /cvsroot/javabdd/JavaBDD/buddy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20208/buddy/src Modified Files: trace.c trace.h Log Message: Improvements to the trace generation. Index: trace.c =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy/src/trace.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** trace.c 29 Sep 2004 10:00:50 -0000 1.1 --- trace.c 17 Nov 2004 23:06:56 -0000 1.2 *************** *** 2,6 **** --- 2,8 ---- #ifdef GENERATE_TRACE + #if defined(HAS_UNISTD_H) #include <unistd.h> + #endif #include <stdio.h> #include <stdlib.h> *************** *** 16,19 **** --- 18,63 ---- /* Simple trace file generation */ + + #define FAST_MALLOC + + #ifdef FAST_MALLOC + static char* bufferStart = 0; + static char* bufferPtr = 0; + static char* bufferEnd = 0; + static int startSize = 1<<16; + static void grow_malloc(int sz) + { + int oldSize, newSize; + oldSize = bufferEnd - bufferStart; + newSize = oldSize*2; + if (newSize < oldSize+sz) newSize = oldSize+sz; + if (newSize < startSize) newSize = startSize; + bufferStart = malloc(newSize); + assert(bufferStart); + bufferPtr = bufferStart; + bufferEnd = bufferStart + newSize; + } + + static __inline__ void * xmalloc(int sz) + { + void * retval; + if (bufferEnd - bufferPtr < sz) { + grow_malloc(sz); + } + retval = bufferPtr; + bufferPtr += sz; + return retval; + } + #else + static __inline__ void * xmalloc(int sz) + { + void * retval = malloc(sz); + assert(retval); + return retval; + } + #endif + + + FILE * tracefp; const char * trace_fname; *************** *** 399,408 **** void output_trace(void) { if(trace_outputted) return; trace_outputted = 1; ! int i, first = 0; ! struct bdd_function * f; emit_header(); --- 443,454 ---- void output_trace(void) { + int i, first; + struct bdd_function * f; + if(trace_outputted) return; trace_outputted = 1; ! first = 0; emit_header(); Index: trace.h =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy/src/trace.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** trace.h 29 Sep 2004 10:00:50 -0000 1.1 --- trace.h 17 Nov 2004 23:06:56 -0000 1.2 *************** *** 4,7 **** --- 4,15 ---- #ifdef GENERATE_TRACE + /* Windows peculiarities */ + #if defined(_MSC_VER) || defined(WIN32) + #define __inline__ + #define __func__ __FUNCTION__ + #else + #define HAS_UNISTD_H + #endif + #define BUDDY_PROLOGUE \ int was_enabled = trace_enable; \ *************** *** 54,65 **** }; - - static __inline__ void * xmalloc(int sz) - { - void * retval = malloc(sz); - assert(retval); - return retval; - } - void trace_init(const char *filename); void trace_add_bdd(enum arg_type type,void * val); --- 62,65 ---- |
From: John W. <joe...@us...> - 2004-11-17 23:05:25
|
Update of /cvsroot/javabdd/JavaBDD/buddy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19786/buddy/src Modified Files: kernel.c Log Message: Added bdd_setallocnum. Index: kernel.c =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy/src/kernel.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kernel.c 19 Oct 2004 11:11:21 -0000 1.4 --- kernel.c 17 Nov 2004 23:05:14 -0000 1.5 *************** *** 181,269 **** int bdd_init(int initnodesize, int cs) { - int n, err; - char * str; - - /* Check to see if tracing is enabled */ ! ! if( (str = getenv("BUDDY_TRACE_FILE")) != NULL) ! { ! trace_enable = 1; ! trace_init(str); ! } ! ! BUDDY_PROLOGUE; ! ADD_ARG1(T_INT,initnodesize); ! ADD_ARG1(T_INT,cs); ! ! srand48( SRAND48SEED ) ; ! ! if (bddrunning) ! RETURN(bdd_error(BDD_RUNNING)); ! ! bddnodesize = bdd_prime_gte(initnodesize); ! ! if ((MAX_ALLOC_NODES == 0) || ! (alloced=(BddNode*)malloc(sizeof(BddNode)*MAX_ALLOC_NODES)) == NULL) { ! if ((alloced=(BddNode*)malloc(sizeof(BddNode)*bddnodesize)) == NULL) { ! RETURN(bdd_error(BDD_MEMORY)); ! } ! MAX_ALLOC_NODES = bddnodesize; ! } ! bddnodes = alloced; ! ! bddresized = 0; ! ! for (n=0 ; n<bddnodesize ; n++) ! { ! CLRLEVELREF(n); ! LOW(n) = -1; ! bddnodes[n].hash = 0; ! bddnodes[n].next = n+1; } - bddnodes[bddnodesize-1].next = 0; - SETREF(0, MAXREF); - SETREF(1, MAXREF); - LOW(0) = HIGH(0) = 0; - LOW(1) = HIGH(1) = 1; - - if ((err=bdd_operator_init(cs)) < 0) { ! bdd_done(); ! RETURN(err); } - - bddfreepos = 2; - bddfreenum = bddnodesize-2; - bddrunning = 1; - bddvarnum = 0; - gbcollectnum = 0; - gbcclock = 0; - cachesize = cs; - usednodes_nextreorder = bddnodesize; - bddmaxnodeincrease = DEFAULTMAXNODEINC; - - bdderrorcond = 0; - - bddcachestats.uniqueAccess = 0; - bddcachestats.uniqueChain = 0; - bddcachestats.uniqueHit = 0; - bddcachestats.uniqueMiss = 0; - bddcachestats.opHit = 0; - bddcachestats.opMiss = 0; - bddcachestats.swapCount = 0; - - bdd_gbc_hook(bdd_default_gbchandler); - bdd_error_hook(bdd_default_errhandler); - bdd_resize_hook(NULL); - bdd_pairs_init(); - bdd_reorder_init(); - bdd_fdd_init(); - - if (setjmp(bddexception) != 0) - assert(0); - - RETURN(0); } --- 181,265 ---- int bdd_init(int initnodesize, int cs) { /* Check to see if tracing is enabled */ ! char * str; ! if( (str = getenv("BUDDY_TRACE_FILE")) != NULL) { ! trace_enable = 1; ! trace_init(str); } { ! int n, err; ! BUDDY_PROLOGUE; ! ADD_ARG1(T_INT,initnodesize); ! ADD_ARG1(T_INT,cs); ! ! srand48( SRAND48SEED ) ; ! ! if (bddrunning) ! RETURN(bdd_error(BDD_RUNNING)); ! ! bddnodesize = bdd_prime_gte(initnodesize); ! ! if ((MAX_ALLOC_NODES == 0) || ! (alloced=(BddNode*)malloc(sizeof(BddNode)*MAX_ALLOC_NODES)) == NULL) { ! if ((alloced=(BddNode*)malloc(sizeof(BddNode)*bddnodesize)) == NULL) { ! RETURN(bdd_error(BDD_MEMORY)); ! } ! MAX_ALLOC_NODES = bddnodesize; ! } ! bddnodes = alloced; ! ! bddresized = 0; ! ! for (n=0 ; n<bddnodesize ; n++) { ! CLRLEVELREF(n); ! LOW(n) = -1; ! bddnodes[n].hash = 0; ! bddnodes[n].next = n+1; ! } ! bddnodes[bddnodesize-1].next = 0; ! ! SETREF(0, MAXREF); ! SETREF(1, MAXREF); ! LOW(0) = HIGH(0) = 0; ! LOW(1) = HIGH(1) = 1; ! ! if ((err=bdd_operator_init(cs)) < 0) { ! bdd_done(); ! RETURN(err); ! } ! ! bddfreepos = 2; ! bddfreenum = bddnodesize-2; ! bddrunning = 1; ! bddvarnum = 0; ! gbcollectnum = 0; ! gbcclock = 0; ! cachesize = cs; ! usednodes_nextreorder = bddnodesize; ! bddmaxnodeincrease = DEFAULTMAXNODEINC; ! ! bdderrorcond = 0; ! ! bddcachestats.uniqueAccess = 0; ! bddcachestats.uniqueChain = 0; ! bddcachestats.uniqueHit = 0; ! bddcachestats.uniqueMiss = 0; ! bddcachestats.opHit = 0; ! bddcachestats.opMiss = 0; ! bddcachestats.swapCount = 0; ! ! bdd_gbc_hook(bdd_default_gbchandler); ! bdd_error_hook(bdd_default_errhandler); ! bdd_resize_hook(NULL); ! bdd_pairs_init(); ! bdd_reorder_init(); ! bdd_fdd_init(); ! ! if (setjmp(bddexception) != 0) ! assert(0); ! ! RETURN(0); } } *************** *** 1440,1467 **** ! int bdd_noderesize(int doRehash) ! { ! int oldsize = bddnodesize; ! int newsize; ! int n; ! ! if (bddnodesize >= bddmaxnodesize && bddmaxnodesize > 0) ! return -1; ! ! newsize = bddnodesize << 1; ! ! if (newsize > oldsize + bddmaxnodeincrease) ! newsize = oldsize + bddmaxnodeincrease; ! ! if (newsize > bddmaxnodesize && bddmaxnodesize > 0) ! newsize = bddmaxnodesize; ! ! return bdd_noderesize2(doRehash, oldsize, newsize); ! } ! ! int bdd_noderesize2(int doRehash, int oldsize, int newsize) { int n; - newsize = bdd_prime_lte(newsize); --- 1436,1442 ---- ! static int bdd_noderesize2(int doRehash, int oldsize, int newsize) { int n; newsize = bdd_prime_lte(newsize); *************** *** 1507,1510 **** --- 1482,1524 ---- } + int bdd_noderesize(int doRehash) + { + int oldsize = bddnodesize; + int newsize; + int n; + + if (bddnodesize >= bddmaxnodesize && bddmaxnodesize > 0) + return -1; + + newsize = bddnodesize << 1; + + if (newsize > oldsize + bddmaxnodeincrease) + newsize = oldsize + bddmaxnodeincrease; + + if (newsize > bddmaxnodesize && bddmaxnodesize > 0) + newsize = bddmaxnodesize; + + return bdd_noderesize2(doRehash, oldsize, newsize); + } + + /* + NAME {* bdd\_setallocnum *} + SECTION {* kernel *} + SHORT {* set the size of the node table *} + PROTO {* int bdd_setallocnum(int) *} + DESCR {* Sets the size of the node table. Does nothing if the node + table is larger than the given size. Returns the old size + of the node table. *) + RETURN {* The old size of the node table. *} + ALSO {* bdd\_getallocnum, bdd\_setmaxnodenum *} + */ + int bdd_setallocnum(int newsize) + { + int old = bddnodesize; + BUDDY_PROLOGUE; + ADD_ARG1(T_INT,newsize); + bdd_noderesize2(1, old, newsize); + RETURN(old); + } void bdd_checkreorder(void) |
From: John W. <joe...@us...> - 2004-11-17 23:05:21
|
Update of /cvsroot/javabdd/JavaBDD/buddy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19698/buddy/src Modified Files: bdd.h Log Message: Added bdd_setallocnum. Index: bdd.h =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy/src/bdd.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bdd.h 19 Oct 2004 11:11:21 -0000 1.3 --- bdd.h 17 Nov 2004 23:05:02 -0000 1.4 *************** *** 236,241 **** extern int bdd_setminfreenodes(int); extern int bdd_getnodenum(void); extern int bdd_getallocnum(void); - extern int bdd_noderesize2(int, int, int); extern char* bdd_versionstr(void); extern int bdd_versionnum(void); --- 236,241 ---- extern int bdd_setminfreenodes(int); extern int bdd_getnodenum(void); + extern int bdd_setallocnum(int); extern int bdd_getallocnum(void); extern char* bdd_versionstr(void); extern int bdd_versionnum(void); |
From: John W. <joe...@us...> - 2004-11-17 23:03:53
|
Update of /cvsroot/javabdd/JavaBDD/buddy/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19376/buddy/src Modified Files: bddop.c Log Message: Make it C compatible. Index: bddop.c =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy/src/bddop.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** bddop.c 14 Oct 2004 23:03:00 -0000 1.7 --- bddop.c 17 Nov 2004 23:03:43 -0000 1.8 *************** *** 487,493 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; ADD_ARG1(T_BDD,r); CHECKa(r, bddfalse); --- 487,493 ---- { BDD res; BUDDY_PROLOGUE; ADD_ARG1(T_BDD,r); + firstReorder = 1; CHECKa(r, bddfalse); *************** *** 596,604 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; ADD_ARG1(T_BDD,l); ADD_ARG1(T_BDD,r); ADD_ARG1(T_INT,op); CHECKa(l, bddfalse); --- 596,604 ---- { BDD res; BUDDY_PROLOGUE; ADD_ARG1(T_BDD,l); ADD_ARG1(T_BDD,r); ADD_ARG1(T_INT,op); + firstReorder = 1; CHECKa(l, bddfalse); *************** *** 1130,1134 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1130,1133 ---- *************** *** 1137,1140 **** --- 1136,1141 ---- ADD_ARG1(T_BDD,h); + firstReorder = 1; + CHECKa(f, bddfalse); CHECKa(g, bddfalse); *************** *** 1309,1313 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1310,1313 ---- *************** *** 1315,1318 **** --- 1315,1320 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(r,bddfalse); CHECKa(var,bddfalse); *************** *** 1411,1415 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1413,1416 ---- *************** *** 1417,1420 **** --- 1418,1423 ---- ADD_ARG1(T_BDD,c); + firstReorder = 1; + CHECKa(f,bddfalse); CHECKa(c,bddfalse); *************** *** 1539,1543 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1542,1545 ---- *************** *** 1545,1548 **** --- 1547,1552 ---- ADD_ARG1(T_BDD_PAIR,pair); + firstReorder = 1; + CHECKa(r, bddfalse); *************** *** 1665,1669 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1669,1672 ---- *************** *** 1672,1675 **** --- 1675,1680 ---- ADD_ARG1(T_INT,var); + firstReorder = 1; + CHECKa(f, bddfalse); CHECKa(g, bddfalse); *************** *** 1793,1797 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1798,1801 ---- *************** *** 1799,1802 **** --- 1803,1807 ---- ADD_ARG1(T_BDD_PAIR,pair); + firstReorder = 1; CHECKa(f, bddfalse); *************** *** 1887,1891 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 1892,1895 ---- *************** *** 1893,1896 **** --- 1897,1902 ---- ADD_ARG1(T_BDD,d); + firstReorder = 1; + CHECKa(f, bddfalse); CHECKa(d, bddfalse); *************** *** 2012,2016 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2018,2021 ---- *************** *** 2018,2021 **** --- 2023,2028 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(r, bddfalse); CHECKa(var, bddfalse); *************** *** 2070,2074 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2077,2080 ---- *************** *** 2076,2079 **** --- 2082,2087 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(r, bddfalse); CHECKa(var, bddfalse); *************** *** 2131,2135 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2139,2142 ---- *************** *** 2137,2140 **** --- 2144,2149 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(r, bddfalse); CHECKa(var, bddfalse); *************** *** 2238,2242 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2247,2250 ---- *************** *** 2246,2249 **** --- 2254,2259 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(l, bddfalse); CHECKa(r, bddfalse); *************** *** 2312,2316 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2322,2325 ---- *************** *** 2320,2323 **** --- 2329,2334 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(l, bddfalse); CHECKa(r, bddfalse); *************** *** 2387,2391 **** { BDD res; - firstReorder = 1; BUDDY_PROLOGUE; --- 2398,2401 ---- *************** *** 2395,2398 **** --- 2405,2410 ---- ADD_ARG1(T_BDD,var); + firstReorder = 1; + CHECKa(l, bddfalse); CHECKa(r, bddfalse); |
From: John W. <joe...@us...> - 2004-11-17 23:00:34
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18574 Modified Files: buddy_jni.c Added Files: bddtrace.c Log Message: Added bdd_setallocnum. Index: buddy_jni.c =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/buddy_jni.c,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** buddy_jni.c 19 Oct 2004 11:11:54 -0000 1.23 --- buddy_jni.c 17 Nov 2004 23:00:23 -0000 1.24 *************** *** 340,350 **** jnienv = env; #if defined(TRACE_BUDDYLIB) ! printf("bdd_getallocnum()\n"); ! #endif ! result = bdd_getallocnum(); ! #if defined(TRACE_BUDDYLIB) ! printf("bdd_noderesize2(%d, %d, %d)\n", 1, result, size); #endif ! bdd_noderesize2(1, result, size); check_error(env); return result; --- 340,346 ---- jnienv = env; #if defined(TRACE_BUDDYLIB) ! printf("bdd_setallocnum(%d)\n", size); #endif ! result = bdd_setallocnum(size); check_error(env); return result; --- NEW FILE: bddtrace.c --- #include "bdd.h" int main(void) { BDD _bdda; BDD _bddb; BDD _bddc; BDD _bddd; BDD _bdde; BDD _bddf; BDD _bddg; BDD _bddh; BDD _bddi; BDD _bddj; BDD _bddk; BDD _bddl; BDD _bddm; BDD _bddn; BDD _bddo; BDD _bddp; [...16023 lines suppressed...] _bddua = bdd_delref(_bddua); _bddva = bdd_delref(_bddva); _bddwa = bdd_delref(_bddwa); _bddxa = bdd_delref(_bddxa); _bddya = bdd_delref(_bddya); _bddza = bdd_delref(_bddza); _bddab = bdd_delref(_bddab); _bddbb = bdd_delref(_bddbb); _bddcb = bdd_delref(_bddcb); _bdddb = bdd_delref(_bdddb); _bddeb = bdd_delref(_bddeb); _bddfb = bdd_delref(_bddfb); _bddgb = bdd_delref(_bddgb); _bddhb = bdd_delref(_bddhb); _bddib = bdd_delref(_bddib); _bddjb = bdd_delref(_bddjb); _bddkb = bdd_delref(_bddkb); _bddlb = bdd_delref(_bddlb); _bddrbh = bdd_delref(_bddsfg); _bddsbh = bdd_delref(_bddqbh);return 0; } |
From: John W. <joe...@us...> - 2004-11-17 18:38:49
|
Update of /cvsroot/javabdd/JavaBDD_tests/trace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21196/trace Added Files: TraceSuite.java Log Message: Driver to run multiple trace files from a zip file or directory. --- NEW FILE: TraceSuite.java --- // TraceSuite.java, created Nov 17, 2004 10:07:46 AM by joewhaley // Copyright (C) 2004 John Whaley <jw...@al...> // Licensed under the terms of the GNU LGPL; see COPYING for details. package trace; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; /** * <pre> * This class opens and runs a suite of BDD traces from a zip file. * A trace file is assumed to have the '.trace' suffix. Any file with the 'README' posfix * is assumed to be an information file and is dumped to stdout. * </pre> * * Based on the version in JDD. * @version $Id: TraceSuite.java,v 1.1 2004/11/17 18:38:38 joewhaley Exp $ */ public class TraceSuite { /** * filename is the name of zip file or directory, initial_size is the suggested * "base" for deciding the initial of the nodetable. if initial_size is -1, it * is ignored and TraceDriver's default value is used */ public TraceSuite(String filename, int initial_size) { File dir = new File(filename); if (dir.isDirectory()) { runDirectory(dir, initial_size); } else { runZip(filename, initial_size); } } public void runDirectory(File dir, int initial_size) { File[] files = dir.listFiles(); if (files == null) return; for (int i = 0; i < files.length; ++i) { if (files[i].isDirectory()) runDirectory(files[i], initial_size); else { try { String name = files[i].getName(); InputStream is = new BufferedInputStream(new FileInputStream(files[i])); if(name.endsWith(".trace")) runTrace(name, is, initial_size); else if(name.endsWith("README")) showFile(name, is); } catch(IOException exx) { System.out.println("FAILED: " + exx.getMessage() + "\n"); exx.printStackTrace(); System.exit(20); } } } } public void runZip(String filename, int initial_size) { try { InputStream is = new FileInputStream(filename); ZipInputStream zis = new ZipInputStream(is); System.out.println("\n***** [ " + filename + " ] *****"); //JREInfo.show(); ZipEntry ze = zis.getNextEntry(); while(zis.available()!= 0) { String name = ze.getName(); if(name.endsWith(".trace")) runTrace(name, zis, initial_size); else if(name.endsWith("README")) showFile(name, zis); zis.closeEntry(); ze = zis.getNextEntry(); } zis.close(); is.close(); } catch(IOException exx) { System.out.println("FAILED: " + exx.getMessage() + "\n"); exx.printStackTrace(); System.exit(20); } } private void runTrace(String name, InputStream is, int size) { // enable verbose temporary! boolean save = TraceDriver.verbose; TraceDriver.verbose = true; System.err.println("Tracing " + name + "..."); try { if(size == -1) new TraceDriver(name, is); else new TraceDriver(name, is, size); } catch(Exception exx) { System.out.println("FAILED: " + exx.getMessage() + "\n\n"); exx.printStackTrace(); } TraceDriver.verbose = save; // set back verbose to its old value // let's cleanup, so we dont affect the next run so much: for(int i = 0; i < 6; i++) System.gc(); try { Thread.sleep(5000); } catch(Exception ignored) { } // calm down! } private void showFile(String name, InputStream is) throws IOException { System.out.println("File " + name); byte [] buffer = new byte[10240]; for(;;) { int i = is.read(buffer, 0, buffer.length); if(i <= 0) return; System.out.println(new String(buffer, 0, i)); } } // ------------------------------------------------------------- public static void main(String [] args) { if( args.length == 1) new TraceSuite(args[0], -1); else if(args.length == 2) new TraceSuite(args[0], Integer.parseInt(args[1])); else System.err.println("Usage: java "+TraceSuite.class.getName()+" <trace-suite.zip> [initial size _base_]"); } } |
From: John W. <joe...@us...> - 2004-11-17 17:15:36
|
Update of /cvsroot/javabdd/JavaBDD_tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32032 Added Files: .cvsignore Log Message: Ignore *.dll files. --- NEW FILE: .cvsignore --- *.dll |
From: John W. <joe...@us...> - 2004-11-17 09:56:14
|
Update of /cvsroot/javabdd/JavaBDD_tests/trace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31487/trace Added Files: TraceDriver.java Log Message: Trace driver for standard BDD trace files. --- NEW FILE: TraceDriver.java --- // TraceDriver.java, created Nov 17, 2004 12:32:38 AM by joewhaley // Copyright (C) 2004 John Whaley <jw...@al...> // Licensed under the terms of the GNU LGPL; see COPYING for details. package trace; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.Vector; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import net.sf.javabdd.BDD; import net.sf.javabdd.BDDFactory; import net.sf.javabdd.BDDPairing; /** * A driver to run BDD trace files in the bwolen BDD trace format. * See http://www-2.cs.cmu.edu/~bwolen/software/. * * This code is based on the code in JDD. * * @author jwhaley * @version $Id: TraceDriver.java,v 1.1 2004/11/17 09:56:03 joewhaley Exp $ */ public class TraceDriver { static PrintStream out = System.out; // -------------------------------------------------------------- class TracedVariable { public String name; public int index, last_use; BDD bdd; public boolean is_var = false; public void showName() { out.print(name); } public void show() { out.print("\n\t"); showName(); out.println(); bdd.printSet(); } } // -------------------------------------------------------------- abstract class TracedOperation { public int index, size = -1; public String op; public void show() { } public abstract void execute() throws IOException ; public void show_code() { } } // -------------------------------------------------------------- class TracedDebugOperation extends TracedOperation { public String text; public void execute() { if (verbose /*|| true*/) out.println(text); } public void show_code() { out.println( "//" + text); } } class TracedSaveOperation extends TracedOperation { public TracedVariable v; public void execute() { try { bdd.save(v.name + ".buddy", v.bdd); //BDDIO.save(bdd, v.bdd, v.name + ".bdd"); } catch(IOException exx) { // ignore } } public void show_code() { out.println("BDDIO.saveBuDDy(bdd, " + v.bdd + ",\"" + v.name + ".buddy\");"); } } class TracedPrintOperation extends TracedOperation { public TracedVariable v; public boolean graph; public void execute() { if(graph) v.bdd.printDot();// bdd.printDot(v.name, v.bdd); else { out.println(v.name + ":"); v.bdd.printSet(); } } public void show_code() { if(graph) out.println(v.name + ".printDot();"); else out.println(v.name + ".printSet();"); } } class TracedCheckOperation extends TracedOperation { public TracedVariable t1,t2; public void execute() throws IOException { boolean equal = (t1.bdd.equals(t2.bdd)); if(size != -1) { boolean expected = (size == 0 ? false : true); if(equal != expected) throw new IOException ("are_equal(" + t1.name + ", " + t2.name + ") failed. expected " + expected + ", got " + equal); } } public void show() { out.print(index + "\t"); out.print("are_equal("+t1.name+", "+t2.name+");"); if(size != -1) out.print("\t% " + size); out.println(); } } // -------------------------------------------------------------- class TracedBDDOperation extends TracedOperation { public int ops; public TracedVariable ret, op1, op2, op3; public Vector operands; public void show() { out.print(index + "\t"); ret.showName(); out.print(" = "); if(op.equals("=") ) { op1.showName(); out.print(";"); } else { out.print(op + "(" ); boolean first = true; for (Enumeration e = operands.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); if(first) first = false; else out.print(", "); v.showName(); } out.print(");"); } if(size != -1) out.print("\t% " + size); out.println(); } public void execute() throws IOException { // check_all_variables(); // DEBUG ret.bdd.free(); if(op.equals("not")) do_not(); else if(op.equals("=")) do_assign(); else if(op.equals("and")) do_and(); else if(op.equals("or")) do_or(); else if(op.equals("xor")) do_xor(); else if(op.equals("xnor")) do_xnor(); else if(op.equals("nor")) do_nor(); else if(op.equals("nand")) do_nand(); else if(op.equals("ite")) do_ite(); else if(op.equals("vars_curr_to_next")) do_s2sp(); else if(op.equals("vars_next_to_curr")) do_sp2s(); else if(op.equals("support_vars")) do_support(); else if(op.equals("exists")) do_exists(); else if(op.equals("forall")) do_forall(); else if(op.equals("restrict")) do_restrict(); else if(op.equals("rel_prod")) do_relprod(); else { throw new IOException("Unknown operation '" + op + "', #" + op_count ); } last_assignment = ret; if(size != -1) { int size2 = node_count(ret); if(size != size2) { out.println("\n*************************************************************************"); out.println("Size comparison failed after " + op + " ( wanted " + size + ", got " + size2 + ")"); show(); out.println("\n"); throw new IOException("Size comparison failed"); } } checkVar(this); } // ------------------------------------------------------------------- private void do_not() throws IOException { checkEquality(ops, 1, "do_not"); ret.bdd = op1.bdd.not(); } private void do_assign() throws IOException { checkEquality(ops, 1, "do_assign"); ret.bdd = op1.bdd; } private void do_or() { if(ops == 2) ret.bdd = op1.bdd.or(op2.bdd); else { for (Enumeration e = operands.elements() ; e.hasMoreElements() ;) if(((TracedVariable)e.nextElement()).bdd.isOne()) { ret.bdd = bdd.one(); return; } BDD tmp = bdd.zero(); for (Enumeration e = operands.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); BDD tmp2 = tmp.or(v.bdd); tmp.free(); tmp = tmp2; } ret.bdd = tmp; } } private void do_and() { if(ops == 2) ret.bdd = op1.bdd.and(op2.bdd); else { for (Enumeration e = operands.elements() ; e.hasMoreElements() ;) if(((TracedVariable)e.nextElement()).bdd.isZero()) { ret.bdd = bdd.zero(); return; } BDD tmp = bdd.one(); for (Enumeration e = operands.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); BDD tmp2 = tmp.and(v.bdd); tmp.free(); tmp = tmp2; } ret.bdd = tmp; } } private void do_nand() { if(ops == 2) ret.bdd = op1.bdd.apply(op2.bdd, BDDFactory.nand); else { do_and(); BDD tmp = ret.bdd; ret.bdd = tmp.not(); tmp.free(); } } private void do_nor() { if(ops == 2) ret.bdd = op1.bdd.apply(op2.bdd, BDDFactory.nor); else { do_or(); BDD tmp = ret.bdd; ret.bdd = tmp.not(); tmp.free(); } } private void do_xor() throws IOException { check(ops == 2); ret.bdd = op1.bdd.xor(op2.bdd); } private void do_xnor() throws IOException { check(ops == 2); ret.bdd = op1.bdd.biimp(op2.bdd); } private void do_ite() throws IOException { check(ops == 3); ret.bdd = op1.bdd.ite(op2.bdd, op3.bdd); } private void do_s2sp() throws IOException { check(ops == 1); ret.bdd = op1.bdd.replace(s2sp); } private void do_sp2s() throws IOException { check(ops == 1); ret.bdd = op1.bdd.replace(sp2s); } private void do_support() throws IOException { check(ops == 1); ret.bdd = op1.bdd.support(); } private void do_exists() throws IOException { check(ops == 2); ret.bdd = op2.bdd.exist(op1.bdd); } private void do_forall() throws IOException { check(ops == 2); ret.bdd = op2.bdd.forAll(op1.bdd); } private void do_restrict() throws IOException { check(ops == 2); ret.bdd = op1.bdd.restrict(op2.bdd); } private void do_relprod() throws IOException { check(ops == 3); ret.bdd = op2.bdd.relprod(op3.bdd, op1.bdd); } // ------------------------------------------------------------------------- public void show_code() { String code; Enumeration e = operands.elements(); TracedVariable v = (TracedVariable)e.nextElement(); if(op.equals("=")) out.println("BDD " + ret.name + " = " + v.name + ";"); else { out.print("BDD " + ret.name + " = " +v.name + "." +op); out.print("("); boolean mode2 = op.equals("ite"); int i = 0; for (i = 0; e.hasMoreElements() ;i++) { v = (TracedVariable)e.nextElement(); if(mode2 && i != 0) out.print(", "); out.print(v.name); if(e.hasMoreElements() && !mode2) out.print( "." + op + "("); } if(!mode2) for(int j = 1; j < i; j++) out.print(")"); out.println(");"); } if(op.equals("ite") ) out.println("System.out.println(\"" + ret.name + " ==> \"+" + ret.name + ".nodeCount());" ); } } // ----------------------------------------------- private static final int DEFAULT_NODES = 10000, MAX_NODES = 3000000; private BDDFactory bdd; private InputStream is; private StringBuffer sb; private String filename, module; private int [] stack; private int stack_tos, nodes, cache, vars; private HashMap map; private BDDPairing s2sp, sp2s; private TracedVariable last_assignment; private Vector operations, variables; private int op_count, line_count, var_count; private long time; /** this is our extra VERBOSE flags, to enable trace_verbose_print() output*/ public static boolean verbose = false; public TraceDriver(String file) throws IOException { this(file, new FileInputStream(file), DEFAULT_NODES); } public TraceDriver(String file, int nodes) throws IOException { this(file, new FileInputStream(file), nodes); } public TraceDriver(String file, InputStream is) throws IOException { this(file, is, DEFAULT_NODES); } public TraceDriver(String file, InputStream is, int nodes) throws IOException { this.filename = file; this.nodes = nodes; this.is = is; this.sb = new StringBuffer(); this.stack = new int[64]; this.stack_tos = 0; this.cache = Math.max( Math.min(nodes / 10, 5000), 50000); this.map = new HashMap(1024); this.operations = new Vector(); this.variables = new Vector(); this.op_count = 0; this.line_count = 1; this.var_count = 0; // Options.verbose = true; // DEBUG TracedVariable vret = new TracedVariable(); vret.last_use = 0; vret.name = "0"; //vret.bdd = bdd.zero(); map.put("0", vret); vret = new TracedVariable(); vret.last_use = 0; vret.name = "1"; //vret.bdd = bdd.one(); map.put("1", vret); last_assignment = null; parse(); // show_code(); vret = (TracedVariable) map.get("0"); vret.bdd = bdd.zero(); vret = (TracedVariable) map.get("1"); vret.bdd = bdd.one(); execute(); show_results(); bdd.done(); } // ----------------------------------------------------- private void show_code() { out.println("import org.sf.javabdd.*;\n"+ "public class Test {\n"+ "public static void main(String[] args) {\n"); out.println("\n\n" + "BDDFactory B = BDDFactory.init("+nodes+",100);\n" + "B.setVarNum(" + variables.size() + ");\nBDD "); int i = 0; for (Enumeration e = variables.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); if(v.is_var) { if(i != 0) out.print(","); out.print(v.name + "=B.ithVar(" + i+ ") "); i++; } } out.println(";"); for (Enumeration e = operations.elements() ; e.hasMoreElements() ;) { TracedOperation v = (TracedOperation)e.nextElement(); v.show_code(); } out.println("}\n}\n"); } // ----------------------------------------------------- private void setup_bdd(int vars) { this.vars = vars; nodes = (int)Math.min( MAX_NODES, nodes * (1 + Math.log(1+vars)) ); out.println(); out.println("loading " + module + " from " + filename + " (" + nodes + " nodes, " + vars + " vars)"); bdd = BDDFactory.init(nodes, cache); //bdd.setNodeNames(new TracedNames() ); } // ----------------------------------------------------- private void alloc_var(String name) { TracedVariable vret = new TracedVariable(); vret.last_use = 0; int vn = bdd.extVarNum(1); vret.bdd = bdd.ithVar(vn); vret.name = name; vret.is_var = true; map.put(name, vret); variables.add(vret); var_count++; } private void checkVar(TracedBDDOperation tp) { checkVar(tp.ret); for (Enumeration e = tp.operands.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); checkVar(v); } } private void checkVar(TracedVariable v) { if(v != null && v.last_use == op_count) { //out.println("Removing " + v.name + " at state " + op_count + ", bdd = " + v.bdd); v.bdd.free(); v.last_use = -1; // we dont want to remove this again, in case A = not(A) or B = and(A,A) // v.bdd = 0; } } private TracedPrintOperation createPrintOperation(boolean graph, TracedVariable v) { TracedPrintOperation tp = new TracedPrintOperation(); tp.index = op_count; tp.graph = graph; tp.v = v; operations.add( tp ); return tp; } private TracedSaveOperation createSaveOperation(TracedVariable v) { TracedSaveOperation ts = new TracedSaveOperation(); ts.index = op_count; ts.v = v; operations.add( ts ); return ts; } private TracedCheckOperation createCheckOperation(TracedVariable v1, TracedVariable v2) { TracedCheckOperation tp = new TracedCheckOperation(); tp.index = op_count; tp.t1 = v1; tp.t2 = v2; operations.add( tp ); return tp; } private TracedDebugOperation createDebugOperation(String text) { TracedDebugOperation tp = new TracedDebugOperation(); tp.index = op_count; tp.text = text; operations.add( tp ); return tp; } private TracedBDDOperation createBDDOperation() { TracedBDDOperation tp = new TracedBDDOperation(); tp.index = op_count; operations.add( tp ); tp.operands = new Vector(3); return tp; } // ----------------------------------------------------- private void show_results() { time = System.currentTimeMillis() - time; out.println("" + op_count + " operations performed, total execution time: " + time + " [ms]"); if(verbose) { if(false && last_assignment != null && last_assignment.hashCode() != -1) { int size = node_count(last_assignment); out.println("Last assignment: " + last_assignment.name + ", " + size + " nodes."); // if(size < 20) bdd.printSet(last_assignment.bdd); out.println("\n"); } out.println("Nodes: "+bdd.getNodeNum()+"/"+bdd.getNodeTableSize()); out.println(bdd.getGCStats()); bdd.printStat(); } } /** check if the variables to be used are OK */ private void check_all_variables() { for (Enumeration e = variables.elements() ; e.hasMoreElements() ;) { TracedVariable v = (TracedVariable)e.nextElement(); if(v.last_use >= op_count) { // v.showName();out.println(); // bdd.check_node(v.bdd, v.name); // DEBUG } } } // ------------------------------------------------------------------------- private void execute() throws IOException { time = System.currentTimeMillis(); for (Enumeration e = operations.elements() ; e.hasMoreElements() ;) { TracedOperation tp = (TracedOperation)e.nextElement(); op_count = tp.index; if(TraceDriver.verbose) tp.show(); // DEBUG !! tp.execute(); } } /** BDD trace driver doesn't count nodes the same way as we do ... */ private int node_count(TracedVariable v) { if (v.bdd.hashCode() == -1) throw new InternalError(); int size = v.bdd.nodeCount(); // adjust BDD size to include terminals if (v.bdd.isOne() || v.bdd.isZero()) size += 1; else size += 2; return size; } private void parse() throws IOException { read_module(); read_input(); skip_output(); read_structure(); } private void read_module() throws IOException { need("MODULE"); module = need(); } private void skip_output() throws IOException { need("OUTPUT"); for(String tmp = need(); !tmp.equals(";"); tmp = need()) ; } private void read_structure() throws IOException { need("STRUCTURE"); while(true) { String ret = need(); if(ret.equals("ENDMODULE")) return; op_count++; if(ret.equals("trace_verbose_print")) { need("("); String str = getString(); need(")"); need(";"); createDebugOperation(str); } else if(ret.equals("are_equal")) { need("("); String str = need(); TracedVariable t1 = needVar(str); need(","); str = need(); TracedVariable t2 = needVar(str); need(")"); need(";"); createCheckOperation(t1,t2); } else if(ret.equals("print_bdd") || ret.equals("show_bdd") ) { need("("); String str = need(); TracedVariable v = needVar(str);need(")"); need(";"); createPrintOperation(ret.equals("show_bdd"), v); } else if(ret.equals("save_bdd")) { need("("); String str = need(); TracedVariable v = needVar(str);need(")"); need(";"); createSaveOperation(v); } else if(ret.equals("check_point_for_force_reordering")) { out.println("NOTE: ignoring variable-reordering request"); skip_eol(); } else { TracedVariable vret = (TracedVariable) map.get(ret); if(vret == null) // just used a new variable vret = addTemporaryVariable(ret); need("="); String op = need(); updateUsage(vret); TracedBDDOperation tp = createBDDOperation(); TracedVariable var = (TracedVariable) map.get(op); if(var != null) { // asignment! need(";"); tp.operands.add(var); tp.ret = vret; tp.op = "="; updateUsage(var); } else { tp.op = op; tp.ret = vret; if(op.equals("new_int_leaf")) { need("("); String c = need(); need(")"); need(";"); Object operand = map.get(c); // assuming 0 or 1 if (operand == null) throw new InternalError(); tp.operands.add(operand); tp.ret = vret; tp.op = "="; } else { String s1,s2; need("("); do { s1 = need(); tp.operands.add( needVar(s1) ); s1 = need(); } while(s1.equals(",") ); need(";"); } } tp.ops = tp.operands.size(); if(tp.ops > 0) tp.op1 = (TracedVariable) tp.operands.elementAt(0); if(tp.ops > 1) tp.op2 = (TracedVariable) tp.operands.elementAt(1); if(tp.ops > 2) tp.op3 = (TracedVariable) tp.operands.elementAt(2); } } } // -------------------------------------------------------------------------------------------- private void read_input() throws IOException { boolean interleave = false; LinkedList list = new LinkedList(); need("INPUT"); for(int i = 0; ; i++) { String name = need(); if(i == 0 && ( name.equals("CURR_NEXT_ASSOCIATE_EVEN_ODD_INPUT_VARS") || name.equals("STATE_VAR_ASSOCIATE_CURR_NEXT_INTERLEAVE"))) { if(name.equals("STATE_VAR_ASSOCIATE_CURR_NEXT_INTERLEAVE")) interleave = true; } else { // alloc_var(name); list.add(name); name = need(); if(name.equals(";")) break; else if(!name.equals(",")) { throw new IOException("expected ',' when reading inputs, but got: " + name+ " at line " + line_count); } } } int count = list.size(); setup_bdd(count); for(Iterator it = list.iterator(); it.hasNext() ;) { String name = (String) it.next(); alloc_var(name); } // ------------------------ build permutations int size = variables.size(); // Test.checkEquality( size%2, 0, "odd varcount ??"); int [] v1 = new int[size /2]; int [] v2 = new int[size /2]; Enumeration e =variables.elements(); for (int i = 0; i < (size & ~1) ;i ++) { TracedVariable v = (TracedVariable) e.nextElement(); if (v.bdd.nodeCount() > 1) throw new InternalError(); if(interleave) { if( (i%2) == 0) v1[i/2] = v.bdd.var(); else v2[i/2] = v.bdd.var(); } else { if(i < v1.length) v1[i] = v.bdd.var(); else v2[ i - v1.length] = v.bdd.var(); } } s2sp = bdd.makePair(); s2sp.set(v1, v2); sp2s = bdd.makePair(); sp2s.set(v2, v1); // s2sp.showName(); } private TracedVariable needVar(String str) throws IOException { TracedVariable ret = (TracedVariable) map.get(str); if(ret == null ) { throw new IOException("Unknown variable/operand " + str + " at line " + line_count); } updateUsage(ret); return ret; } private void updateUsage(TracedVariable v) { // if(v.last_use != Integer.MAX_VALUE) v.last_use = op_count; } private TracedVariable addTemporaryVariable(String name) { TracedVariable vret = new TracedVariable(); vret.last_use = op_count; vret.name = name; vret.bdd = bdd.zero(); // nothing... variables.add( vret); map.put(name, vret); return vret; } // ----------------------------------------------------- private void need(String what) throws IOException { String got = need(); if(!got.equals(what)) { check(false, "Syntax error: expected '" + what + "', but read '" + got + "', op=" + op_count); } } private String need() throws IOException { String ret = next(); if(ret == null) { check(false, "pre-mature end of file"); } return ret; } // ----------------------------------------------------- private int read() { int c = -1; if(stack_tos > 0) c = stack[--stack_tos]; else { try { c = is.read(); } catch(IOException exx) { } } if(c == '\n') line_count++; return c; } private void push(int c) { stack[stack_tos++] = c; if(c == '\n') line_count--; } private boolean isSpace(int c) { return (c == ' ' || c == '\n' || c == '\t' || c == '\r'); } private boolean isAlnum(int c) { return ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_'); } // ----------------------------------------------------- private String getString() throws IOException { StringBuffer buffer = new StringBuffer(); int c = 0; while( isSpace( c = read())); if(c != '"') throw new IOException("Not an string at line " + line_count); while( ( c = read()) != '"') buffer.append((char)c); return buffer.toString(); } private void skip_eol() { for(;;) { int c = read(); if(c == -1 || c == '\n') return; } } private String next() { sb.setLength(0); int c; do { c = read(); if(c == -1) return null; // EOF } while( isSpace(c)); if(isAlnum(c)) { do { sb.append((char)c); c = read(); // XXX: error fixed ??? "return" was missing if(c == -1) return sb.toString(); } while( isAlnum(c)); if(!isSpace(c)) push(c); } else { if(c == '%' || c == '#') { int old_line = line_count; if(c == '%') { String count = next(); TracedOperation tp = (TracedOperation) operations.lastElement(); if(tp.size == -1) tp.size = Integer.parseInt(count); } if(old_line == line_count) skip_eol(); // haven't had a \n yet return next(); } return ""+((char)c); } return sb.toString(); } /* package */ void checkEquality(int a, int b, String txt) throws IOException { if(a != b) throw new IOException(txt + ", " + a + " != " + b); } /* package */ void check(boolean b, String txt) throws IOException { if(!b) throw new IOException(txt); } /* package */ void check(boolean b) throws IOException { if(!b) throw new IOException("Check failed"); } // ---------------------------------------------------- public static void main(String [] args) { //TraceDriver.verbose = true; try { if(args.length == 2) { new TraceDriver(args[0], Integer.parseInt(args[1]) ); } else if(args.length == 1) new TraceDriver(args[0]); else out.println("Usage: java "+TraceDriver.class.getName()+" file.trace [initial node-base]"); } catch(IOException exx) { out.println("FAILED: " + exx.getMessage() ); exx.printStackTrace(); } } } |
From: John W. <joe...@us...> - 2004-11-17 09:55:39
|
Update of /cvsroot/javabdd/JavaBDD_tests/trace In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31419/trace Log Message: Directory /cvsroot/javabdd/JavaBDD_tests/trace added to the repository |
From: John W. <joe...@us...> - 2004-11-17 08:21:41
|
Update of /cvsroot/javabdd/JavaBDD_tests/bdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9734/bdd Modified Files: BasicTests.java Log Message: More test cases. Index: BasicTests.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD_tests/bdd/BasicTests.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BasicTests.java 19 Oct 2004 06:52:08 -0000 1.1 --- BasicTests.java 17 Nov 2004 08:21:32 -0000 1.2 *************** *** 181,184 **** --- 181,232 ---- } + static boolean isFreed(BDD b) { + return b.hashCode() == -1; + } + + void testApplyWith(BDDFactory bdd, BDDFactory.BDDOp op, + boolean b1, boolean b2, boolean b3, boolean b4) { + BDD a, b, c, d; + a = bdd.zero(); b = bdd.zero(); + c = a; d = b; + Assert.assertTrue(!isFreed(d)); + a.applyWith(b, op); + Assert.assertEquals(b1, a.isOne()); + Assert.assertEquals(b1, c.isOne()); + Assert.assertTrue(isFreed(b)); + Assert.assertTrue(isFreed(d)); + a.free(); + + a = bdd.zero(); b = bdd.one(); + c = a; d = b; + Assert.assertTrue(!isFreed(d)); + a.applyWith(b, op); + Assert.assertEquals(b2, a.isOne()); + Assert.assertEquals(b2, c.isOne()); + Assert.assertTrue(isFreed(b)); + Assert.assertTrue(isFreed(d)); + a.free(); + + a = bdd.one(); b = bdd.zero(); + c = a; d = b; + Assert.assertTrue(!isFreed(d)); + a.applyWith(b, op); + Assert.assertEquals(b3, a.isOne()); + Assert.assertEquals(b3, c.isOne()); + Assert.assertTrue(isFreed(b)); + Assert.assertTrue(isFreed(d)); + a.free(); + + a = bdd.one(); b = bdd.one(); + c = a; d = b; + Assert.assertTrue(!isFreed(d)); + a.applyWith(b, op); + Assert.assertEquals(b4, a.isOne()); + Assert.assertEquals(b4, c.isOne()); + Assert.assertTrue(isFreed(b)); + Assert.assertTrue(isFreed(d)); + a.free(); + } + public void testOr() { reset(); *************** *** 295,298 **** --- 343,365 ---- } + public void testApplyWith() { + reset(); + Assert.assertTrue(hasNext()); + while (hasNext()) { + BDDFactory bdd = nextFactory(); + // TODO: more tests + testApplyWith(bdd, BDDFactory.and, false, false, false, true); + testApplyWith(bdd, BDDFactory.or, false, true, true, true); + testApplyWith(bdd, BDDFactory.xor, false, true, true, false); + testApplyWith(bdd, BDDFactory.imp, true, true, false, true); + testApplyWith(bdd, BDDFactory.biimp, true, false, false, true); + testApplyWith(bdd, BDDFactory.diff, false, false, true, false); + testApplyWith(bdd, BDDFactory.less, false, true, false, false); + testApplyWith(bdd, BDDFactory.invimp, true, false, true, true); + testApplyWith(bdd, BDDFactory.nand, true, true, true, false); + testApplyWith(bdd, BDDFactory.nor, true, false, false, false); + } + } + public void testIte() { reset(); |
From: John W. <joe...@us...> - 2004-11-17 05:56:07
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18877 Modified Files: Makefile Log Message: Added omit_frame_pointer for pathcc. Index: Makefile =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/Makefile,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Makefile 11 Nov 2004 02:10:29 -0000 1.35 --- Makefile 17 Nov 2004 05:55:59 -0000 1.36 *************** *** 73,77 **** endif ifeq (${CC},pathcc) # Pathscale compiler ! CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -m32 -O2 $(EXTRA_CFLAGS) LINK = pathcc LINKFLAGS = -shared $(CFLAGS) --- 73,78 ---- endif ifeq (${CC},pathcc) # Pathscale compiler ! CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -m32 -O2 -fomit_frame_pointer $(EXTRA_CFLAGS) ! # For 64-bit, eliminate -m32 and add -fPIC in CFLAGS. LINK = pathcc LINKFLAGS = -shared $(CFLAGS) |
From: John W. <joe...@us...> - 2004-11-17 05:55:37
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18787 Modified Files: project.properties Log Message: Added sourceforge properties. Index: project.properties =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/project.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** project.properties 19 Oct 2004 11:41:40 -0000 1.10 --- project.properties 17 Nov 2004 05:55:28 -0000 1.11 *************** *** 43,44 **** --- 43,48 ---- statcvs.history = true statcvs.exclude = buddy/doc/**;buddy/examples/** + + # Sourceforge stuff. + maven.sourceforge.username = joewhaley + maven.sourceforge.project.groupId = 72725 |
From: John W. <joe...@us...> - 2004-11-17 05:54:32
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18609 Modified Files: project.xml Log Message: Added statcvs dependency. Index: project.xml =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/project.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** project.xml 19 Oct 2004 11:23:38 -0000 1.15 --- project.xml 17 Nov 2004 05:54:22 -0000 1.16 *************** *** 157,160 **** --- 157,167 ---- </dependency> + <dependency> + <groupId>statcvs</groupId> + <artifactId>maven-statcvs-plugin</artifactId> + <version>2.5</version> + <type>plugin</type> + </dependency> + <!-- TODO <dependency> |
From: John W. <joe...@us...> - 2004-11-16 02:01:02
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26840/net/sf/javabdd Modified Files: JFactory.java Log Message: Cache was not being destroyed correctly when calling done(). Fixed. Index: JFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/JFactory.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** JFactory.java 1 Nov 2004 05:01:32 -0000 1.6 --- JFactory.java 16 Nov 2004 02:00:45 -0000 1.7 *************** *** 3226,3235 **** } ! BddCache_done(applycache); ! BddCache_done(itecache); ! BddCache_done(quantcache); ! BddCache_done(appexcache); ! BddCache_done(replacecache); ! BddCache_done(misccache); if (supportSet != null) { --- 3226,3235 ---- } ! BddCache_done(applycache); applycache = null; ! BddCache_done(itecache); itecache = null; ! BddCache_done(quantcache); quantcache = null; ! BddCache_done(appexcache); appexcache = null; ! BddCache_done(replacecache); replacecache = null; ! BddCache_done(misccache); misccache = null; if (supportSet != null) { |
From: John W. <joe...@us...> - 2004-11-11 02:10:39
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32746 Modified Files: Makefile Log Message: Change opt flags. Index: Makefile =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/Makefile,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Makefile 9 Nov 2004 20:49:25 -0000 1.34 --- Makefile 11 Nov 2004 02:10:29 -0000 1.35 *************** *** 73,77 **** endif ifeq (${CC},pathcc) # Pathscale compiler ! CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -m32 -O3 $(EXTRA_CFLAGS) LINK = pathcc LINKFLAGS = -shared $(CFLAGS) --- 73,77 ---- endif ifeq (${CC},pathcc) # Pathscale compiler ! CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -m32 -O2 $(EXTRA_CFLAGS) LINK = pathcc LINKFLAGS = -shared $(CFLAGS) |
From: John W. <joe...@us...> - 2004-11-09 20:49:34
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32279 Modified Files: Makefile Log Message: Add pathcc support. Index: Makefile =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/Makefile,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** Makefile 16 Oct 2004 02:59:52 -0000 1.33 --- Makefile 9 Nov 2004 20:49:25 -0000 1.34 *************** *** 52,56 **** JDK_ROOT = $(firstword $(wildcard /usr/java/j2sdk*)) CLASSPATH = .:jdd.jar ! CFLAGS = -O2 $(EXTRA_CFLAGS) CAL_CFLAGS = -O2 -DCLOCK_RESOLUTION=60 -DRLIMIT_DATA_DEFAULT=16777216 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_ASSERT_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_PWD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_STDARG_H=1 -DHAVE_VARARGS_H=1 -DSIZEOF_VOID_P=4 -DSIZEOF_INT=4 -DHAVE_IEEE_754=1 -DPAGE_SIZE=4096 -DLG_PAGE_SIZE=12 -DRETSIGTYPE=void -DHAVE_STRCOLL=1 -DHAVE_SYSCONF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_STRCSPN=1 -DHAVE_STRERROR=1 -DHAVE_STRSPN=1 -DHAVE_STRSTR=1 -DHAVE_GETENV=1 -DHAVE_STRCHR=1 -DHAVE_GETRLIMIT=1 -DHAVE_GETRUSAGE=1 -DHAVE_VALLOC=1 $(EXTRA_CFLAGS) OBJECT_OUTPUT_OPTION = -o$(space) --- 52,56 ---- JDK_ROOT = $(firstword $(wildcard /usr/java/j2sdk*)) CLASSPATH = .:jdd.jar ! CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -O2 -fomit-frame-pointer $(EXTRA_CFLAGS) CAL_CFLAGS = -O2 -DCLOCK_RESOLUTION=60 -DRLIMIT_DATA_DEFAULT=16777216 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_FILE_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ERRNO_H=1 -DHAVE_ASSERT_H=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_PWD_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_STDARG_H=1 -DHAVE_VARARGS_H=1 -DSIZEOF_VOID_P=4 -DSIZEOF_INT=4 -DHAVE_IEEE_754=1 -DPAGE_SIZE=4096 -DLG_PAGE_SIZE=12 -DRETSIGTYPE=void -DHAVE_STRCOLL=1 -DHAVE_SYSCONF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_STRCSPN=1 -DHAVE_STRERROR=1 -DHAVE_STRSPN=1 -DHAVE_STRSTR=1 -DHAVE_GETENV=1 -DHAVE_STRCHR=1 -DHAVE_GETRLIMIT=1 -DHAVE_GETRUSAGE=1 -DHAVE_VALLOC=1 $(EXTRA_CFLAGS) OBJECT_OUTPUT_OPTION = -o$(space) *************** *** 72,75 **** --- 72,80 ---- LINKFLAGS = -static -shared $(CFLAGS) endif + ifeq (${CC},pathcc) # Pathscale compiler + CFLAGS = -DSPECIALIZE_RELPROD -DSPECIALIZE_AND -DSPECIALIZE_OR -m32 -O3 $(EXTRA_CFLAGS) + LINK = pathcc + LINKFLAGS = -shared $(CFLAGS) + endif endif |
From: John W. <joe...@us...> - 2004-11-01 09:42:02
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11466/net/sf/javabdd Modified Files: BDDDomain.java Log Message: Add error message. Index: BDDDomain.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/BDDDomain.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BDDDomain.java 27 Oct 2004 22:31:14 -0000 1.3 --- BDDDomain.java 1 Nov 2004 09:41:50 -0000 1.4 *************** *** 179,183 **** public BDD buildEquals(BDDDomain that) { if (!this.size().equals(that.size())) { ! throw new BDDException(); } --- 179,183 ---- public BDD buildEquals(BDDDomain that) { if (!this.size().equals(that.size())) { ! throw new BDDException("Size of "+this+" != size of that "+that+"( "+this.size()+" vs "+that.size()+")"); } |
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++) |
From: John W. <joe...@us...> - 2004-11-01 05:01:41
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4192 Modified Files: .classpath Log Message: Exclude target/** from Eclipse build path. Index: .classpath =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/.classpath,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** .classpath 15 Sep 2004 00:02:55 -0000 1.3 --- .classpath 1 Nov 2004 05:01:32 -0000 1.4 *************** *** 1,5 **** <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry kind="src" path=""/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry sourcepath="/jdd/src" kind="lib" path="jdd.jar"/> --- 1,5 ---- <?xml version="1.0" encoding="UTF-8"?> <classpath> ! <classpathentry excluding="target/**" kind="src" path=""/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry sourcepath="/jdd/src" kind="lib" path="jdd.jar"/> |
From: John W. <joe...@us...> - 2004-10-27 22:31:23
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5947/net/sf/javabdd Modified Files: BDDDomain.java Log Message: Don't use == on BigInteger's! Index: BDDDomain.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/BDDDomain.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BDDDomain.java 18 Oct 2004 09:35:20 -0000 1.2 --- BDDDomain.java 27 Oct 2004 22:31:14 -0000 1.3 *************** *** 178,182 **** */ public BDD buildEquals(BDDDomain that) { ! if (this.size() != that.size()) { throw new BDDException(); } --- 178,182 ---- */ public BDD buildEquals(BDDDomain that) { ! if (!this.size().equals(that.size())) { throw new BDDException(); } |
From: John W. <joe...@us...> - 2004-10-26 06:59:40
|
Update of /cvsroot/javabdd/JavaBDD In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24411 Modified Files: .cvsignore Log Message: Ignore velocity.log Index: .cvsignore =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/.cvsignore,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** .cvsignore 19 Oct 2004 11:33:52 -0000 1.8 --- .cvsignore 26 Oct 2004 06:59:32 -0000 1.9 *************** *** 13,14 **** --- 13,15 ---- cal-2.1 target + velocity.log |
From: John W. <joe...@us...> - 2004-10-19 21:47:19
|
Update of /cvsroot/javabdd/JavaBDD/net/sf/javabdd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv680/net/sf/javabdd Modified Files: TypedBDDFactory.java Log Message: Index: TypedBDDFactory.java =================================================================== RCS file: /cvsroot/javabdd/JavaBDD/net/sf/javabdd/TypedBDDFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TypedBDDFactory.java 19 Oct 2004 11:11:35 -0000 1.4 --- TypedBDDFactory.java 19 Oct 2004 21:47:05 -0000 1.5 *************** *** 120,124 **** /* (non-Javadoc) ! * @see net.sf.javabdd.BDDFactory#setMinFreeNodes(int) */ public double setMinFreeNodes(double x) { --- 120,124 ---- /* (non-Javadoc) ! * @see net.sf.javabdd.BDDFactory#setMinFreeNodes(double) */ public double setMinFreeNodes(double x) { |