Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
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
pub
frama-c
Commits
e7370136
Commit
e7370136
authored
4 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp] protect simplifiers
parent
374b2467
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/wpo.ml
+15
-8
15 additions, 8 deletions
src/plugins/wp/wpo.ml
with
15 additions
and
8 deletions
src/plugins/wp/wpo.ml
+
15
−
8
View file @
e7370136
...
...
@@ -190,7 +190,14 @@ struct
let
is_trivial
g
=
Conditions
.
is_trivial
g
.
sequent
let
apply
phi
g
=
g
.
sequent
<-
phi
g
.
sequent
let
apply
option
phi
g
=
try
g
.
sequent
<-
phi
g
.
sequent
with
exn
when
Wp_parameters
.
protect
exn
->
Wp_parameters
.
warning
~
current
:
false
~
once
:
true
"Goal simplification aborted (%s):@
\n
\
Exception %S@
\n
\
Re-run with debug level 1+ for details."
option
(
Printexc
.
to_string
exn
)
let
default_simplifiers
=
[
Wp_parameters
.
SimplifyIsCint
.
get
,
Cint
.
is_cint_simplifier
;
...
...
@@ -200,23 +207,23 @@ struct
let
preprocess
g
=
if
Wp_parameters
.
Let
.
get
()
then
begin
apply
Conditions
.
introduction_eq
g
;
apply
"introcution"
Conditions
.
introduction_eq
g
;
let
fold
acc
(
get
,
solver
)
=
if
get
()
then
solver
::
acc
else
acc
in
let
solvers
=
List
.
fold_left
fold
[]
default_simplifiers
in
apply
(
Conditions
.
simplify
~
solvers
)
g
;
apply
"-wp-simplify-*"
(
Conditions
.
simplify
~
solvers
)
g
;
if
Wp_parameters
.
FilterInit
.
get
()
then
apply
Conditions
.
init_filter
g
;
then
apply
"-wp-filter-init"
Conditions
.
init_filter
g
;
if
Wp_parameters
.
Prune
.
get
()
then
apply
(
Conditions
.
pruning
~
solvers
)
g
;
then
apply
"-wp-pruning"
(
Conditions
.
pruning
~
solvers
)
g
;
if
Wp_parameters
.
Filter
.
get
()
then
apply
Conditions
.
filter
g
;
then
apply
"-wp-filter"
Conditions
.
filter
g
;
if
Wp_parameters
.
Parasite
.
get
()
then
apply
Conditions
.
parasite
g
;
then
apply
"-wp-parasite"
Conditions
.
parasite
g
;
end
else
begin
if
Wp_parameters
.
Clean
.
get
()
then
apply
Conditions
.
clean
g
;
then
apply
"-wp-clean"
Conditions
.
clean
g
;
end
;
if
Conditions
.
is_trivial
g
.
sequent
then
g
.
sequent
<-
Conditions
.
trivial
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment