Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
dbbf39f4
Commit
dbbf39f4
authored
Mar 18, 2016
by
Martin Clochard
Committed by
Guillaume Melquiond
May 13, 2016
Browse files
simplify_trivial_quantification: restore equality removal
parent
429debf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/transform/simplify_formula.ml
View file @
dbbf39f4
...
...
@@ -93,6 +93,21 @@ let rec fmla_find_subst boundvars var sign f =
|
Tapp
_
|
Tfalse
|
Ttrue
->
()
|
Tvar
_
|
Tconst
_
|
Teps
_
->
raise
(
FmlaExpected
f
)
(* Simplify out equalities that could be selected. *)
let
rec
equ_simp
f
=
t_label_copy
f
(
match
f
.
t_node
with
|
Tbinop
(
op
,
f1
,
f2
)
->
begin
match
op
,
equ_simp
f1
,
equ_simp
f2
with
|
Tor
,
{
t_node
=
Tfalse
}
,
f
|
Tor
,
f
,
{
t_node
=
Tfalse
}
|
Tand
,
{
t_node
=
Ttrue
}
,
f
|
Tand
,
f
,
{
t_node
=
Ttrue
}
|
Timplies
,
{
t_node
=
Ttrue
}
,
f
->
f
|
op
,
f1
,
f2
->
t_binary
op
f1
f2
end
|
Tapp
(
p
,
[
f1
;
f2
])
when
ls_equal
p
ps_equ
->
t_equ_simp
(
equ_simp
f1
)
(
equ_simp
f2
)
|
_
->
t_map
equ_simp
f
)
let
rec
fmla_quant
sign
f
=
function
|
[]
->
[]
,
f
|
vs
::
l
->
...
...
@@ -102,7 +117,7 @@ let rec fmla_quant sign f = function
vs
::
vsl
,
f
with
Subst_found
t
->
let
f
=
t_subst_single
vs
t
f
in
vsl
,
f
vsl
,
equ_simp
f
let
rec
fmla_remove_quant
f
=
match
f
.
t_node
with
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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