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
4333fd24
Commit
4333fd24
authored
Sep 08, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Started CEX minimization procedure.
parent
9efe9579
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
0 deletions
+96
-0
src/aig/gia/giaCexMin.c
+0
-0
src/base/abci/abc.c
+96
-0
No files found.
src/aig/gia/giaCexMin.c
View file @
4333fd24
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
4333fd24
...
@@ -376,6 +376,7 @@ static int Abc_CommandAbc9ReachN ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -376,6 +376,7 @@ static int Abc_CommandAbc9ReachN ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9ReachY
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachY
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Undo
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Undo
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Iso
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Iso
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9CexMin
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbcTestNew
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbcTestNew
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -836,6 +837,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -836,6 +837,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachy"
,
Abc_CommandAbc9ReachY
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachy"
,
Abc_CommandAbc9ReachY
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&undo"
,
Abc_CommandAbc9Undo
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&undo"
,
Abc_CommandAbc9Undo
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&iso"
,
Abc_CommandAbc9Iso
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&iso"
,
Abc_CommandAbc9Iso
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&cexmin"
,
Abc_CommandAbc9CexMin
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&test"
,
Abc_CommandAbc9Test
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&test"
,
Abc_CommandAbc9Test
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Liveness"
,
"l2s"
,
Abc_CommandAbcLivenessToSafety
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Liveness"
,
"l2s"
,
Abc_CommandAbcLivenessToSafety
,
0
);
...
@@ -29926,6 +29928,100 @@ usage:
...
@@ -29926,6 +29928,100 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9CexMin
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Abc_Cex_t
*
Gia_ManCexMin
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrameStart
,
int
nRealPis
,
int
fJustMax
,
int
fUseAll
,
int
fVerbose
);
Abc_Cex_t
*
pCexNew
;
int
iFrameStart
=
0
;
int
nRealPis
=
-
1
;
int
fJustMax
=
1
;
int
fUseAll
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FNjavh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'F'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-F
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
iFrameStart
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
iFrameStart
<
0
)
goto
usage
;
break
;
case
'N'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-N
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nRealPis
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nRealPis
<
0
)
goto
usage
;
break
;
case
'j'
:
fJustMax
^=
1
;
break
;
case
'a'
:
fUseAll
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9CexMin(): There is no AIG.
\n
"
);
return
1
;
}
if
(
Gia_ManRegNum
(
pAbc
->
pGia
)
==
0
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9CexMin(): The network is combinational.
\n
"
);
return
0
;
}
if
(
pAbc
->
pCex
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9CexMin(): There is no counter-example.
\n
"
);
return
1
;
}
pCexNew
=
Gia_ManCexMin
(
pAbc
->
pGia
,
pAbc
->
pCex
,
iFrameStart
,
nRealPis
,
fJustMax
,
fUseAll
,
fVerbose
);
if
(
pCexNew
)
Abc_FrameReplaceCex
(
pAbc
,
&
pCexNew
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &cexmin [-FN num] [-javh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
minimizes a deep counter-example
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : starting timeframe for minimization [default = %d]
\n
"
,
iFrameStart
);
Abc_Print
(
-
2
,
"
\t
-N num : the number of real primary inputs [default = %d]
\n
"
,
nRealPis
);
Abc_Print
(
-
2
,
"
\t
-j : toggle computing all justifying assignments [default = %s]
\n
"
,
fJustMax
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle using all terminal objects [default = %s]
\n
"
,
fUseAll
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Test
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
// Gia_Man_t * pTemp = NULL;
// Gia_Man_t * pTemp = NULL;
...
...
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