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
814ee484
Commit
814ee484
authored
Nov 12, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump last frame clauses with 'pdr -d' even if the problem is SAT or undecided.
parent
c16f5d64
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
src/sat/pdr/pdrCore.c
+3
-2
src/sat/pdr/pdrInt.h
+1
-1
src/sat/pdr/pdrInv.c
+11
-2
No files found.
src/sat/pdr/pdrCore.c
View file @
814ee484
...
@@ -614,8 +614,6 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
...
@@ -614,8 +614,6 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Pdr_ManPrintProgress
(
p
,
1
,
clock
()
-
clkStart
);
Pdr_ManPrintProgress
(
p
,
1
,
clock
()
-
clkStart
);
Pdr_ManReportInvariant
(
p
);
Pdr_ManReportInvariant
(
p
);
Pdr_ManVerifyInvariant
(
p
);
Pdr_ManVerifyInvariant
(
p
);
if
(
p
->
pPars
->
fDumpInv
)
Pdr_ManDumpClauses
(
p
,
(
char
*
)
"inv.pla"
);
p
->
pPars
->
iFrame
=
k
;
p
->
pPars
->
iFrame
=
k
;
return
1
;
// UNSAT
return
1
;
// UNSAT
}
}
...
@@ -669,6 +667,9 @@ int Pdr_ManSolve_( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t ** pvPrioInit,
...
@@ -669,6 +667,9 @@ int Pdr_ManSolve_( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t ** pvPrioInit,
p
=
Pdr_ManStart
(
pAig
,
pPars
,
pvPrioInit
?
*
pvPrioInit
:
NULL
);
p
=
Pdr_ManStart
(
pAig
,
pPars
,
pvPrioInit
?
*
pvPrioInit
:
NULL
);
RetValue
=
Pdr_ManSolveInt
(
p
);
RetValue
=
Pdr_ManSolveInt
(
p
);
*
ppCex
=
RetValue
?
NULL
:
Pdr_ManDeriveCex
(
p
);
*
ppCex
=
RetValue
?
NULL
:
Pdr_ManDeriveCex
(
p
);
if
(
p
->
pPars
->
fDumpInv
)
Pdr_ManDumpClauses
(
p
,
(
char
*
)
"inv.pla"
,
RetValue
==
1
);
// if ( *ppCex && pPars->fVerbose )
// if ( *ppCex && pPars->fVerbose )
// printf( "Found counter-example in frame %d after exploring %d frames.\n",
// printf( "Found counter-example in frame %d after exploring %d frames.\n",
// (*ppCex)->iFrame, p->nFrames );
// (*ppCex)->iFrame, p->nFrames );
...
...
src/sat/pdr/pdrInt.h
View file @
814ee484
...
@@ -144,7 +144,7 @@ extern int Pdr_ManCheckContainment( Pdr_Man_t * p, int k, Pdr_Set_t
...
@@ -144,7 +144,7 @@ extern int Pdr_ManCheckContainment( Pdr_Man_t * p, int k, Pdr_Set_t
/*=== pdrInv.c ==========================================================*/
/*=== pdrInv.c ==========================================================*/
extern
void
Pdr_ManPrintProgress
(
Pdr_Man_t
*
p
,
int
fClose
,
int
Time
);
extern
void
Pdr_ManPrintProgress
(
Pdr_Man_t
*
p
,
int
fClose
,
int
Time
);
extern
void
Pdr_ManPrintClauses
(
Pdr_Man_t
*
p
,
int
kStart
);
extern
void
Pdr_ManPrintClauses
(
Pdr_Man_t
*
p
,
int
kStart
);
extern
void
Pdr_ManDumpClauses
(
Pdr_Man_t
*
p
,
char
*
pFileName
);
extern
void
Pdr_ManDumpClauses
(
Pdr_Man_t
*
p
,
char
*
pFileName
,
int
fProved
);
extern
void
Pdr_ManReportInvariant
(
Pdr_Man_t
*
p
);
extern
void
Pdr_ManReportInvariant
(
Pdr_Man_t
*
p
);
extern
void
Pdr_ManVerifyInvariant
(
Pdr_Man_t
*
p
);
extern
void
Pdr_ManVerifyInvariant
(
Pdr_Man_t
*
p
);
/*=== pdrMan.c ==========================================================*/
/*=== pdrMan.c ==========================================================*/
...
...
src/sat/pdr/pdrInv.c
View file @
814ee484
...
@@ -136,7 +136,10 @@ int Pdr_ManFindInvariantStart( Pdr_Man_t * p )
...
@@ -136,7 +136,10 @@ int Pdr_ManFindInvariantStart( Pdr_Man_t * p )
Vec_VecForEachLevelStartStop
(
p
->
vClauses
,
vArrayK
,
k
,
1
,
kMax
+
1
)
Vec_VecForEachLevelStartStop
(
p
->
vClauses
,
vArrayK
,
k
,
1
,
kMax
+
1
)
if
(
Vec_PtrSize
(
vArrayK
)
==
0
)
if
(
Vec_PtrSize
(
vArrayK
)
==
0
)
return
k
;
return
k
;
return
-
1
;
// return -1;
// if there is no starting point (as in case of SAT or undecided), return the last frame
// printf( "The last timeframe contains %d clauses.\n", Vec_PtrSize(Vec_VecEntry(p->vClauses, kMax)) );
return
kMax
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -227,7 +230,7 @@ void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart )
...
@@ -227,7 +230,7 @@ void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Pdr_ManDumpClauses
(
Pdr_Man_t
*
p
,
char
*
pFileName
)
void
Pdr_ManDumpClauses
(
Pdr_Man_t
*
p
,
char
*
pFileName
,
int
fProved
)
{
{
int
fUseSupp
=
1
;
int
fUseSupp
=
1
;
FILE
*
pFile
;
FILE
*
pFile
;
...
@@ -250,7 +253,10 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName )
...
@@ -250,7 +253,10 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName )
// collect variable appearances
// collect variable appearances
vFlopCounts
=
fUseSupp
?
Pdr_ManCountFlops
(
p
,
vCubes
)
:
NULL
;
vFlopCounts
=
fUseSupp
?
Pdr_ManCountFlops
(
p
,
vCubes
)
:
NULL
;
// output the header
// output the header
if
(
fProved
)
fprintf
(
pFile
,
"# Inductive invariant for
\"
%s
\"\n
"
,
p
->
pAig
->
pName
);
fprintf
(
pFile
,
"# Inductive invariant for
\"
%s
\"\n
"
,
p
->
pAig
->
pName
);
else
fprintf
(
pFile
,
"# Clauses of the last timeframe for
\"
%s
\"\n
"
,
p
->
pAig
->
pName
);
fprintf
(
pFile
,
"# generated by PDR in ABC on %s
\n
"
,
Aig_TimeStamp
()
);
fprintf
(
pFile
,
"# generated by PDR in ABC on %s
\n
"
,
Aig_TimeStamp
()
);
fprintf
(
pFile
,
".i %d
\n
"
,
fUseSupp
?
Pdr_ManCountVariables
(
p
,
kStart
)
:
Aig_ManRegNum
(
p
->
pAig
)
);
fprintf
(
pFile
,
".i %d
\n
"
,
fUseSupp
?
Pdr_ManCountVariables
(
p
,
kStart
)
:
Aig_ManRegNum
(
p
->
pAig
)
);
fprintf
(
pFile
,
".o 1
\n
"
);
fprintf
(
pFile
,
".o 1
\n
"
);
...
@@ -277,7 +283,10 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName )
...
@@ -277,7 +283,10 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName )
fclose
(
pFile
);
fclose
(
pFile
);
Vec_IntFreeP
(
&
vFlopCounts
);
Vec_IntFreeP
(
&
vFlopCounts
);
Vec_PtrFree
(
vCubes
);
Vec_PtrFree
(
vCubes
);
if
(
fProved
)
printf
(
"Inductive invariant was written into file
\"
%s
\"
.
\n
"
,
pFileName
);
printf
(
"Inductive invariant was written into file
\"
%s
\"
.
\n
"
,
pFileName
);
else
printf
(
"Clauses of the last timeframe were written into file
\"
%s
\"
.
\n
"
,
pFileName
);
}
}
...
...
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