summaryrefslogtreecommitdiffstats
path: root/src/base/wlc
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2016-09-29 18:00:52 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2016-09-29 18:00:52 -0700
commit9a35f82d5fd396f04a0baaa50b390281c4673172 (patch)
tree23e43d148cf2ff697845fa0f6ddc4ff3aafc1dd8 /src/base/wlc
parent4f0f2e09f84b66c1ed9a842a71a09f2f1ec65588 (diff)
downloadabc-9a35f82d5fd396f04a0baaa50b390281c4673172.tar.gz
abc-9a35f82d5fd396f04a0baaa50b390281c4673172.tar.bz2
abc-9a35f82d5fd396f04a0baaa50b390281c4673172.zip
Supporting 'define-fun' with an expression rather than a constant.
Diffstat (limited to 'src/base/wlc')
-rw-r--r--src/base/wlc/wlcReadSmt.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/base/wlc/wlcReadSmt.c b/src/base/wlc/wlcReadSmt.c
index fcd47274..580401df 100644
--- a/src/base/wlc/wlcReadSmt.c
+++ b/src/base/wlc/wlcReadSmt.c
@@ -981,12 +981,25 @@ Wlc_Ntk_t * Smt_PrsBuild2( Smt_Prs_t * p )
assert( !strcmp("Bool", Smt_VecEntryName(p, vFans, 3)) );
Range = 1;
pValue = Smt_VecEntryName(p, vFans, 4);
- if ( !strcmp("false", pValue) )
- pValue = "#b0";
- else if ( !strcmp("true", pValue) )
- pValue = "#b1";
- else assert( 0 );
- Status = Smt_PrsBuildConstant( pNtk, pValue, Range, pName );
+ if ( pValue != NULL )
+ {
+ if ( !strcmp("false", pValue) )
+ pValue = "#b0";
+ else if ( !strcmp("true", pValue) )
+ pValue = "#b1";
+ else assert( 0 );
+ Status = Smt_PrsBuildConstant( pNtk, pValue, Range, pName );
+ }
+ else
+ {
+ iObj = Smt_PrsBuild2_rec( pNtk, p, Vec_IntEntry(vFans, 4), -1, pName );
+ if ( iObj == 0 )
+ {
+ Wlc_NtkFree( pNtk ); pNtk = NULL;
+ goto finish;
+ }
+ continue;
+ }
}
else
{