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
8f9aad00
Commit
8f9aad00
authored
8 years ago
by
Julien Signoles
Committed by
Kostyantyn Vorobyov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[typing] fix another typing issue with quantifiers
parent
b25866a7
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/e-acsl/quantif.ml
+2
-0
2 additions, 0 deletions
src/plugins/e-acsl/quantif.ml
src/plugins/e-acsl/tests/gmp/quantif.i
+1
-0
1 addition, 0 deletions
src/plugins/e-acsl/tests/gmp/quantif.i
src/plugins/e-acsl/typing.ml
+1
-1
1 addition, 1 deletion
src/plugins/e-acsl/typing.ml
with
4 additions
and
1 deletion
src/plugins/e-acsl/quantif.ml
+
2
−
0
View file @
8f9aad00
...
...
@@ -243,6 +243,8 @@ let convert kf env loc is_forall p bounded_vars hyps goal =
in
let
guard
=
stmts_block
guard_blk
in
(* increment the loop counter [x++] *)
(* TODO: should check that it does not overflow in the case of the type
of the loop variable is __declared__ too small. *)
let
tlv_one
=
t_plus_one
tlv
in
(* previous typing ensures that [x++] fits type [ty] *)
Typing
.
type_term
~
use_gmp_opt
:
false
~
ctx
:
ctx_one
tlv_one
;
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/tests/gmp/quantif.i
+
1
−
0
View file @
8f9aad00
...
...
@@ -28,6 +28,7 @@ int main(void) {
{ // Gitlab issue #42
int buf[10];
/*@ assert \forall integer i; 0 <= i < 10 ==> \valid(buf+i); */
/*@ assert \forall char i; 0 <= i < 10 ==> \valid(buf+i); */
}
return 0;
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/typing.ml
+
1
−
1
View file @
8f9aad00
...
...
@@ -567,7 +567,7 @@ let rec type_predicate p =
|
Linteger
->
mk_ctx
~
use_gmp_opt
:
true
(
ty_of_interv
~
ctx
:
Gmp
i
)
|
Ctype
ty
->
(
match
Cil
.
unrollType
ty
with
|
TInt
(
ik
,
_
)
->
C_type
ik
|
TInt
(
ik
,
_
)
->
mk_ctx
~
use_gmp_opt
:
true
(
C_type
ik
)
|
ty
->
Options
.
fatal
"unexpected type %a for quantified variable %a"
Printer
.
pp_typ
ty
...
...
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