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
e24db71a
Commit
e24db71a
authored
3 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[WP] adds an improvement of the simplifier for eq_sequence
parent
9d07ab51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/wp/Vlist.ml
+8
-1
8 additions, 1 deletion
src/plugins/wp/Vlist.ml
src/plugins/wp/tests/wp_plugin/oracle/nth.res.oracle
+1
-1
1 addition, 1 deletion
src/plugins/wp/tests/wp_plugin/oracle/nth.res.oracle
with
9 additions
and
2 deletions
src/plugins/wp/Vlist.ml
+
8
−
1
View file @
e24db71a
...
...
@@ -195,7 +195,14 @@ let rec leftmost a ms =
|
L
.
Fun
(
repeat
,
[
u
;
n
]
)
when
repeat
==
f_repeat
->
begin
let
exception
RetryOnUnfold
in
try
(* tries to perform some rolling that do not depend on [n] *)
raise
RetryOnUnfold
match
ms
with
|
b
::
ms
->
let
b
,
ms
=
leftmost
b
ms
in
let
u
,
us
=
leftmost
u
[]
in
if
not
(
F
.
decide
(
F
.
e_eq
u
b
))
then
raise
RetryOnUnfold
;
(* u=b ==> ((u^us)*^n) ^ b ^ ms == u ^ (us^b)*^n) ^ ms *)
u
,
v_repeat
(
v_concat
(
us
@
[
b
])
(
F
.
typeof
a
))
n
::
ms
|
_
->
raise
RetryOnUnfold
with
RetryOnUnfold
->
if
F
.
decide
(
F
.
e_lt
F
.
e_zero
n
)
then
(* 0<n ==> (u*^n) ^ ms == u ^ (u*^(n-1)) ^ ms *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/tests/wp_plugin/oracle/nth.res.oracle
+
1
−
1
View file @
e24db71a
...
...
@@ -33,7 +33,7 @@ Prove: (0<=k_0) -> (k_0<(3*(length x_0)))
------------------------------------------------------------
Lemma concat_repeat_swap:
Prove:
let a_0 =
(repeat x_0 k_0)
in (concat a_0 x_0)=(conc
at x_0
a
_0)
Prove: (repeat x_0 k_0)
=(repe
at x_0
k
_0)
------------------------------------------------------------
...
...
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