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
ccaa9654
Commit
ccaa9654
authored
May 29, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the problem with 'phase -c'.
parent
bfa48cef
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
4 deletions
+64
-4
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaCex.c
+47
-0
src/base/abci/abc.c
+12
-0
src/misc/extra/extraUtilSupp.c
+1
-1
src/misc/util/utilCex.c
+3
-3
No files found.
src/aig/gia/gia.h
View file @
ccaa9654
...
@@ -963,6 +963,7 @@ extern Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose );
...
@@ -963,6 +963,7 @@ extern Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose );
/*=== giaCex.c ============================================================*/
/*=== giaCex.c ============================================================*/
extern
int
Gia_ManVerifyCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
,
int
fDualOut
);
extern
int
Gia_ManVerifyCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
,
int
fDualOut
);
extern
int
Gia_ManFindFailedPoCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
,
int
nOutputs
);
extern
int
Gia_ManFindFailedPoCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
,
int
nOutputs
);
extern
int
Gia_ManSetFailedPoCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
);
extern
void
Gia_ManCounterExampleValueStart
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
);
extern
void
Gia_ManCounterExampleValueStart
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
);
extern
void
Gia_ManCounterExampleValueStop
(
Gia_Man_t
*
pGia
);
extern
void
Gia_ManCounterExampleValueStop
(
Gia_Man_t
*
pGia
);
extern
int
Gia_ManCounterExampleValueLookup
(
Gia_Man_t
*
pGia
,
int
Id
,
int
iFrame
);
extern
int
Gia_ManCounterExampleValueLookup
(
Gia_Man_t
*
pGia
,
int
Id
,
int
iFrame
);
...
...
src/aig/gia/giaCex.c
View file @
ccaa9654
...
@@ -121,6 +121,53 @@ int Gia_ManFindFailedPoCex( Gia_Man_t * pAig, Abc_Cex_t * p, int nOutputs )
...
@@ -121,6 +121,53 @@ int Gia_ManFindFailedPoCex( Gia_Man_t * pAig, Abc_Cex_t * p, int nOutputs )
return
RetValue
;
return
RetValue
;
}
}
/**Function*************************************************************
Synopsis [Determines the failed PO when its exact frame is not known.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Gia_ManSetFailedPoCex
(
Gia_Man_t
*
pAig
,
Abc_Cex_t
*
p
)
{
Gia_Obj_t
*
pObj
,
*
pObjRi
,
*
pObjRo
;
int
i
,
k
,
iBit
=
0
;
assert
(
Gia_ManPiNum
(
pAig
)
==
p
->
nPis
);
Gia_ManCleanMark0
(
pAig
);
p
->
iPo
=
-
1
;
// Gia_ManForEachRo( pAig, pObj, i )
// pObj->fMark0 = Abc_InfoHasBit(p->pData, iBit++);
iBit
=
p
->
nRegs
;
for
(
i
=
0
;
i
<=
p
->
iFrame
;
i
++
)
{
Gia_ManForEachPi
(
pAig
,
pObj
,
k
)
pObj
->
fMark0
=
Abc_InfoHasBit
(
p
->
pData
,
iBit
++
);
Gia_ManForEachAnd
(
pAig
,
pObj
,
k
)
pObj
->
fMark0
=
(
Gia_ObjFanin0
(
pObj
)
->
fMark0
^
Gia_ObjFaninC0
(
pObj
))
&
(
Gia_ObjFanin1
(
pObj
)
->
fMark0
^
Gia_ObjFaninC1
(
pObj
));
Gia_ManForEachCo
(
pAig
,
pObj
,
k
)
pObj
->
fMark0
=
Gia_ObjFanin0
(
pObj
)
->
fMark0
^
Gia_ObjFaninC0
(
pObj
);
Gia_ManForEachRiRo
(
pAig
,
pObjRi
,
pObjRo
,
k
)
pObjRo
->
fMark0
=
pObjRi
->
fMark0
;
// check the POs
Gia_ManForEachPo
(
pAig
,
pObj
,
k
)
{
if
(
!
pObj
->
fMark0
)
continue
;
p
->
iPo
=
k
;
p
->
iFrame
=
i
;
p
->
nBits
=
iBit
;
break
;
}
}
Gia_ManCleanMark0
(
pAig
);
return
p
->
iPo
;
}
/**Function*************************************************************
/**Function*************************************************************
...
...
src/base/abci/abc.c
View file @
ccaa9654
...
@@ -18864,6 +18864,18 @@ int Abc_CommandDarPhase( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -18864,6 +18864,18 @@ int Abc_CommandDarPhase( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
return
1
;
}
}
pCexNew
=
Abc_CexTransformPhase
(
pAbc
->
pCex
,
Abc_NtkPiNum
(
pNtk
),
Abc_NtkPoNum
(
pNtk
),
Abc_NtkLatchNum
(
pNtk
)
);
pCexNew
=
Abc_CexTransformPhase
(
pAbc
->
pCex
,
Abc_NtkPiNum
(
pNtk
),
Abc_NtkPoNum
(
pNtk
),
Abc_NtkLatchNum
(
pNtk
)
);
{
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pNtk
,
0
,
1
);
Gia_Man_t
*
pGia
=
Gia_ManFromAig
(
pAig
);
int
iPo
=
Gia_ManSetFailedPoCex
(
pGia
,
pCexNew
);
Gia_ManStop
(
pGia
);
Aig_ManStop
(
pAig
);
if
(
iPo
==
-
1
)
{
Abc_Print
(
-
1
,
"The counter-example does not fail any of the outputs of the original AIG.
\n
"
);
return
1
;
}
}
Abc_FrameReplaceCex
(
pAbc
,
&
pCexNew
);
Abc_FrameReplaceCex
(
pAbc
,
&
pCexNew
);
return
0
;
return
0
;
}
}
src/misc/extra/extraUtilSupp.c
View file @
ccaa9654
...
@@ -648,7 +648,7 @@ void Abc_SuppReadMinTest( char * pFileName )
...
@@ -648,7 +648,7 @@ void Abc_SuppReadMinTest( char * pFileName )
{
{
int
fVerbose
=
0
;
int
fVerbose
=
0
;
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
word
Matrix
[
64
];
//
word Matrix[64];
int
nVars
,
nVarsMin
;
int
nVars
,
nVarsMin
;
Vec_Wrd_t
*
vPairs
,
*
vCubes
;
Vec_Wrd_t
*
vPairs
,
*
vCubes
;
vCubes
=
Abc_SuppReadMin
(
pFileName
,
&
nVars
);
vCubes
=
Abc_SuppReadMin
(
pFileName
,
&
nVars
);
...
...
src/misc/util/utilCex.c
View file @
ccaa9654
...
@@ -396,9 +396,9 @@ Abc_Cex_t * Abc_CexTransformPhase( Abc_Cex_t * p, int nPisOld, int nPosOld, int
...
@@ -396,9 +396,9 @@ Abc_Cex_t * Abc_CexTransformPhase( Abc_Cex_t * p, int nPisOld, int nPosOld, int
assert
(
p
->
iPo
<
nPosNew
);
assert
(
p
->
iPo
<
nPosNew
);
pCex
=
Abc_CexDup
(
p
,
nRegsOld
);
pCex
=
Abc_CexDup
(
p
,
nRegsOld
);
pCex
->
nPis
=
nPisOld
;
pCex
->
nPis
=
nPisOld
;
pCex
->
iPo
=
p
->
iPo
%
nPosOld
;
pCex
->
iPo
=
-
1
;
pCex
->
iFrame
=
p
->
iFrame
*
nFrames
+
p
->
iPo
/
nPosOld
;
pCex
->
iFrame
=
(
p
->
iFrame
+
1
)
*
nFrames
-
1
;
pCex
->
nBits
=
p
Cex
->
nRegs
+
pCex
->
nPis
*
(
pCex
->
iFrame
+
1
)
;
pCex
->
nBits
=
p
->
nBits
;
return
pCex
;
return
pCex
;
}
}
...
...
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