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
f7d2c787
Commit
f7d2c787
authored
2 years ago
by
Loïc Correnson
Browse files
Options
Downloads
Patches
Plain Diff
[wp] commiting the fork from proof
parent
a2134c85
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/ProofStrategy.ml
+37
-17
37 additions, 17 deletions
src/plugins/wp/ProofStrategy.ml
with
37 additions
and
17 deletions
src/plugins/wp/ProofStrategy.ml
+
37
−
17
View file @
f7d2c787
...
...
@@ -318,6 +318,18 @@ let parameter (t : Tactical.tactical) a =
"Parameter '%s' not found (skipped alternative)."
a
.
value
;
raise
Not_found
let
rec
bind
sigma
sequent
=
function
|
[]
->
sigma
|
lookup
::
binders
->
match
Pattern
.
psequent
lookup
sigma
sequent
with
|
None
->
raise
Not_found
|
Some
sigma
->
bind
sigma
sequent
binders
let
select
sigma
=
function
|
[]
->
Tactical
.
Empty
|
[
v
]
->
Pattern
.
select
sigma
v
|
vs
->
Tactical
.
Multi
(
List
.
map
(
Pattern
.
select
sigma
)
vs
)
let
configure
tactic
sigma
(
a
,
v
)
=
match
parameter
tactic
a
with
|
Checkbox
fd
->
...
...
@@ -336,7 +348,7 @@ let configure tactic sigma (a,v) =
|
Some
v
->
tactic
#
set_field
fd
v
|
None
->
Wp_parameters
.
error
~
source
:
(
fst
a
.
loc
)
"Expected integer for parameter '%s' (%a)"
a
.
value
"Expected integer for parameter '%s'
@
(%a)"
a
.
value
Tactical
.
pp_selection
value
;
raise
Not_found
end
...
...
@@ -349,7 +361,7 @@ let configure tactic sigma (a,v) =
tactic
#
set_field
fd
v
.
value
with
Not_found
->
Wp_parameters
.
error
~
source
:
(
fst
a
.
loc
)
"Expected string for parameter '%s' (%a)"
a
.
value
"Expected string for parameter '%s'
@
(%a)"
a
.
value
Pattern
.
pp_value
v
;
raise
Not_found
end
...
...
@@ -361,18 +373,11 @@ let configure tactic sigma (a,v) =
tactic
#
set_field
fd
(
Some
v
)
with
Not_found
->
Wp_parameters
.
error
~
source
:
(
fst
a
.
loc
)
"Expected string for parameter '%s' (%a)"
a
.
value
"Expected string for parameter '%s'
@
(%a)"
a
.
value
Pattern
.
pp_value
v
;
raise
Not_found
end
let
rec
bind
sigma
sequent
=
function
|
[]
->
sigma
|
lookup
::
binders
->
match
Pattern
.
psequent
lookup
sigma
sequent
with
|
None
->
raise
Not_found
|
Some
sigma
->
bind
sigma
sequent
binders
let
tactic
tree
node
=
function
|
Strategy
_
|
Auto
_
|
Provers
_
->
None
|
Tactic
t
->
...
...
@@ -383,13 +388,28 @@ let tactic tree node = function
let
ctxt
=
ProofEngine
.
node_context
node
in
let
sequent
=
snd
@@
Wpo
.
compute
@@
ProofEngine
.
goal
node
in
let
console
=
new
ProofScript
.
console
~
pool
~
title
in
WpContext
.
on_context
ctxt
begin
fun
()
->
let
sigma
=
bind
Pattern
.
empty
sequent
t
.
lookup
in
List
.
iter
(
configure
tactic
sigma
)
t
.
params
;
ignore
console
;
None
end
()
let
children
=
WpContext
.
on_context
ctxt
begin
fun
()
->
let
sigma
=
bind
Pattern
.
empty
sequent
t
.
lookup
in
List
.
iter
(
configure
tactic
sigma
)
t
.
params
;
let
selection
=
select
sigma
t
.
select
in
match
tactic
#
select
console
selection
with
|
exception
_
|
Not_applicable
->
Wp_parameters
.
error
~
source
:
(
fst
t
.
tactic
.
loc
)
"Tactical '%s' not applicable on selection@ (%a)"
t
.
tactic
.
value
Tactical
.
pp_selection
selection
;
raise
Not_found
|
Not_configured
->
Wp_parameters
.
error
~
source
:
(
fst
t
.
tactic
.
loc
)
"Tactical '%s' configuration error"
t
.
tactic
.
value
;
raise
Not_found
|
Applicable
process
->
let
script
=
ProofScript
.
jtactic
tactic
selection
in
let
fork
=
ProofEngine
.
fork
tree
~
anchor
:
node
script
process
in
snd
@@
ProofEngine
.
commit
fork
end
()
in
Some
children
with
Not_found
->
None
let
()
=
ignore
tactic
...
...
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