Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
5fcf22a9
Commit
5fcf22a9
authored
Oct 20, 2015
by
Martin Clochard
Committed by
Guillaume Melquiond
Feb 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify_formula: also simplify formula that occurs inside terms
parent
f905b31b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/transform/simplify_formula.ml
src/transform/simplify_formula.ml
+8
-6
No files found.
src/transform/simplify_formula.ml
View file @
5fcf22a9
...
...
@@ -12,7 +12,9 @@
open
Term
open
Decl
let
rec
fmla_simpl
f
=
TermTF
.
t_map_simp
(
fun
t
->
t
)
fmla_simpl
f
let
rec
fmla_simpl
f
=
TermTF
.
t_map_simp
t_fmla_simpl
fmla_simpl
f
and
t_fmla_simpl
t
=
TermTF
.
t_map
t_fmla_simpl
fmla_simpl
t
let
decl_l
d
=
match
d
.
d_node
with
...
...
@@ -24,9 +26,9 @@ let decl_l d =
|
Ttrue
,
Pgoal
->
[]
|
_
->
[[
create_prop_decl
k
pr
f
]]
end
|
_
->
[[
DeclTF
.
decl_map
(
fun
t
->
t
)
fmla_simpl
d
]]
|
_
->
[[
DeclTF
.
decl_map
t_fmla_simpl
fmla_simpl
d
]]
let
simplify_formula
=
Trans
.
rewriteTF
(
fun
t
->
t
)
fmla_simpl
None
let
simplify_formula
=
Trans
.
rewriteTF
t_fmla_simpl
fmla_simpl
None
let
simplify_formula_and_task
=
Trans
.
decl_l
decl_l
None
...
...
@@ -108,7 +110,7 @@ let rec fmla_remove_quant f =
let
vsl
,
f'
=
fmla_quant
sign
f'
vsl
in
let
f'
=
fmla_remove_quant
f'
in
t_quant
k
(
close
vsl
[]
f'
)
|
_
->
Term
TF
.
t_map
(
fun
t
->
t
)
fmla_remove_quant
f
|
_
->
Term
.
t_map
fmla_remove_quant
f
(*let fmla_remove_quant f =
Format.eprintf "@[<hov>%a =>|@\n" Pretty.print_fmla f;
...
...
@@ -119,7 +121,7 @@ let rec fmla_remove_quant f =
*)
let
simplify_trivial_quantification
=
Trans
.
rewrite
TF
(
fun
t
->
t
)
fmla_remove_quant
None
Trans
.
rewrite
fmla_remove_quant
None
let
()
=
Trans
.
register_transform
"simplify_trivial_quantification"
simplify_trivial_quantification
...
...
@@ -208,5 +210,5 @@ let fmla_cond_subst filter f =
|
_
->
()
done
;
fmla_unflatten
conj
f
subf
|
_
->
TermTF
.
t_map
(
fun
t
->
t
)
aux
f
in
|
_
->
t_map
aux
f
in
aux
f
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