Skip to content
GitLab
Menu
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
49b64085
Commit
49b64085
authored
Sep 24, 2010
by
Johannes Kanig
Browse files
merge quantifiers
parent
00edff41
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/transform/close_epsilon.ml
View file @
49b64085
...
...
@@ -21,6 +21,13 @@ open Decl
open
Task
open
Term
let
forall_merge
vs
f
=
match
f
.
f_node
with
|
Fquant
(
Fforall
,
fq
)
->
let
vs'
,
trs
,
f
=
f_open_quant
fq
in
f_forall_close
(
vs
@
vs'
)
trs
f
|
_
->
f_forall_close
vs
[]
f
let
rec
rewriteT
t
=
match
t
.
t_node
with
|
Teps
fb
->
let
fv
=
Svs
.
elements
(
t_freevars
Svs
.
empty
t
)
in
...
...
@@ -39,7 +46,7 @@ let rec rewriteT t = match t.t_node with
(* substitute [magic] for [x] *)
let
f
=
f_subst_single
x
rx
f
in
(* quantify over free variables and epsilon-close over [magic] *)
let
f
=
f_
forall_
close_simp
fv
[]
f
in
let
f
=
forall_
merge
fv
f
in
let
f
=
t_eps_close
magic_fs
f
in
(* apply epsilon-term to variables *)
List
.
fold_left
(
fun
acc
x
->
t_func_app
acc
(
t_var
x
))
f
fv
...
...
Write
Preview
Supports
Markdown
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