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
780b14de
Commit
780b14de
authored
4 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
[devman] fix compilation of example script
parent
94643712
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
doc/developer/examples/syntactic_check.ml
+2
-2
2 additions, 2 deletions
doc/developer/examples/syntactic_check.ml
with
2 additions
and
2 deletions
doc/developer/examples/syntactic_check.ml
+
2
−
2
View file @
780b14de
...
...
@@ -31,7 +31,7 @@ class non_zero_divisor prj = object (self)
(* A division is an expression: we override the vexpr method *)
method
!
vexpr
e
=
match
e
.
enode
with
|
BinOp
((
Div
|
Mod
)
,
_
,
denom
,
_
)
->
let
logic_denom
=
Logic_utils
.
expr_to_term
~
c
ast
:
tru
e
denom
in
let
logic_denom
=
Logic_utils
.
expr_to_term
~
c
oerce
:
fals
e
denom
in
let
assertion
=
Logic_const
.
prel
(
Rneq
,
logic_denom
,
Cil
.
lzero
()
)
in
(* At this point, we have built the assertion we want to insert. It remains
to attach it to the correct statement. The cil visitor maintains the
...
...
@@ -43,7 +43,7 @@ class non_zero_divisor prj = object (self)
|
Kglobal
->
assert
false
|
Kstmt
s
->
s
in
let
kf
=
Extlib
.
the
self
#
current_kf
in
let
kf
=
Extlib
.
the
self
#
current_kf
in
(* The above statement and function are related to the original project. We
need to attach the new assertion to the corresponding statement and
function of the new project. Cil provides functions to convert a
...
...
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