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
531215da
Commit
531215da
authored
8 years ago
by
Julien Signoles
Committed by
Kostyantyn Vorobyov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[typing] fix wrong 'use_gmp_opt'
parent
5c2df65f
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/e-acsl/typing.ml
+7
-6
7 additions, 6 deletions
src/plugins/e-acsl/typing.ml
with
7 additions
and
6 deletions
src/plugins/e-acsl/typing.ml
+
7
−
6
View file @
531215da
...
@@ -229,8 +229,8 @@ let mk_ctx ~use_gmp_opt = function
...
@@ -229,8 +229,8 @@ let mk_ctx ~use_gmp_opt = function
|
Other
|
Gmp
as
c
->
c
|
Other
|
Gmp
as
c
->
c
|
C_type
_
as
c
->
if
use_gmp_opt
&&
Options
.
Gmp_only
.
get
()
then
Gmp
else
c
|
C_type
_
as
c
->
if
use_gmp_opt
&&
Options
.
Gmp_only
.
get
()
then
Gmp
else
c
(* type the term [t] in a context [ctx]
. Take
--e-acsl-gmp-only into account
iff
(* type the term [t] in a context [ctx]
by taking
--e-acsl-gmp-only into account
[use_gmp_opt] is true. *)
iff
[use_gmp_opt] is true. *)
let
rec
type_term
~
use_gmp_opt
?
(
arith_operand
=
false
)
?
ctx
t
=
let
rec
type_term
~
use_gmp_opt
?
(
arith_operand
=
false
)
?
ctx
t
=
let
ctx
=
Extlib
.
opt_map
(
mk_ctx
~
use_gmp_opt
)
ctx
in
let
ctx
=
Extlib
.
opt_map
(
mk_ctx
~
use_gmp_opt
)
ctx
in
let
dup
ty
=
ty
,
ty
in
let
dup
ty
=
ty
,
ty
in
...
@@ -312,7 +312,7 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
...
@@ -312,7 +312,7 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
with
Interval
.
Not_an_integer
->
with
Interval
.
Not_an_integer
->
dup
Other
(* real *)
dup
Other
(* real *)
in
in
ignore
(
type_term
~
use_gmp_opt
~
arith_operand
:
true
~
ctx
t'
);
ignore
(
type_term
~
use_gmp_opt
:
true
~
arith_operand
:
true
~
ctx
t'
);
(
match
unop
with
(
match
unop
with
|
LNot
->
c_int
,
ctx_res
(* converted into [t == 0] in case of GMP *)
|
LNot
->
c_int
,
ctx_res
(* converted into [t == 0] in case of GMP *)
|
Neg
|
BNot
->
dup
ctx_res
)
|
Neg
|
BNot
->
dup
ctx_res
)
...
@@ -337,8 +337,9 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
...
@@ -337,8 +337,9 @@ let rec type_term ~use_gmp_opt ?(arith_operand=false) ?ctx t =
|
_
->
true
|
_
->
true
in
in
let
cast_first
=
cast_first
t1
t2
in
let
cast_first
=
cast_first
t1
t2
in
ignore
(
type_term
~
use_gmp_opt
~
arith_operand
:
cast_first
~
ctx
t1
);
ignore
(
type_term
~
use_gmp_opt
:
true
~
arith_operand
:
cast_first
~
ctx
t1
);
ignore
(
type_term
~
use_gmp_opt
~
arith_operand
:
(
not
cast_first
)
~
ctx
t2
);
ignore
(
type_term
~
use_gmp_opt
:
true
~
arith_operand
:
(
not
cast_first
)
~
ctx
t2
);
dup
ctx_res
dup
ctx_res
|
TBinOp
((
Lt
|
Gt
|
Le
|
Ge
|
Eq
|
Ne
)
,
t1
,
t2
)
->
|
TBinOp
((
Lt
|
Gt
|
Le
|
Ge
|
Eq
|
Ne
)
,
t1
,
t2
)
->
...
@@ -487,7 +488,7 @@ and type_term_lval (host, offset) =
...
@@ -487,7 +488,7 @@ and type_term_lval (host, offset) =
and
type_term_lhost
=
function
and
type_term_lhost
=
function
|
TVar
_
|
TVar
_
|
TResult
_
->
()
|
TResult
_
->
()
|
TMem
t
->
ignore
(
type_term
~
use_gmp_opt
:
tru
e
~
ctx
:
Other
t
)
|
TMem
t
->
ignore
(
type_term
~
use_gmp_opt
:
fals
e
~
ctx
:
Other
t
)
and
type_term_offset
=
function
and
type_term_offset
=
function
|
TNoOffset
->
()
|
TNoOffset
->
()
...
...
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