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
ecb2780a
Commit
ecb2780a
authored
Mar 21, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Procedure to check inductive invariant for Gia package.
parent
a4d6e2f8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
src/aig/gia/giaDup.c
+61
-0
No files found.
src/aig/gia/giaDup.c
View file @
ecb2780a
...
...
@@ -896,6 +896,67 @@ Gia_Man_t * Gia_ManDupAppendNew( Gia_Man_t * pOne, Gia_Man_t * pTwo )
/**Function*************************************************************
Synopsis [Creates a miter for inductive checking of the invariant.]
Description [The first GIA (p) is a sequential AIG whose transition
relation is used. The second GIA (pInv) is a combinational AIG representing
the invariant over the register outputs. If the resulting combination miter
is UNSAT, the invariant holds by simple induction.]
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManDupInvMiter
(
Gia_Man_t
*
p
,
Gia_Man_t
*
pInv
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
,
Node1
,
Node2
,
Node
;
assert
(
Gia_ManRegNum
(
p
)
>
0
);
assert
(
Gia_ManRegNum
(
pInv
)
==
0
);
assert
(
Gia_ManCoNum
(
pInv
)
==
1
);
assert
(
Gia_ManRegNum
(
p
)
==
Gia_ManCiNum
(
pInv
)
);
Gia_ManFillValue
(
p
);
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
+
2
*
Gia_ManObjNum
(
pInv
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManHashAlloc
(
pNew
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachObj1
(
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
else
if
(
Gia_ObjIsCi
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
else
if
(
Gia_ObjIsCo
(
pObj
)
)
pObj
->
Value
=
Gia_ObjFanin0Copy
(
pObj
);
}
// build invariant on top of register outputs in the first frame
Gia_ManForEachRo
(
p
,
pObj
,
i
)
Gia_ManCi
(
pInv
,
i
)
->
Value
=
pObj
->
Value
;
Gia_ManForEachAnd
(
pInv
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
pObj
=
Gia_ManCo
(
pInv
,
0
);
Node1
=
Gia_ObjFanin0Copy
(
pObj
);
// build invariant on top of register outputs in the second frame
Gia_ManForEachRi
(
p
,
pObj
,
i
)
Gia_ManCi
(
pInv
,
i
)
->
Value
=
pObj
->
Value
;
Gia_ManForEachAnd
(
pInv
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
pObj
=
Gia_ManCo
(
pInv
,
0
);
Node2
=
Gia_ObjFanin0Copy
(
pObj
);
// create miter output
Node
=
Gia_ManHashAnd
(
pNew
,
Node1
,
Abc_LitNot
(
Node2
)
);
Gia_ManAppendCo
(
pNew
,
Node
);
// cleanup
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
/**Function*************************************************************
Synopsis [Appends logic cones as additional property outputs.]
Description []
...
...
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