Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
cc7d3e37
Commit
cc7d3e37
authored
Mar 28, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added dumping QDIMACS files in command 'qbf'.
parent
b7cd2278
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
src/base/abci/abcQbf.c
+11
-9
No files found.
src/base/abci/abcQbf.c
View file @
cc7d3e37
...
@@ -75,39 +75,41 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
...
@@ -75,39 +75,41 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
// assert( Abc_NtkPiNum(pNtk)-nPars < 32 );
// assert( Abc_NtkPiNum(pNtk)-nPars < 32 );
nInputs
=
Abc_NtkPiNum
(
pNtk
)
-
nPars
;
nInputs
=
Abc_NtkPiNum
(
pNtk
)
-
nPars
;
Abc_ObjXorFaninC
(
Abc_NtkPo
(
pNtk
,
0
),
0
);
if
(
fDumpCnf
)
if
(
fDumpCnf
)
{
{
// original problem: \exists p \forall x \exists y. M(p,x,y)
// negated problem: \forall p \exists x \exists y. !M(p,x,y)
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
Aig_Man_t
*
pMan
=
Abc_NtkToDar
(
pNtk
,
0
,
0
);
Aig_Man_t
*
pMan
=
Abc_NtkToDar
(
pNtk
,
0
,
0
);
Cnf_Dat_t
*
pCnf
=
Cnf_Derive
Simple
(
pMan
,
0
);
Cnf_Dat_t
*
pCnf
=
Cnf_Derive
(
pMan
,
0
);
Vec_Int_t
*
vVarMap
,
*
vForAlls
,
*
vExists
;
Vec_Int_t
*
vVarMap
,
*
vForAlls
,
*
vExists
;
Aig_Obj_t
*
pObj
;
Aig_Obj_t
*
pObj
;
char
*
pFileName
;
int
i
,
Entry
;
int
i
,
Entry
;
// create var map
// create var map
vVarMap
=
Vec_IntStart
(
pCnf
->
nVars
);
vVarMap
=
Vec_IntStart
(
pCnf
->
nVars
);
Aig_ManForEachCi
(
pMan
,
pObj
,
i
)
Aig_ManForEachCi
(
pMan
,
pObj
,
i
)
if
(
i
>=
nPars
)
if
(
i
<
nPars
)
Vec_IntWriteEntry
(
vVarMap
,
pCnf
->
pVarNums
[
Aig_ObjId
(
pObj
)],
1
);
Vec_IntWriteEntry
(
vVarMap
,
pCnf
->
pVarNums
[
Aig_ObjId
(
pObj
)],
1
);
// create various maps
// create various maps
vForAlls
=
Vec_IntAlloc
(
nPars
);
vExists
=
Vec_IntAlloc
(
Abc_NtkPiNum
(
pNtk
)
-
nPars
);
vExists
=
Vec_IntAlloc
(
Abc_NtkPiNum
(
pNtk
)
-
nPars
);
vForAlls
=
Vec_IntAlloc
(
pCnf
->
nVars
);
Vec_IntForEachEntry
(
vVarMap
,
Entry
,
i
)
Vec_IntForEachEntry
(
vVarMap
,
Entry
,
i
)
if
(
Entry
)
if
(
Entry
)
Vec_IntPush
(
vExists
,
i
);
else
Vec_IntPush
(
vForAlls
,
i
);
Vec_IntPush
(
vForAlls
,
i
);
else
Vec_IntPush
(
vExists
,
i
);
// generate CNF
// generate CNF
Cnf_DataWriteIntoFile
(
pCnf
,
"test.qdimacs"
,
0
,
vForAlls
,
vExists
);
pFileName
=
Extra_FileNameGenericAppend
(
pNtk
->
pSpec
,
".qdimacs"
);
Cnf_DataWriteIntoFile
(
pCnf
,
pFileName
,
0
,
vForAlls
,
vExists
);
Aig_ManStop
(
pMan
);
Aig_ManStop
(
pMan
);
Cnf_DataFree
(
pCnf
);
Cnf_DataFree
(
pCnf
);
Vec_IntFree
(
vForAlls
);
Vec_IntFree
(
vForAlls
);
Vec_IntFree
(
vExists
);
Vec_IntFree
(
vExists
);
Vec_IntFree
(
vVarMap
);
Vec_IntFree
(
vVarMap
);
Abc_ObjXorFaninC
(
Abc_NtkPo
(
pNtk
,
0
),
0
);
printf
(
"The 2QBF formula was written into file
\"
%s
\"
.
\n
"
,
pFileName
);
return
;
return
;
}
}
Abc_ObjXorFaninC
(
Abc_NtkPo
(
pNtk
,
0
),
0
);
// initialize the synthesized network with 0000-combination
// initialize the synthesized network with 0000-combination
vPiValues
=
Vec_IntStart
(
Abc_NtkPiNum
(
pNtk
)
);
vPiValues
=
Vec_IntStart
(
Abc_NtkPiNum
(
pNtk
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment