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
6de1f210
Commit
6de1f210
authored
3 years ago
by
Patrick Baudin
Browse files
Options
Downloads
Patches
Plain Diff
[WP] fixes eq_sequence
parent
67451a19
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/Vlist.ml
+8
-4
8 additions, 4 deletions
src/plugins/wp/Vlist.ml
with
8 additions
and
4 deletions
src/plugins/wp/Vlist.ml
+
8
−
4
View file @
6de1f210
...
...
@@ -262,7 +262,6 @@ let rec subsequence xs rs ys =
let
rs
,
ys
=
omit
rs
x
ys
in
subsequence
xs
rs
ys
let
p_is_nil
a
=
F
.
p_equal
a
(
v_nil
(
F
.
typeof
a
))
let
rewrite_eq
a
b
=
match
F
.
repr
a
,
F
.
repr
b
with
|
L
.
Fun
(
nil
,
[]
)
,
_
when
nil
==
f_nil
->
rewrite_is_nil
~
nil
:
a
b
...
...
@@ -272,9 +271,14 @@ let rewrite_eq a b =
try
rightmost_eq
a
b
with
Not_found
->
let
xs
=
elements
a
in
let
ys
=
elements
b
in
if
List
.
length
xs
<
List
.
length
ys
then
F
.
p_all
p_is_nil
(
subsequence
xs
[]
ys
)
else
F
.
p_all
p_is_nil
(
subsequence
ys
[]
xs
)
let
rs
=
if
List
.
length
xs
<
List
.
length
ys
then
subsequence
xs
[]
ys
else
subsequence
ys
[]
xs
in
let
pred
=
F
.
p_all
(
fun
s
->
F
.
p_equal
s
(
v_nil
(
F
.
typeof
s
)))
rs
in
if
F
.
decide
(
e_prop
pred
)
then
F
.
p_true
else
raise
Not_found
(* All Simplifications *)
...
...
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