Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Alethe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
veriT
Alethe
Merge requests
!4
Add some bitvector rules
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add some bitvector rules
devel/bb2024
into
master
Overview
0
Commits
9
Pipelines
2
Changes
1
Merged
Hans-Jörg
requested to merge
devel/bb2024
into
master
1 year ago
Overview
0
Commits
9
Pipelines
2
Changes
1
Expand
This moves
#31
forward!
Merge request reports
Viewing commit
41cc39b8
Prev
Next
Show latest version
1 file
+
37
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
41cc39b8
Add overview description of bitblasting rules and bvexplode
· 41cc39b8
Hans-Jörg
authored
2 years ago
spec/doc.tex
+
37
−
0
Options
@@ -73,6 +73,7 @@
\newcommand\lsymb
[1]
{
\mathbf
{
#1
}}
\DeclareMathOperator*
{
\subst
}{
subst
}
\DeclareMathOperator*
{
\reify
}{
reify
}
\DeclareMathOperator*
{
\bvexplode
}{
bvexplode
}
\newcommand\groundbox
[1]
{
\boxed
{
#1
}}
% Proofs
@@ -1688,6 +1689,42 @@ is functional congruence, and \proofRule{sko_forall} works like
\end{AletheS}
\end{example}
\paragraph
{
Bitblasting
}
% Note: we could also use an equality wih bvexplode (maybe called bvpack then)
% TODO: Add example
Bitblasting
\index
{
bitblasting
}
is the translation of
bit-vector
\index
{
bit-vector
}
functions to propositional formulas. To express
this in the Alethe proof rules, the format uses a family of helper predicates
$
\lsymb
{
bvexplode
}$
, one for each bit-vector sort
$
(
\lsymb
{
BitVec
}
\;
n
)
$
.
\[
\lsymb
{
bvexplode
}
:
(
\lsymb
{
BitVec
}
\;
n
)
\,\underbrace
{
\lsymb
{
Bool
}
\dots
\lsymb
{
Bool
}}_
n
\,\lsymb
{
Bool
}
.
\]
Intuitively, the predicate
$
\lsymb
{
bvexplode
}$
is true if the boolean arguments
correspond to the bits in the first argument.
Let
${
<
}
u
_
1
,
\dots
, u
_
n
{
>
}$
denote a bit-vector of sort
$
(
\lsymb
{
BitVec
}
\;
n
)
$
where
$
u
_
i
=
\top
$
if the bit at position
$
i
$
is
$
1
$
, and
$
u
_
i
=
\bot
$
otherwise.
\[
\lsymb
{
bvexplode
}
\;
{
<
}
u
_
1
,
\dots
, u
_
n
{
>
}
\,
v
_
1
\dots
v
_
n
=
\top
.
\]
iff
$
u
_
i
=
v
_
i
$
for all
$
1
≤ i ≤ n
$
.
The addition of the
$
\lsymb
{
bvexplode
}$
predicates is a conservative extension.
They could be defined in terms of standard SMT-LIB functions.
\begin{align*}
\lsymb
{
bvexplode
}
\;
{
<
}
u
_
1,
\dots
, u
_
n
{
>
}
\,
v
_
1
\dots
v
_
n :=
\;
&
(
\lsymb
{
extract
}
\;
1
\;
1) ≈ (
\lsymb
{
ite
}
\,
v
_
1
\,
{
<
}
\top
{
>
}
\,
{
<
}
\bot
{
>
}
)
\,\land\\
&
(
\lsymb
{
extract
}
\;
2
\;
2) ≈ (
\lsymb
{
ite
}
\,
v
_
2
\,
{
<
}
\top
{
>
}
\,
{
<
}
\bot
{
>
}
)
\,\land\\
&
\cdots
\\
&
(
\lsymb
{
extract
}
\;
n
\;
n) ≈ (
\lsymb
{
ite
}
\,
v
_
n
\,
{
<
}
\top
{
>
}
\,
{
<
}
\bot
{
>
}
)
\end{align*}
To avoid name clashes with user defined functions,
$
\lsymb
{
bvexplode
}$
is written as
\inlineAlethe
{
.bvexplode
}
. The SMT-LIB standard specifies
that simple symbols starting with ``
\inlineAlethe
{
.
}
'' are reserved for
solver generated functions.
\section
{
The Alethe Rules
}
\label
{
apx:rules
}
\input
{
rule
_
list
}
Loading