summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-10-02 20:43:18 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2019-10-02 20:43:18 -0700
commit623b5e82513d076a19f864c01930ad1838498894 (patch)
treecc0a24c9e927aaa7cb9462bb732529a468673a40 /src
parentcdabd42a26b28f19b883682c26df32c53ab31164 (diff)
downloadabc-623b5e82513d076a19f864c01930ad1838498894.tar.gz
abc-623b5e82513d076a19f864c01930ad1838498894.tar.bz2
abc-623b5e82513d076a19f864c01930ad1838498894.zip
Several corner-case bug fixes in scorr with constraints.
Diffstat (limited to 'src')
-rw-r--r--src/base/abci/abc.c8
-rw-r--r--src/proof/ssw/sswCore.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 69d6db89..d31a1fc1 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -21211,10 +21211,18 @@ int Abc_CommandSeqSweep2( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( pPars->fConstrs )
{
+ if ( Abc_NtkConstrNum(pNtk) == Abc_NtkPoNum(pNtk) )
+ {
+ Abc_Print( 0, "Command cannot be applied because the network has only constraint outputs (no primary outputs).\n" );
+ return 0;
+ }
if ( Abc_NtkConstrNum(pNtk) > 0 )
Abc_Print( 0, "Performing scorr with %d constraints.\n", Abc_NtkConstrNum(pNtk) );
else
+ {
Abc_Print( 0, "Performing constraint-based scorr without constraints.\n" );
+ pPars->fConstrs = 0;
+ }
}
if ( pPars->fEquivDump && pPars->fEquivDump2 )
{
diff --git a/src/proof/ssw/sswCore.c b/src/proof/ssw/sswCore.c
index 58c01b21..1036d7b4 100644
--- a/src/proof/ssw/sswCore.c
+++ b/src/proof/ssw/sswCore.c
@@ -496,7 +496,7 @@ Aig_Man_t * Ssw_SignalCorrespondence( Aig_Man_t * pAig, Ssw_Pars_t * pPars )
Ssw_ClassesSetData( p->ppClasses, p->pSml, (unsigned(*)(void *,Aig_Obj_t *))Ssw_SmlObjHashWord, (int(*)(void *,Aig_Obj_t *))Ssw_SmlObjIsConstWord, (int(*)(void *,Aig_Obj_t *,Aig_Obj_t *))Ssw_SmlObjsAreEqualWord );
}
// allocate storage
- if ( p->pPars->fLocalSim )
+ if ( p->pPars->fLocalSim && p->pSml )
p->pVisited = ABC_CALLOC( int, Ssw_SmlNumFrames( p->pSml ) * Aig_ManObjNumMax(p->pAig) );
// perform refinement of classes
pAigNew = Ssw_SignalCorrespondenceRefine( p );