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
ef19076f
Commit
ef19076f
authored
3 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl] Fix crash when creating an axiomatic with an existing name
parent
33956f4f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/e-acsl/src/project_initializer/rtl.ml
+38
-14
38 additions, 14 deletions
src/plugins/e-acsl/src/project_initializer/rtl.ml
with
38 additions
and
14 deletions
src/plugins/e-acsl/src/project_initializer/rtl.ml
+
38
−
14
View file @
ef19076f
...
...
@@ -232,7 +232,7 @@ let lookup_rtl_globals rtl_ast =
Assocs
.
add_kf
g
kf
in
do_it
~
add
~
assoc
(
fun
_
->
Globals
.
Functions
.
mem_name
vi
.
vname
)
acc
l
g
|
GAnnot
(
Daxiomatic
(
name
,
galist
,
_
,
_
)
,
_
)
as
g
::
l
->
|
GAnnot
(
Daxiomatic
(
name
,
galist
,
_
,
_
)
as
ga
,
_
)
as
g
::
l
->
(* processing axiomatics *)
let
fun_or_preds
=
(* extract the functions and predicates from the axiomatic *)
...
...
@@ -264,19 +264,43 @@ let lookup_rtl_globals rtl_ast =
all its functions and predicates are in the user's project. If only
some of them are in it then it is an error, and if none of them are
then the axiomatic is not in the user's project. *)
if
exists
&&
not
forall
then
Options
.
abort
"@[The following logic functions or predicates@ \
are in conflict with logic functions or predicates from the@ \
axiomatic '%s' in the E-ACSL runtime library, please rename@ \
them:@ %a@]"
name
(
Pretty_utils
.
pp_list
~
sep
:
",@ "
Printer
.
pp_logic_info
)
conflicting_lis
else
forall
let
in_user_prj
=
if
exists
&&
not
forall
then
Options
.
abort
"@[The following logic functions or predicates@ \
are in conflict with logic functions or predicates from the@ \
axiomatic '%s' in the E-ACSL runtime library, please rename@ \
them:@ %a@]"
name
(
Pretty_utils
.
pp_list
~
sep
:
",@ "
Printer
.
pp_logic_info
)
conflicting_lis
else
forall
in
(* If the axiomatic is not "in the user's project", check if a different
axiomatic with the same name is in it. *)
if
not
in_user_prj
then
begin
let
ip_from_ga
=
Property
.
ip_of_global_annotation
ga
in
let
found
=
try
Property_status
.
iter
(
fun
ppt
->
if
List
.
exists
(
Property
.
equal
ppt
)
ip_from_ga
then
raise
Exit
);
false
with
Exit
->
true
in
if
found
then
Options
.
abort
"@[The axiomatic '%s' is in conflict with an@ \
axiomatic with the same name in the E-ACSL runtime library,@ \
please rename it.@]"
name
end
;
in_user_prj
in
let
assoc
_g
=
List
.
iter
...
...
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