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
f5240276
Commit
f5240276
authored
Jan 13, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updates to arithmetic verification.
parent
d52dafa6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
2 deletions
+65
-2
src/aig/gia/giaTruth.c
+2
-0
src/proof/acec/acecMult.c
+1
-1
src/proof/acec/acecTree.c
+62
-1
No files found.
src/aig/gia/giaTruth.c
View file @
f5240276
...
@@ -184,6 +184,8 @@ word Gia_ObjComputeTruth6Cis( Gia_Man_t * p, int iLit, Vec_Int_t * vSupp, Vec_Wr
...
@@ -184,6 +184,8 @@ word Gia_ObjComputeTruth6Cis( Gia_Man_t * p, int iLit, Vec_Int_t * vSupp, Vec_Wr
if
(
!
iObj
)
return
Abc_LitIsCompl
(
iLit
)
?
~
(
word
)
0
:
(
word
)
0
;
if
(
!
iObj
)
return
Abc_LitIsCompl
(
iLit
)
?
~
(
word
)
0
:
(
word
)
0
;
Gia_ManIncrementTravId
(
p
);
Gia_ManIncrementTravId
(
p
);
Gia_ObjComputeTruth6CisSupport_rec
(
p
,
iObj
,
vSupp
);
Gia_ObjComputeTruth6CisSupport_rec
(
p
,
iObj
,
vSupp
);
if
(
Vec_IntSize
(
vSupp
)
>
6
)
return
0
;
Gia_ObjComputeTruth6
(
p
,
iObj
,
vSupp
,
vTemp
);
Gia_ObjComputeTruth6
(
p
,
iObj
,
vSupp
,
vTemp
);
return
Abc_LitIsCompl
(
iLit
)
?
~
Vec_WrdEntry
(
vTemp
,
iObj
)
:
Vec_WrdEntry
(
vTemp
,
iObj
);
return
Abc_LitIsCompl
(
iLit
)
?
~
Vec_WrdEntry
(
vTemp
,
iObj
)
:
Vec_WrdEntry
(
vTemp
,
iObj
);
}
}
...
...
src/proof/acec/acecMult.c
View file @
f5240276
...
@@ -389,7 +389,7 @@ Vec_Int_t * Acec_MultDetectInputs( Gia_Man_t * p, Vec_Wec_t * vLeafLits, Vec_Wec
...
@@ -389,7 +389,7 @@ Vec_Int_t * Acec_MultDetectInputs( Gia_Man_t * p, Vec_Wec_t * vLeafLits, Vec_Wec
Vec_IntForEachEntry
(
vLevel
,
iLit
,
k
)
Vec_IntForEachEntry
(
vLevel
,
iLit
,
k
)
{
{
word
Truth
=
Gia_ObjComputeTruth6Cis
(
p
,
iLit
,
vSupp
,
vTemp
);
word
Truth
=
Gia_ObjComputeTruth6Cis
(
p
,
iLit
,
vSupp
,
vTemp
);
if
(
Vec_IntSize
(
vSupp
)
>=
4
)
if
(
Vec_IntSize
(
vSupp
)
>=
0
)
{
{
printf
(
"Leaf = %4d : "
,
Abc_Lit2Var
(
iLit
)
);
printf
(
"Leaf = %4d : "
,
Abc_Lit2Var
(
iLit
)
);
printf
(
"Rank = %2d "
,
i
);
printf
(
"Rank = %2d "
,
i
);
...
...
src/proof/acec/acecTree.c
View file @
f5240276
...
@@ -63,6 +63,65 @@ void Acec_BoxFreeP( Acec_Box_t ** ppBox )
...
@@ -63,6 +63,65 @@ void Acec_BoxFreeP( Acec_Box_t ** ppBox )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Filters trees by removing TFO of roots.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Acec_TreeFilterOne
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vAdds
,
Vec_Int_t
*
vTree
)
{
Vec_Bit_t
*
vIsRoot
=
Vec_BitStart
(
Gia_ManObjNum
(
p
)
);
Vec_Bit_t
*
vMarked
=
Vec_BitStart
(
Gia_ManObjNum
(
p
)
)
;
Gia_Obj_t
*
pObj
;
int
i
,
k
=
0
,
Box
,
Rank
;
// mark roots
Vec_IntForEachEntryDouble
(
vTree
,
Box
,
Rank
,
i
)
{
Vec_BitWriteEntry
(
vIsRoot
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
3
),
1
);
Vec_BitWriteEntry
(
vIsRoot
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
4
),
1
);
}
Vec_IntForEachEntryDouble
(
vTree
,
Box
,
Rank
,
i
)
{
Vec_BitWriteEntry
(
vIsRoot
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
0
),
0
);
Vec_BitWriteEntry
(
vIsRoot
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
1
),
0
);
Vec_BitWriteEntry
(
vIsRoot
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
2
),
0
);
}
// iterate through nodes to detect TFO of roots
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
{
if
(
Vec_BitEntry
(
vIsRoot
,
Gia_ObjFaninId0
(
pObj
,
i
))
||
Vec_BitEntry
(
vIsRoot
,
Gia_ObjFaninId1
(
pObj
,
i
))
||
Vec_BitEntry
(
vMarked
,
Gia_ObjFaninId0
(
pObj
,
i
))
||
Vec_BitEntry
(
vMarked
,
Gia_ObjFaninId1
(
pObj
,
i
))
)
Vec_BitWriteEntry
(
vMarked
,
i
,
1
);
}
// remove those that overlap with roots
Vec_IntForEachEntryDouble
(
vTree
,
Box
,
Rank
,
i
)
{
if
(
Vec_BitEntry
(
vMarked
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
3
))
||
Vec_BitEntry
(
vMarked
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
4
))
)
{
printf
(
"Removing box %d=(%d,%d) of rank %d.
\n
"
,
Box
,
Vec_IntEntry
(
vAdds
,
6
*
Box
+
3
),
Vec_IntEntry
(
vAdds
,
6
*
Box
+
4
),
Rank
);
continue
;
}
Vec_IntWriteEntry
(
vTree
,
k
++
,
Box
);
Vec_IntWriteEntry
(
vTree
,
k
++
,
Rank
);
}
Vec_IntShrink
(
vTree
,
k
);
Vec_BitFree
(
vIsRoot
);
Vec_BitFree
(
vMarked
);
}
void
Acec_TreeFilterTrees
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vAdds
,
Vec_Wec_t
*
vTrees
)
{
Vec_Int_t
*
vLevel
;
int
i
;
Vec_WecForEachLevel
(
vTrees
,
vLevel
,
i
)
Acec_TreeFilterOne
(
p
,
vAdds
,
vLevel
);
}
/**Function*************************************************************
Synopsis [Find internal cut points with exactly one adder fanin/fanout.]
Synopsis [Find internal cut points with exactly one adder fanin/fanout.]
Description [Returns a map of point into its input/output adder.]
Description [Returns a map of point into its input/output adder.]
...
@@ -163,6 +222,8 @@ Vec_Wec_t * Acec_TreeFindTrees( Gia_Man_t * p, Vec_Int_t * vAdds )
...
@@ -163,6 +222,8 @@ Vec_Wec_t * Acec_TreeFindTrees( Gia_Man_t * p, Vec_Int_t * vAdds )
}
}
Vec_BitFree
(
vFound
);
Vec_BitFree
(
vFound
);
Vec_IntFree
(
vMap
);
Vec_IntFree
(
vMap
);
// filter trees
Acec_TreeFilterTrees
(
p
,
vAdds
,
vTrees
);
// sort by size
// sort by size
Vec_WecSort
(
vTrees
,
1
);
Vec_WecSort
(
vTrees
,
1
);
return
vTrees
;
return
vTrees
;
...
@@ -580,7 +641,7 @@ Acec_Box_t * Acec_DeriveBox( Gia_Man_t * p, int fVerbose )
...
@@ -580,7 +641,7 @@ Acec_Box_t * Acec_DeriveBox( Gia_Man_t * p, int fVerbose )
Vec_WecSizeSize
(
pBox
->
vLeafLits
),
Vec_WecSizeSize
(
pBox
->
vRootLits
)
);
Vec_WecSizeSize
(
pBox
->
vLeafLits
),
Vec_WecSizeSize
(
pBox
->
vRootLits
)
);
if
(
pBox
&&
fVerbose
)
if
(
pBox
&&
fVerbose
)
Acec_PrintBox
(
pBox
,
vAdds
);
Acec_PrintBox
(
pBox
,
vAdds
);
//
Acec_MultDetectInputs( p, pBox->vLeafLits, pBox->vRootLits );
//
Acec_MultDetectInputs( p, pBox->vLeafLits, pBox->vRootLits );
Vec_WecFreeP
(
&
vTrees
);
Vec_WecFreeP
(
&
vTrees
);
Vec_IntFree
(
vAdds
);
Vec_IntFree
(
vAdds
);
return
pBox
;
return
pBox
;
...
...
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