|
@@ -1,6 +1,6 @@
|
|
|
/***** spin: pangen1.h *****/
|
|
|
|
|
|
-/* Copyright (c) 1989-2003 by Lucent Technologies, Bell Laboratories. */
|
|
|
+/* Copyright (c) 1989-2005 by Lucent Technologies, Bell Laboratories. */
|
|
|
/* All Rights Reserved. This software is for educational purposes only. */
|
|
|
/* No guarantee whatsoever is expressed or implied by the distribution of */
|
|
|
/* this code. Permission is given to distribute this code provided that */
|
|
@@ -185,7 +185,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" static char buf[2][2048];",
|
|
|
" int i, toggle = 0;",
|
|
|
|
|
|
- " if (strlen(s) > 2047) return s;",
|
|
|
+ " if (!s || strlen(s) > 2047) return s;",
|
|
|
" memset(buf[0], 0, 2048);",
|
|
|
" memset(buf[1], 0, 2048);",
|
|
|
" strcpy(buf[toggle], s);",
|
|
@@ -225,7 +225,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" { printf(\"\\t\\t\");",
|
|
|
|
|
|
" q = transmognify(t->tp);",
|
|
|
- " for ( ; *q; q++)",
|
|
|
+ " for ( ; q && *q; q++)",
|
|
|
" if (*q == '\\n')",
|
|
|
" printf(\"\\\\n\");",
|
|
|
" else",
|
|
@@ -241,12 +241,12 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
"",
|
|
|
" if (wrap_in_progress++) return;",
|
|
|
"",
|
|
|
- " printf(\"spin: trail ends after %%d steps\\n\", depth);",
|
|
|
+ " printf(\"spin: trail ends after %%ld steps\\n\", depth);",
|
|
|
" if (onlyproc >= 0)",
|
|
|
" { if (onlyproc >= now._nr_pr) pan_exit(0);",
|
|
|
" II = onlyproc;",
|
|
|
" z = (P0 *)pptr(II);",
|
|
|
- " printf(\"%%3d:\tproc %%d (%%s) \",",
|
|
|
+ " printf(\"%%3ld:\tproc %%d (%%s) \",",
|
|
|
" depth, II, procname[z->_t]);",
|
|
|
" for (i = 0; src_all[i].src; i++)",
|
|
|
" if (src_all[i].tp == (int) z->_t)",
|
|
@@ -265,7 +265,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" if (depth < 0) depth = 0;",
|
|
|
" for (II = 0; II < now._nr_pr; II++)",
|
|
|
" { z = (P0 *)pptr(II);",
|
|
|
- " printf(\"%%3d:\tproc %%d (%%s) \",",
|
|
|
+ " printf(\"%%3ld:\tproc %%d (%%s) \",",
|
|
|
" depth, II, procname[z->_t]);",
|
|
|
" for (i = 0; src_all[i].src; i++)",
|
|
|
" if (src_all[i].tp == (int) z->_t)",
|
|
@@ -293,30 +293,34 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
"findtrail(void)",
|
|
|
"{ FILE *fd;",
|
|
|
" char fnm[512], *q;",
|
|
|
+ " char MyFile[512];",
|
|
|
+ "",
|
|
|
+ " strcpy(MyFile, TrailFile);", /* avoid problem with non-writable strings */
|
|
|
+ "",
|
|
|
" if (whichtrail)",
|
|
|
- " { sprintf(fnm, \"%%s%%d.%%s\", TrailFile, whichtrail, tprefix);",
|
|
|
+ " { sprintf(fnm, \"%%s%%d.%%s\", MyFile, whichtrail, tprefix);",
|
|
|
" fd = fopen(fnm, \"r\");",
|
|
|
- " if (fd == NULL && (q = strchr(TrailFile, \'.\')))",
|
|
|
+ " if (fd == NULL && (q = strchr(MyFile, \'.\')))",
|
|
|
" { *q = \'\\0\';", /* e.g., strip .pml on original file */
|
|
|
- " sprintf(fnm, \"%%s%%d.%%s\", TrailFile, whichtrail, tprefix);",
|
|
|
+ " sprintf(fnm, \"%%s%%d.%%s\", MyFile, whichtrail, tprefix);",
|
|
|
" *q = \'.\';",
|
|
|
" fd = fopen(fnm, \"r\");",
|
|
|
" if (fd == NULL)",
|
|
|
" { printf(\"pan: cannot find %%s%%d.%%s or %%s\\n\", ",
|
|
|
- " TrailFile, whichtrail, tprefix, fnm);",
|
|
|
+ " MyFile, whichtrail, tprefix, fnm);",
|
|
|
" pan_exit(1);",
|
|
|
" } }",
|
|
|
" } else",
|
|
|
- " { sprintf(fnm, \"%%s.%%s\", TrailFile, tprefix);",
|
|
|
+ " { sprintf(fnm, \"%%s.%%s\", MyFile, tprefix);",
|
|
|
" fd = fopen(fnm, \"r\");",
|
|
|
- " if (fd == NULL && (q = strchr(TrailFile, \'.\')))",
|
|
|
+ " if (fd == NULL && (q = strchr(MyFile, \'.\')))",
|
|
|
" { *q = \'\\0\';", /* e.g., strip .pml on original file */
|
|
|
- " sprintf(fnm, \"%%s.%%s\", TrailFile, tprefix);",
|
|
|
+ " sprintf(fnm, \"%%s.%%s\", MyFile, tprefix);",
|
|
|
" *q = \'.\';",
|
|
|
" fd = fopen(fnm, \"r\");",
|
|
|
" if (fd == NULL)",
|
|
|
" { printf(\"pan: cannot find %%s.%%s or %%s\\n\", ",
|
|
|
- " TrailFile, tprefix, fnm);",
|
|
|
+ " MyFile, tprefix, fnm);",
|
|
|
" pan_exit(1);",
|
|
|
" } } }",
|
|
|
" if (fd == NULL)",
|
|
@@ -337,11 +341,16 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" P0 *z;",
|
|
|
"",
|
|
|
" fd = findtrail(); /* exits if unsuccessful */",
|
|
|
- " while (fscanf(fd, \"%%d:%%d:%%d\\n\", &depth, &i, &t_id) == 3)",
|
|
|
+ " while (fscanf(fd, \"%%ld:%%d:%%d\\n\", &depth, &i, &t_id) == 3)",
|
|
|
" { if (depth == -1)",
|
|
|
" printf(\"<<<<<START OF CYCLE>>>>>\\n\");",
|
|
|
" if (depth < 0)",
|
|
|
" continue;",
|
|
|
+ " if (i > now._nr_pr)",
|
|
|
+ " { printf(\"pan: Error, proc %%d invalid pid \", i);",
|
|
|
+ " printf(\"transition %%d\\n\", t_id);",
|
|
|
+ " break;",
|
|
|
+ " }",
|
|
|
" II = i;",
|
|
|
"",
|
|
|
" z = (P0 *)pptr(II);",
|
|
@@ -382,7 +391,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" goto moveon;",
|
|
|
|
|
|
" if (verbose)",
|
|
|
- " { printf(\"depth: %%3d proc: %%3d trans: %%3d (%%d procs) \",",
|
|
|
+ " { printf(\"depth: %%3ld proc: %%3d trans: %%3d (%%d procs) \",",
|
|
|
" depth, II, t_id, now._nr_pr);",
|
|
|
" printf(\"forw=%%3d [%%s]\\n\", t->forw, q);",
|
|
|
"",
|
|
@@ -409,14 +418,14 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" {",
|
|
|
"sameas: if (no_rck) goto moveon;",
|
|
|
" if (coltrace)",
|
|
|
- " { printf(\"%%d: \", depth);",
|
|
|
+ " { printf(\"%%ld: \", depth);",
|
|
|
" for (i = 0; i < II; i++)",
|
|
|
" printf(\"\\t\\t\");",
|
|
|
" printf(\"%%s(%%d):\", procname[z->_t], II);",
|
|
|
- " printf(\"[%%s]\\n\", q);",
|
|
|
- " } else",
|
|
|
+ " printf(\"[%%s]\\n\", q?q:\"\");",
|
|
|
+ " } else if (!silent)",
|
|
|
" { if (strlen(simvals) > 0) {",
|
|
|
- " printf(\"%%3d: proc %%2d (%%s)\", ",
|
|
|
+ " printf(\"%%3ld: proc %%2d (%%s)\", ",
|
|
|
" depth, II, procname[z->_t]);",
|
|
|
" for (i = 0; src_all[i].src; i++)",
|
|
|
" if (src_all[i].tp == (int) z->_t)",
|
|
@@ -426,7 +435,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" }",
|
|
|
" printf(\"(state %%d)\t[values: %%s]\\n\", z->_p, simvals);",
|
|
|
" }",
|
|
|
- " printf(\"%%3d: proc %%2d (%%s)\", ",
|
|
|
+ " printf(\"%%3ld: proc %%2d (%%s)\", ",
|
|
|
" depth, II, procname[z->_t]);",
|
|
|
" for (i = 0; src_all[i].src; i++)",
|
|
|
" if (src_all[i].tp == (int) z->_t)",
|
|
@@ -434,7 +443,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
" src_all[i].src[z->_p]);",
|
|
|
" break;",
|
|
|
" }",
|
|
|
- " printf(\"(state %%d)\t[%%s]\\n\", z->_p, q);",
|
|
|
+ " printf(\"(state %%d)\t[%%s]\\n\", z->_p, q?q:\"\");",
|
|
|
" printf(\"\\n\");",
|
|
|
" } }",
|
|
|
"moveon: z->_p = t->st;",
|
|
@@ -491,6 +500,9 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
"#ifdef DEBUG",
|
|
|
" printf(\"New bitstate\\n\");",
|
|
|
"#endif",
|
|
|
+ " if (now._a_t&1)",
|
|
|
+ " { nShadow++;",
|
|
|
+ " }",
|
|
|
" return 0;",
|
|
|
"}",
|
|
|
#endif
|
|
@@ -526,6 +538,9 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
"#ifdef DEBUG",
|
|
|
" printf(\"New bitstate\\n\");",
|
|
|
"#endif",
|
|
|
+ " if (now._a_t&1)",
|
|
|
+ " { nShadow++;",
|
|
|
+ " }",
|
|
|
" return 0;",
|
|
|
"}",
|
|
|
"#endif",
|
|
@@ -538,30 +553,35 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
"make_trail(void)",
|
|
|
"{ int fd;",
|
|
|
" char *q;",
|
|
|
+ " char MyFile[512];",
|
|
|
+ "",
|
|
|
+ " q = strrchr(TrailFile, \'/\');",
|
|
|
+ " if (q == NULL) q = TrailFile; else q++;",
|
|
|
+ " strcpy(MyFile, q); /* TrailFile is not a writable string */",
|
|
|
"",
|
|
|
" if (iterative == 0 && Nr_Trails++ > 0)",
|
|
|
" sprintf(fnm, \"%%s%%d.%%s\",",
|
|
|
- " TrailFile, Nr_Trails-1, tprefix);",
|
|
|
+ " MyFile, Nr_Trails-1, tprefix);",
|
|
|
" else",
|
|
|
- " sprintf(fnm, \"%%s.%%s\", TrailFile, tprefix);",
|
|
|
+ " sprintf(fnm, \"%%s.%%s\", MyFile, tprefix);",
|
|
|
"",
|
|
|
- " if ((fd = creat(fnm, (unsigned short) TMODE)) < 0)",
|
|
|
- " { if ((q = strchr(TrailFile, \'.\')))",
|
|
|
+ " if ((fd = creat(fnm, TMODE)) < 0)",
|
|
|
+ " { if ((q = strchr(MyFile, \'.\')))",
|
|
|
" { *q = \'\\0\';", /* strip .pml */
|
|
|
" if (iterative == 0 && Nr_Trails-1 > 0)",
|
|
|
" sprintf(fnm, \"%%s%%d.%%s\",",
|
|
|
- " TrailFile, Nr_Trails-1, tprefix);",
|
|
|
+ " MyFile, Nr_Trails-1, tprefix);",
|
|
|
" else",
|
|
|
- " sprintf(fnm, \"%%s.%%s\", TrailFile, tprefix);",
|
|
|
+ " sprintf(fnm, \"%%s.%%s\", MyFile, tprefix);",
|
|
|
" *q = \'.\';",
|
|
|
- " fd = creat(fnm, (unsigned short) TMODE);",
|
|
|
+ " fd = creat(fnm, TMODE);",
|
|
|
" } }",
|
|
|
" if (fd < 0)",
|
|
|
- " { printf(\"cannot create %%s\\n\", fnm);",
|
|
|
+ " { printf(\"pan: cannot create %%s\\n\", fnm);",
|
|
|
" perror(\"cause\");",
|
|
|
" } else",
|
|
|
- " printf(\"pan: wrote %%s\\n\", fnm);",
|
|
|
- "",
|
|
|
+ " { printf(\"pan: wrote %%s\\n\", fnm);",
|
|
|
+ " }",
|
|
|
" return fd;",
|
|
|
"}",
|
|
|
0
|
|
@@ -569,7 +589,7 @@ static char *Code2a[] = { /* the tail of procedure run() */
|
|
|
|
|
|
static char *Code2b[] = { /* breadth-first search option */
|
|
|
"#ifdef BFS",
|
|
|
- "#define QPROVISO",
|
|
|
+ "#define Q_PROVISO",
|
|
|
"#ifndef INLINE_REV",
|
|
|
"#define INLINE_REV",
|
|
|
"#endif",
|
|
@@ -585,8 +605,13 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" int sz;", /* vsize */
|
|
|
" int nrpr;",
|
|
|
" int nrqs;",
|
|
|
- " int *po, *ps;",
|
|
|
- " int *qo, *qs;",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
+ " int *po;",
|
|
|
+ "#else",
|
|
|
+ " short *po;",
|
|
|
+ "#endif",
|
|
|
+ " int *qo;",
|
|
|
+ " uchar *ps, *qs;",
|
|
|
" struct EV_Hold *nxt;",
|
|
|
"} EV_Hold;",
|
|
|
"",
|
|
@@ -594,7 +619,7 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" Trail *frame;",
|
|
|
" SV_Hold *onow;",
|
|
|
" EV_Hold *omask;",
|
|
|
- "#ifdef QPROVISO",
|
|
|
+ "#ifdef Q_PROVISO",
|
|
|
" struct H_el *lstate;",
|
|
|
"#endif",
|
|
|
" short boq;",
|
|
@@ -647,10 +672,15 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" && (memcmp((char *) Mask, (char *) h->sv, n) == 0)",
|
|
|
" && (now._nr_pr == h->nrpr)",
|
|
|
" && (now._nr_qs == h->nrqs)",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
" && (memcmp((char *) proc_offset, (char *) h->po, now._nr_pr * sizeof(int)) == 0)",
|
|
|
- " && (memcmp((char *) proc_skip, (char *) h->ps, now._nr_pr * sizeof(int)) == 0)",
|
|
|
" && (memcmp((char *) q_offset, (char *) h->qo, now._nr_qs * sizeof(int)) == 0)",
|
|
|
- " && (memcmp((char *) q_skip, (char *) h->qs, now._nr_qs * sizeof(int)) == 0))",
|
|
|
+ "#else",
|
|
|
+ " && (memcmp((char *) proc_offset, (char *) h->po, now._nr_pr * sizeof(short)) == 0)",
|
|
|
+ " && (memcmp((char *) q_offset, (char *) h->qo, now._nr_qs * sizeof(short)) == 0)",
|
|
|
+ "#endif",
|
|
|
+ " && (memcmp((char *) proc_skip, (char *) h->ps, now._nr_pr * sizeof(uchar)) == 0)",
|
|
|
+ " && (memcmp((char *) q_skip, (char *) h->qs, now._nr_qs * sizeof(uchar)) == 0))",
|
|
|
" break;",
|
|
|
" if (!h)",
|
|
|
" { h = (EV_Hold *) emalloc(sizeof(EV_Hold));",
|
|
@@ -664,14 +694,22 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" if (now._nr_pr > 0)",
|
|
|
" { h->po = (int *) emalloc(now._nr_pr * sizeof(int));",
|
|
|
" h->ps = (int *) emalloc(now._nr_pr * sizeof(int));",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
" memcpy((char *) h->po, (char *) proc_offset, now._nr_pr * sizeof(int));",
|
|
|
- " memcpy((char *) h->ps, (char *) proc_skip, now._nr_pr * sizeof(int));",
|
|
|
+ "#else",
|
|
|
+ " memcpy((char *) h->po, (char *) proc_offset, now._nr_pr * sizeof(short));",
|
|
|
+ "#endif",
|
|
|
+ " memcpy((char *) h->ps, (char *) proc_skip, now._nr_pr * sizeof(uchar));",
|
|
|
" }",
|
|
|
" if (now._nr_qs > 0)",
|
|
|
" { h->qo = (int *) emalloc(now._nr_qs * sizeof(int));",
|
|
|
" h->qs = (int *) emalloc(now._nr_qs * sizeof(int));",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
" memcpy((char *) h->qo, (char *) q_offset, now._nr_qs * sizeof(int));",
|
|
|
- " memcpy((char *) h->qs, (char *) q_skip, now._nr_qs * sizeof(int));",
|
|
|
+ "#else",
|
|
|
+ " memcpy((char *) h->qo, (char *) q_offset, now._nr_qs * sizeof(short));",
|
|
|
+ "#endif",
|
|
|
+ " memcpy((char *) h->qs, (char *) q_skip, now._nr_qs * sizeof(uchar));",
|
|
|
" }",
|
|
|
"",
|
|
|
" h->nxt = kept;",
|
|
@@ -725,7 +763,7 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" t->onow = getsv(vsize);",
|
|
|
" memcpy((char *)t->onow->sv, (char *)&now, vsize);",
|
|
|
" t->omask = getsv_mask(vsize);",
|
|
|
- "#if defined(FULLSTACK) && defined(QPROVISO)",
|
|
|
+ "#if defined(FULLSTACK) && defined(Q_PROVISO)",
|
|
|
" t->lstate = Lstate;",
|
|
|
"#endif",
|
|
|
" if (!bfs_bot)",
|
|
@@ -750,7 +788,7 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" bfs_trail = t->nxt;",
|
|
|
" if (!bfs_trail)",
|
|
|
" bfs_bot = (BFS_Trail *) 0;",
|
|
|
- "#if defined(QPROVISO) && !defined(BITSTATE) && !defined(NOREDUCE)",
|
|
|
+ "#if defined(Q_PROVISO) && !defined(BITSTATE) && !defined(NOREDUCE)",
|
|
|
" if (t->lstate) t->lstate->tagged = 0;",
|
|
|
"#endif",
|
|
|
"",
|
|
@@ -764,12 +802,20 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" memcpy((uchar *) Mask, (uchar *) t->omask->sv, vsize);",
|
|
|
|
|
|
" if (now._nr_pr > 0)",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
" { memcpy((char *)proc_offset, (char *)t->omask->po, now._nr_pr * sizeof(int));",
|
|
|
- " memcpy((char *)proc_skip, (char *)t->omask->ps, now._nr_pr * sizeof(int));",
|
|
|
+ "#else",
|
|
|
+ " { memcpy((char *)proc_offset, (char *)t->omask->po, now._nr_pr * sizeof(short));",
|
|
|
+ "#endif",
|
|
|
+ " memcpy((char *)proc_skip, (char *)t->omask->ps, now._nr_pr * sizeof(uchar));",
|
|
|
" }",
|
|
|
" if (now._nr_qs > 0)",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
" { memcpy((uchar *)q_offset, (uchar *)t->omask->qo, now._nr_qs * sizeof(int));",
|
|
|
- " memcpy((uchar *)q_skip, (uchar *)t->omask->qs, now._nr_qs * sizeof(int));",
|
|
|
+ "#else",
|
|
|
+ " { memcpy((uchar *)q_offset, (uchar *)t->omask->qo, now._nr_qs * sizeof(short));",
|
|
|
+ "#endif",
|
|
|
+ " memcpy((uchar *)q_skip, (uchar *)t->omask->qs, now._nr_qs * sizeof(uchar));",
|
|
|
" }",
|
|
|
|
|
|
" freesv(t->onow); /* omask not freed */",
|
|
@@ -867,7 +913,7 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" } else",
|
|
|
" { truncs++;",
|
|
|
|
|
|
- "#if !defined(NOREDUCE) && defined(FULLSTACK) && defined(QPROVISO)",
|
|
|
+ "#if !defined(NOREDUCE) && defined(FULLSTACK) && defined(Q_PROVISO)",
|
|
|
"#if !defined(QLIST) && !defined(BITSTATE)",
|
|
|
" if (Lstate && Lstate->tagged) trpt->tau |= 64;",
|
|
|
"#else",
|
|
@@ -893,9 +939,11 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
"#endif",
|
|
|
"}",
|
|
|
"",
|
|
|
+ "Trail *ntrpt;", /* 4.2.8 */
|
|
|
+ "",
|
|
|
"void",
|
|
|
"bfs(void)",
|
|
|
- "{ Trans *t; Trail *ntrpt, *otrpt, *x;",
|
|
|
+ "{ Trans *t; Trail *otrpt, *x;",
|
|
|
" uchar _n, _m, ot, nps = 0;",
|
|
|
" int tt, E_state;",
|
|
|
" short II, From = (short) (now._nr_pr-1), To = BASE;",
|
|
@@ -1199,13 +1247,15 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
" j = strlen(snap);",
|
|
|
" if (write(fd, snap, j) != j)",
|
|
|
" { printf(\"pan: error writing %%s\\n\", fnm);",
|
|
|
- " exit(1);",
|
|
|
+ " pan_exit(1);",
|
|
|
" } }",
|
|
|
"}",
|
|
|
"",
|
|
|
"void",
|
|
|
"nuerror(char *str)",
|
|
|
"{ int fd = make_trail();",
|
|
|
+ " int j;",
|
|
|
+ "",
|
|
|
" if (fd < 0) return;",
|
|
|
"#ifdef VERI",
|
|
|
" sprintf(snap, \"-2:%%d:-2\\n\", VERI);",
|
|
@@ -1217,9 +1267,19 @@ static char *Code2b[] = { /* breadth-first search option */
|
|
|
"#endif",
|
|
|
" trcnt = 1;",
|
|
|
" putter(trpt, fd);",
|
|
|
+ " if (ntrpt->o_t)", /* 4.2.8 -- Alex example, missing last transition */
|
|
|
+ " { sprintf(snap, \"%%d:%%d:%%d\\n\",",
|
|
|
+ " trcnt++, ntrpt->pr, ntrpt->o_t->t_id);",
|
|
|
+ " j = strlen(snap);",
|
|
|
+ " if (write(fd, snap, j) != j)",
|
|
|
+ " { printf(\"pan: error writing %%s\\n\", fnm);",
|
|
|
+ " pan_exit(1);",
|
|
|
+ " } }",
|
|
|
" close(fd);",
|
|
|
" if (errors >= upto && upto != 0)",
|
|
|
+ " {",
|
|
|
" wrapup();",
|
|
|
+ " }",
|
|
|
"}",
|
|
|
"#endif", /* BFS */
|
|
|
0,
|
|
@@ -1398,7 +1458,7 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
" }",
|
|
|
"#ifdef NEGATED_TRACE",
|
|
|
- " now._event = start_event; /* only 1st try will count */",
|
|
|
+ " now._event = endevent; /* only 1st try will count -- fixed 4.2.6 */",
|
|
|
"#else",
|
|
|
"#ifndef BFS",
|
|
|
" depth++; trpt++;",
|
|
@@ -1456,7 +1516,7 @@ static char *Code2c[] = {
|
|
|
"stack2disk(void)",
|
|
|
"{",
|
|
|
" if (!stackwrite",
|
|
|
- " && (stackwrite = creat(stackfile, 0666)) < 0)",
|
|
|
+ " && (stackwrite = creat(stackfile, TMODE)) < 0)",
|
|
|
" Uerror(\"cannot create stackfile\");",
|
|
|
"",
|
|
|
" if (write(stackwrite, trail, DDD*sizeof(Trail))",
|
|
@@ -1563,7 +1623,8 @@ static char *Code2c[] = {
|
|
|
" }",
|
|
|
"AllOver:",
|
|
|
"#if defined(FULLSTACK) && !defined(MA)",
|
|
|
- " trpt->ostate = (struct H_el *) 0;",
|
|
|
+ " /* if atomic or rv move, carry forward previous state */",
|
|
|
+ " trpt->ostate = (trpt-1)->ostate;", /* was: = (struct H_el *) 0;*/
|
|
|
"#endif",
|
|
|
"#ifdef VERI",
|
|
|
" if ((trpt->tau&4) || ((trpt-1)->tau&128))",
|
|
@@ -1628,8 +1689,22 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
"#endif",
|
|
|
" kk = (II == 1 || II == 2);",
|
|
|
-
|
|
|
+ /* II==0 new state */
|
|
|
+ /* II==1 old state */
|
|
|
+ /* II==2 on current dfs stack */
|
|
|
+ /* II==3 on 1st dfs stack */
|
|
|
"#ifndef SAFETY",
|
|
|
+
|
|
|
+ " if (!fairness && a_cycles)",
|
|
|
+ " if (II == 2 && ((trpt->o_pm&2) || ((trpt-1)->o_pm&2)))",
|
|
|
+ " { II = 3; /* Schwoon & Esparza 2005, Gastin&Moro 2004 */",
|
|
|
+ "#ifdef VERBOSE",
|
|
|
+ " printf(\"state match on dfs stack\\n\");",
|
|
|
+ "#endif",
|
|
|
+ " goto same_case;",
|
|
|
+ " }",
|
|
|
+
|
|
|
+
|
|
|
"#if defined(FULLSTACK) && defined(BITSTATE)",
|
|
|
" if (!JJ && (now._a_t&1) && depth > A_depth)",
|
|
|
" { int oj1 = j1;",
|
|
@@ -1657,12 +1732,10 @@ static char *Code2c[] = {
|
|
|
" } else",
|
|
|
"#endif",
|
|
|
" {",
|
|
|
- "#ifdef BITSTATE",
|
|
|
- " depthfound = Lstate->tagged - 1;",
|
|
|
- "#else",
|
|
|
- " depthfound = depth_of(Lstate);",
|
|
|
+ "#ifndef BITSTATE",
|
|
|
" nShadow--;",
|
|
|
"#endif",
|
|
|
+ "same_case: if (Lstate) depthfound = Lstate->D;",
|
|
|
"#ifdef NP",
|
|
|
" uerror(\"non-progress cycle\");",
|
|
|
"#else",
|
|
@@ -2736,7 +2809,6 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
"#endif",
|
|
|
|
|
|
-
|
|
|
" signal(SIGINT, SIG_DFL);",
|
|
|
" printf(\"(%%s)\\n\", Version);",
|
|
|
" if (!done) printf(\"Warning: Search not completed\\n\");",
|
|
@@ -2750,7 +2822,7 @@ static char *Code2c[] = {
|
|
|
" printf(\" + Partial Order Reduction\\n\");",
|
|
|
"#endif",
|
|
|
#if 0
|
|
|
- "#ifdef QPROVISO",
|
|
|
+ "#ifdef Q_PROVISO",
|
|
|
" printf(\" + Queue Proviso\\n\");",
|
|
|
"#endif",
|
|
|
#endif
|
|
@@ -2925,7 +2997,7 @@ static char *Code2c[] = {
|
|
|
" { printf(\"\tState-vector as stored = %%.0f byte\",",
|
|
|
" (tmp_nr)/(nstates-nShadow) -",
|
|
|
" (double) (sizeof(struct H_el) - sizeof(unsigned)));",
|
|
|
- " printf(\" + %%d byte overhead\\n\",",
|
|
|
+ " printf(\" + %%ld byte overhead\\n\",",
|
|
|
" sizeof(struct H_el)-sizeof(unsigned));",
|
|
|
" }",
|
|
|
"#endif",
|
|
@@ -2936,8 +3008,9 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
"#endif",
|
|
|
"#ifndef BFS",
|
|
|
- " printf(\"%%-6.3f\tmemory used for DFS stack (-m%%d)\\n\",",
|
|
|
+ " printf(\"%%-6.3f\tmemory used for DFS stack (-m%%ld)\\n\",",
|
|
|
" nr2/1000000., maxdepth);",
|
|
|
+ " remainder = remainder - nr2;",
|
|
|
"#endif",
|
|
|
" if (remainder - fragment > 0.0)",
|
|
|
" printf(\"%%-6.3f\tother (proc and chan stacks)\\n\",",
|
|
@@ -2986,13 +3059,14 @@ static char *Code2c[] = {
|
|
|
"stopped(int arg)",
|
|
|
"{ printf(\"Interrupted\\n\");",
|
|
|
" wrapup();",
|
|
|
+ " pan_exit(0);",
|
|
|
"}",
|
|
|
"/*",
|
|
|
" * based on Bob Jenkins hash-function from 1996",
|
|
|
" * see: http://www.burtleburtle.net/bob/",
|
|
|
" */",
|
|
|
"",
|
|
|
-"#ifdef HASH64",
|
|
|
+"#if defined(HASH64) || defined(WIN64)",
|
|
|
/* 64-bit Jenkins hash: http://burtleburtle.net/bob/c/lookup8.c */
|
|
|
"#define mix(a,b,c) \\",
|
|
|
"{ a -= b; a -= c; a ^= (c>>43); \\",
|
|
@@ -3148,6 +3222,7 @@ static char *Code2c[] = {
|
|
|
" case 'P': readtrail = 1; onlyproc = atoi(&argv[1][2]); break;",
|
|
|
" case 'C': coltrace = 1; goto samething;",
|
|
|
" case 'g': gui = 1; goto samething;",
|
|
|
+ " case 'S': silent = 1; break;",
|
|
|
"#endif",
|
|
|
" case 'R': Nrun = atoi(&argv[1][2]); break;",
|
|
|
"#ifdef BITSTATE",
|
|
@@ -3161,10 +3236,20 @@ static char *Code2c[] = {
|
|
|
" case 'w': ssize = atoi(&argv[1][2]); break;",
|
|
|
" case 'Y': signoff = 1; break;",
|
|
|
" case 'X': efd = stdout; break;",
|
|
|
- " default : usage(efd); break;",
|
|
|
+ " default : fprintf(efd, \"saw option -%%c\\n\", argv[1][1]); usage(efd); break;",
|
|
|
" }",
|
|
|
" argc--; argv++;",
|
|
|
" }",
|
|
|
+ " if (iterative && TMODE != 0666)",
|
|
|
+ " { TMODE = 0666;",
|
|
|
+ " fprintf(efd, \"warning: -T ignored when -i or -I is used\\n\");",
|
|
|
+ " }",
|
|
|
+ "#if defined(WIN32) || defined(WIN64)",
|
|
|
+ " if (TMODE == 0666)",
|
|
|
+ " TMODE = _S_IWRITE | _S_IREAD;",
|
|
|
+ " else",
|
|
|
+ " TMODE = _S_IREAD;",
|
|
|
+ "#endif",
|
|
|
"#ifdef OHASH",
|
|
|
" fprintf(efd, \"warning: -DOHASH no longer supported (directive ignored)\\n\");",
|
|
|
"#endif",
|
|
@@ -3208,10 +3293,6 @@ static char *Code2c[] = {
|
|
|
" }",
|
|
|
|
|
|
"#endif",
|
|
|
- " if (iterative && TMODE != 0666)",
|
|
|
- " { TMODE = 0666;",
|
|
|
- " fprintf(efd, \"warning: -T ignored when -i or -I is used\\n\");",
|
|
|
- " }",
|
|
|
"#ifdef SC",
|
|
|
" hiwater = HHH = maxdepth-10;",
|
|
|
" DDD = HHH/2;",
|
|
@@ -3375,14 +3456,18 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
|
|
|
"#if SYNC>0 && !defined(NOREDUCE)",
|
|
|
- "#ifdef HAS_UNLESS",
|
|
|
+ "#ifdef HAS_UNLESS",
|
|
|
" fprintf(efd, \"warning: use of a rendezvous stmnts in the escape\\n\");",
|
|
|
" fprintf(efd, \"\tof an unless clause, if present, could make p.o. reduction\\n\");",
|
|
|
" fprintf(efd, \"\tinvalid (use -DNOREDUCE to avoid this)\\n\");",
|
|
|
- "#ifdef BFS",
|
|
|
+ "#ifdef BFS",
|
|
|
" fprintf(efd, \"\t(this type of rv is also not compatible with -DBFS)\\n\");",
|
|
|
+ "#endif",
|
|
|
+ "#endif",
|
|
|
"#endif",
|
|
|
- "#endif",
|
|
|
+ "#if SYNC>0 && defined(BFS)",
|
|
|
+ " fprintf(efd, \"warning: use of rendezvous in BFS mode \");",
|
|
|
+ " fprintf(efd, \"does not preserve all invalid endstates\\n\");",
|
|
|
"#endif",
|
|
|
"#if !defined(REACH) && !defined(BITSTATE)",
|
|
|
" if (iterative != 0 && a_cycles == 0)",
|
|
@@ -3467,7 +3552,7 @@ static char *Code2c[] = {
|
|
|
" nmask = mask;",
|
|
|
"#endif",
|
|
|
" } else if (WS != 4)",
|
|
|
- " { fprintf(stderr, \"pan: wordsize %%d not supported\\n\", WS);",
|
|
|
+ " { fprintf(stderr, \"pan: wordsize %%ld not supported\\n\", WS);",
|
|
|
" exit(1);",
|
|
|
" } else /* WS == 4 and ssize < 32 */",
|
|
|
" { mask = ((1L<<ssize)-1); /* hash init */",
|
|
@@ -3564,6 +3649,7 @@ static char *Code2c[] = {
|
|
|
" fprintf(fd, \"\t-C read and execute trail - columnated output (can add -v,-n)\\n\");",
|
|
|
" fprintf(fd, \"\t-PN read and execute trail - restrict trail output to proc N\\n\");",
|
|
|
" fprintf(fd, \"\t-g read and execute trail + msc gui support\\n\");",
|
|
|
+ " fprintf(fd, \"\t-S silent replay: only user defined printfs show\\n\");",
|
|
|
"#endif",
|
|
|
"#ifdef BITSTATE",
|
|
|
" fprintf(fd, \"\t-RN repeat run Nx with N \");",
|
|
@@ -3574,9 +3660,9 @@ static char *Code2c[] = {
|
|
|
" fprintf(fd, \"\t-tsuf replace .trail with .suf on trailfiles\\n\");",
|
|
|
" fprintf(fd, \"\t-V print SPIN version number\\n\");",
|
|
|
" fprintf(fd, \"\t-v verbose -- filenames in unreached state listing\\n\");",
|
|
|
- " fprintf(fd, \"\t-wN hashtable of 2^N entries\");",
|
|
|
+ " fprintf(fd, \"\t-wN hashtable of 2^N entries \");",
|
|
|
" fprintf(fd, \"(defaults to -w%%d)\\n\", ssize);",
|
|
|
- " pan_exit(1);",
|
|
|
+ " exit(1);",
|
|
|
"}",
|
|
|
"",
|
|
|
"char *",
|
|
@@ -3782,7 +3868,7 @@ static char *Code2c[] = {
|
|
|
"",
|
|
|
" if (unwinding) return; /* 1.4.2 */",
|
|
|
" if (strncmp(str, laststr, 254))",
|
|
|
- " printf(\"pan: %%s (at depth %%d)\\n\", str,",
|
|
|
+ " printf(\"pan: %%s (at depth %%ld)\\n\", str,",
|
|
|
" (depthfound==-1)?depth:depthfound);",
|
|
|
" strncpy(laststr, str, 254);",
|
|
|
" errors++;",
|
|
@@ -3827,7 +3913,7 @@ static char *Code2c[] = {
|
|
|
" if (iterative != 0 && maxdepth > 0)",
|
|
|
" { maxdepth = (iterative == 1)?(depth-1):(depth/2);",
|
|
|
" warned = 1;",
|
|
|
- " printf(\"pan: reducing search depth to %%d\\n\",",
|
|
|
+ " printf(\"pan: reducing search depth to %%ld\\n\",",
|
|
|
" maxdepth);",
|
|
|
" } else",
|
|
|
"#endif",
|
|
@@ -3837,7 +3923,7 @@ static char *Code2c[] = {
|
|
|
"}\n",
|
|
|
"int",
|
|
|
"xrefsrc(int lno, S_F_MAP *mp, int M, int i)",
|
|
|
- "{ Trans *T; int j;",
|
|
|
+ "{ Trans *T; int j, retval=1;",
|
|
|
" for (T = trans[M][i]; T; T = T->nxt)",
|
|
|
" if (T && T->tp)",
|
|
|
" { if (strcmp(T->tp, \".(goto)\") == 0",
|
|
@@ -3855,12 +3941,13 @@ static char *Code2c[] = {
|
|
|
" if (strcmp(T->tp, \"\") != 0)",
|
|
|
" { char *q;",
|
|
|
" q = transmognify(T->tp);",
|
|
|
- " printf(\", \\\"%%s\\\"\", q);",
|
|
|
+ " printf(\", \\\"%%s\\\"\", q?q:\"\");",
|
|
|
" } else if (stopstate[M][i])",
|
|
|
" printf(\", -end state-\");",
|
|
|
" printf(\"\\n\");",
|
|
|
+ " retval = 0; /* reported */",
|
|
|
" }",
|
|
|
- " return 0;",
|
|
|
+ " return retval;",
|
|
|
"}\n",
|
|
|
"void",
|
|
|
"r_ck(uchar *which, int N, int M, short *src, S_F_MAP *mp)",
|
|
@@ -3886,7 +3973,9 @@ static char *Code2c[] = {
|
|
|
"putrail(void)",
|
|
|
"{ int fd; long i, j;",
|
|
|
" Trail *trl;",
|
|
|
+ "#if defined VERI || defined(MERGED)",
|
|
|
" char snap[64];",
|
|
|
+ "#endif",
|
|
|
"",
|
|
|
" fd = make_trail();",
|
|
|
" if (fd < 0) return;",
|
|
@@ -3904,7 +3993,7 @@ static char *Code2c[] = {
|
|
|
" trl = getframe(i);",
|
|
|
" if (!trl->o_t) continue;",
|
|
|
" if (trl->o_pm&128) continue;",
|
|
|
- " sprintf(snap, \"%%d:%%d:%%d\\n\", ",
|
|
|
+ " sprintf(snap, \"%%ld:%%d:%%d\\n\", ",
|
|
|
" i, trl->pr, trl->o_t->t_id);",
|
|
|
" j = strlen(snap);",
|
|
|
" if (write(fd, snap, j) != j)",
|
|
@@ -3970,7 +4059,7 @@ static char *Code2c[] = {
|
|
|
"p_restor(int h)",
|
|
|
"{ int i; char *z = (char *) &now;\n",
|
|
|
" proc_offset[h] = stack->o_offset;",
|
|
|
- " proc_skip[h] = stack->o_skip;",
|
|
|
+ " proc_skip[h] = (uchar) stack->o_skip;",
|
|
|
"#ifndef XUSAFE",
|
|
|
" p_name[h] = stack->o_name;",
|
|
|
"#endif",
|
|
@@ -4009,7 +4098,7 @@ static char *Code2c[] = {
|
|
|
" int k, k_end;",
|
|
|
"#endif",
|
|
|
" q_offset[now._nr_qs] = stack->o_offset;",
|
|
|
- " q_skip[now._nr_qs] = stack->o_skip;",
|
|
|
+ " q_skip[now._nr_qs] = (uchar) stack->o_skip;",
|
|
|
"#ifndef XUSAFE",
|
|
|
" q_name[now._nr_qs] = stack->o_name;",
|
|
|
"#endif",
|
|
@@ -4092,7 +4181,11 @@ static char *Code2c[] = {
|
|
|
" }",
|
|
|
" stack = stack->nxt;",
|
|
|
" stack->o_offset = proc_offset[h];",
|
|
|
- " stack->o_skip = proc_skip[h];",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
+ " stack->o_skip = (int) proc_skip[h];",
|
|
|
+ "#else",
|
|
|
+ " stack->o_skip = (short) proc_skip[h];",
|
|
|
+ "#endif",
|
|
|
"#ifndef XUSAFE",
|
|
|
" stack->o_name = p_name[h];",
|
|
|
"#endif",
|
|
@@ -4103,7 +4196,7 @@ static char *Code2c[] = {
|
|
|
" vsize = proc_offset[h];",
|
|
|
" now._nr_pr = now._nr_pr - 1;",
|
|
|
" memset((char *)pptr(h), 0, d);",
|
|
|
- " vsize -= proc_skip[h];",
|
|
|
+ " vsize -= (int) proc_skip[h];",
|
|
|
"#ifndef NOVSZ",
|
|
|
" now._vsz = vsize;",
|
|
|
"#endif",
|
|
@@ -4131,7 +4224,11 @@ static char *Code2c[] = {
|
|
|
" }",
|
|
|
" stack = stack->nxt;",
|
|
|
" stack->o_offset = q_offset[h];",
|
|
|
- " stack->o_skip = q_skip[h];",
|
|
|
+ "#if VECTORSZ>32000",
|
|
|
+ " stack->o_skip = (int) q_skip[h];",
|
|
|
+ "#else",
|
|
|
+ " stack->o_skip = (short) q_skip[h];",
|
|
|
+ "#endif",
|
|
|
"#ifndef XUSAFE",
|
|
|
" stack->o_name = q_name[h];",
|
|
|
"#endif",
|
|
@@ -4141,7 +4238,7 @@ static char *Code2c[] = {
|
|
|
" vsize = q_offset[h];",
|
|
|
" now._nr_qs = now._nr_qs - 1;",
|
|
|
" memset((char *)qptr(h), 0, d);",
|
|
|
- " vsize -= q_skip[h];",
|
|
|
+ " vsize -= (int) q_skip[h];",
|
|
|
"#ifndef NOVSZ",
|
|
|
" now._vsz = vsize;",
|
|
|
"#endif",
|
|
@@ -4218,7 +4315,6 @@ static char *Code2c[] = {
|
|
|
" memcpy((char *)&A_Root, (char *)&now, vsize);",
|
|
|
" A_depth = depthfound = depth;",
|
|
|
" new_state(); /* start 2nd DFS */",
|
|
|
-
|
|
|
" now._a_t = o_a_t;",
|
|
|
"#ifndef NOFAIR",
|
|
|
" now._cnt[1] = o_cnt;",
|
|
@@ -4240,13 +4336,7 @@ static char *Code2c[] = {
|
|
|
"struct H_el *Free_list = (struct H_el *) 0;",
|
|
|
"void",
|
|
|
"onstack_init(void) /* to store stack states in a bitstate search */",
|
|
|
- "{ S_Tab = (struct H_el **)",
|
|
|
-#if 0
|
|
|
- " emalloc((1L<<(ssize-3))*sizeof(struct H_el *));",
|
|
|
- /* can lead to excessive memory use */
|
|
|
-#else
|
|
|
- " emalloc(maxdepth*sizeof(struct H_el *));",
|
|
|
-#endif
|
|
|
+ "{ S_Tab = (struct H_el **) emalloc(maxdepth*sizeof(struct H_el *));",
|
|
|
"}",
|
|
|
"struct H_el *",
|
|
|
"grab_state(int n)",
|
|
@@ -4582,7 +4672,7 @@ static char *Code2c[] = {
|
|
|
" for (w = Free_list; w; Fa++, last=w, w = w->nxt)",
|
|
|
" { if ((int) w->tagged <= n)",
|
|
|
" { if (last)",
|
|
|
- " { v->nxt = w->nxt;",
|
|
|
+ " { v->nxt = w; /* was: v->nxt = w->nxt; */",
|
|
|
" last->nxt = v;",
|
|
|
" } else",
|
|
|
" { v->nxt = Free_list;",
|
|
@@ -4635,7 +4725,7 @@ static char *Code2c[] = {
|
|
|
" for (tmp = S_Tab[j1]; tmp; Zn++, tmp = tmp->nxt)",
|
|
|
" { m = memcmp(((char *)&(tmp->state)),v,n);",
|
|
|
" if (m <= 0)",
|
|
|
- " { Lstate = tmp;",
|
|
|
+ " { Lstate = (struct H_el *) tmp;",
|
|
|
" break;",
|
|
|
" } }",
|
|
|
" PROBE++;",
|
|
@@ -4787,6 +4877,9 @@ static char *Code2c[] = {
|
|
|
"hstore(char *vin, int nin) /* hash table storage */",
|
|
|
"{ struct H_el *tmp, *ntmp, *olst = (struct H_el *) 0;",
|
|
|
" char *v; int n, m=0;",
|
|
|
+ "#ifdef HC",
|
|
|
+ " uchar rem_a;",
|
|
|
+ "#endif",
|
|
|
"#ifdef NOCOMP", /* defined by BITSTATE */
|
|
|
"#if defined(BITSTATE) && defined(LC)",
|
|
|
" if (S_Tab == H_tab)",
|
|
@@ -4800,7 +4893,14 @@ static char *Code2c[] = {
|
|
|
"#endif",
|
|
|
"#else",
|
|
|
" v = (char *) &comp_now;",
|
|
|
+ " #ifdef HC",
|
|
|
+ " rem_a = now._a_t;", /* 4.3.0 */
|
|
|
+ " now._a_t = 0;", /* for hashing/state matching to work right */
|
|
|
+ " #endif",
|
|
|
" n = compress(vin, nin);", /* with HC, this calls s_hash */
|
|
|
+ " #ifdef HC",
|
|
|
+ " now._a_t = rem_a;", /* 4.3.0 */
|
|
|
+ " #endif",
|
|
|
"#ifndef SAFETY",
|
|
|
" if (S_A)",
|
|
|
" { v[0] = 0; /* _a_t */",
|
|
@@ -4874,7 +4974,7 @@ static char *Code2c[] = {
|
|
|
"#ifdef FULLSTACK",
|
|
|
"#ifndef SAFETY", /* or else wasnew == 0 */
|
|
|
" if (wasnew)",
|
|
|
- " { Lstate = tmp;",
|
|
|
+ " { Lstate = (struct H_el *) tmp;",
|
|
|
" tmp->tagged |= V_A;",
|
|
|
" if ((now._a_t&1)",
|
|
|
" && (tmp->tagged&A_V)",
|
|
@@ -4897,7 +4997,7 @@ static char *Code2c[] = {
|
|
|
" } else",
|
|
|
"#endif",
|
|
|
" if ((S_A)?(tmp->tagged&V_A):tmp->tagged)",
|
|
|
- " { Lstate = tmp;",
|
|
|
+ " { Lstate = (struct H_el *) tmp;",
|
|
|
"#ifndef SAFETY",
|
|
|
" /* already on current dfs stack */",
|
|
|
" /* but may also be on 1st dfs stack */",
|
|
@@ -4962,8 +5062,8 @@ static char *Code2c[] = {
|
|
|
" return 0;",
|
|
|
" }",
|
|
|
"#endif",
|
|
|
- "#if defined(BFS) && defined(QPROVISO)",
|
|
|
- " Lstate = tmp;",
|
|
|
+ "#if defined(BFS) && defined(Q_PROVISO)",
|
|
|
+ " Lstate = (struct H_el *) tmp;",
|
|
|
"#endif",
|
|
|
" return 1; /* match outside stack */",
|
|
|
" } else if (m < 0)",
|
|
@@ -4994,7 +5094,7 @@ static char *Code2c[] = {
|
|
|
" printf(\" New state %%d\\n\", (int) nstates);",
|
|
|
"#endif",
|
|
|
"#endif",
|
|
|
- "#ifdef REACH",
|
|
|
+ "#if !defined(SAFETY) || defined(REACH)",
|
|
|
" tmp->D = depth;",
|
|
|
"#endif",
|
|
|
"#ifndef SAFETY",
|
|
@@ -5022,7 +5122,7 @@ static char *Code2c[] = {
|
|
|
"#ifdef DEBUG",
|
|
|
" dumpstate(-1, v, n, tmp->tagged);",
|
|
|
"#endif",
|
|
|
- " Lstate = tmp;",
|
|
|
+ " Lstate = (struct H_el *) tmp;",
|
|
|
"#else",
|
|
|
"#ifdef DEBUG",
|
|
|
" dumpstate(-1, v, n, 0);",
|