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
7fc53e95
Commit
7fc53e95
authored
12 years ago
by
Guillaume Petiot
Browse files
Options
Downloads
Patches
Plain Diff
[e-acsl] memory-model article in progress
parent
0096fe19
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/e-acsl/doc/memory_model/article.pdf
+0
-0
0 additions, 0 deletions
src/plugins/e-acsl/doc/memory_model/article.pdf
src/plugins/e-acsl/doc/memory_model/article.tex
+71
-13
71 additions, 13 deletions
src/plugins/e-acsl/doc/memory_model/article.tex
with
71 additions
and
13 deletions
src/plugins/e-acsl/doc/memory_model/article.pdf
+2.18 KiB (+2%)
View file @
7fc53e95
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/doc/memory_model/article.tex
+
71
−
13
View file @
7fc53e95
...
...
@@ -417,20 +417,14 @@ local variables or global variables.
\begin{figure}
[h]
\begin{center}
%\tikz[grow=right,level 2/.style={sibling distance=1em},level distance=3cm]
%\node {0010 ****}
%child { node {0010 0111} }
%child { node {0010 1001} };
\begin{tikzpicture}
\node
at (-3,0)
{
\begin{lstlisting}
{
// begin of scope of v
T v;
§
\highl
{$
storeBlock
(
v, sizeof
(
T
))
$}
§
§
\highl
{$
storeBlock
(
v, sizeof
(
T
))
;
$}
§
...
§
\highl
{$
deleteBlock
(
v
)
$}
§
§
\highl
{$
deleteBlock
(
v
)
;
$}
§
}
// end of scope of v
\end{lstlisting}
}
;
...
...
@@ -442,7 +436,7 @@ local variables or global variables.
\draw
[->]
(0,-1) -- (1, -1);
\end{tikzpicture}
\end{center}
\caption
{
store and delete
block
}
\caption
{
$
store
Block
$
and
$
deleteblock
$
}
\end{figure}
...
...
@@ -458,6 +452,31 @@ local variables or global variables.
These functions have to be used instead of
$
malloc
$
,
$
realloc
$
,
$
calloc
$
and
$
free
$
from the standard library.
\begin{figure}
[h]
\begin{center}
\begin{tikzpicture}
\node
at (-3,0)
{
\begin{lstlisting}
T* v;
v = §
\highl
{$
malloc
(
sizeof
(
N
))
;
$}
§
...
§
\highl
{$
free
(
v
)
;
$}
§
\end{lstlisting}
}
;
\path
[draw, fill=gray!20]
(3,-1.5)--(4,1.5)--(5,-1.5)--cycle;
\node
at (4,-0.5)
{{
\em
bittree
}}
;
\node
at (1.9,0.3)
{$
add
$}
;
\draw
[->]
(1.5,0) -- (2.5, 0);
\node
at (1.9,-.7)
{$
remove
$}
;
\draw
[->]
(1.5,-1) -- (2.5, -1);
\end{tikzpicture}
\end{center}
\caption
{$
malloc
$
and
$
free
$}
\end{figure}
%\begin{lstlisting}[caption=Dynamic allocation functions]
%void * _malloc(size_t size);
%void * _realloc(void * ptr, size_t size);
...
...
@@ -476,6 +495,25 @@ It is designed to avoid multiple calls to $initialize$ whenever it is
possible and improves efficiency of the instrumented program.
\begin{figure}
[h]
\begin{center}
\begin{tikzpicture}
\node
at (-3,0)
{
\begin{lstlisting}
v = (T)x;
§
\highl
{$
initialize
(
v, sizeof
(
T
))
;
$}
§
\end{lstlisting}
}
;
\path
[draw, fill=gray!20]
(3,-1.5)--(4,1.5)--(5,-1.5)--cycle;
\node
at (4,-0.5)
{{
\em
bittree
}}
;
\node
at (1.9,0)
{$
find
$}
;
\draw
[->]
(1.5,-0.3) -- (2.5,-0.3);
\end{tikzpicture}
\end{center}
\caption
{$
initialize
$}
\end{figure}
%\begin{lstlisting}[caption=Initialization functions]
%void _initialize(void * ptr, size_t size);
%void _full_init(void * ptr);
...
...
@@ -508,6 +546,25 @@ $initialized(ptr, size)$ returns 1 if the $size$ first bytes starting from
$
ptr
$
are initialized, 0 otherwise.
\begin{figure}
[h]
\begin{center}
\begin{tikzpicture}
\node
at (-3,0)
{
\begin{lstlisting}
//@ assert §
${
\tt
\backslash
valid
(
p
+
i
)
}$
§;
§
\highl
{$
assert
(
valid
(
p
+
i
))
;
$}
§
\end{lstlisting}
}
;
\path
[draw, fill=gray!20]
(3,-1.5)--(4,1.5)--(5,-1.5)--cycle;
\node
at (4,-0.5)
{{
\em
bittree
}}
;
\node
at (1.9,0)
{$
find
$}
;
\draw
[<->]
(1.5,-0.3) -- (2.5,-0.3);
\end{tikzpicture}
\end{center}
\caption
{$
valid
$
assertion checking
}
\end{figure}
%\section{Instrumentation}
%\label{section:instru}
...
...
@@ -619,12 +676,13 @@ $ptr$ are initialized, 0 otherwise.
\centering
\begin{tabular}
{
|c|c|c|c|c|c|c|
}
\hline
&
alarms
&
$
\tau
_{
exec
}$
&
mutants
&
mutation
&
test cases
&
assert violations
\\
&
alarms
&
time
&
test cases
&
mutants
&
mutants killed
\\
\hline
$
p
_
1
$
&
5
&
22s
&
27
&
2
&
2
\\
% sorted
\hline
$
p
_
1
$
&
19
&
6
3s
&
6
&
pointer arith.
&
57
&
156/186 (83.8
\%
)
\\
$
p
_
2
$
&
19
&
3
4
s
&
31
&
6
&
6
\\
% f
\hline
$
p
_
2
$
&
8
&
2
8
s
&
2
&
pointer arith.
&
27
&
52/54 (96.3
\%
)
\\
$
p
_
3
$
&
25
&
3
2s
&
2
0
&
11
&
11
\\
% BsearchPrecond
\hline
\end{tabular}
\caption
{
Experimental results
}
...
...
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