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
5c5bd9d6
Commit
5c5bd9d6
authored
3 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp/doc] supported decreases
parent
3873db16
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/wp/Changelog
+5
-2
5 additions, 2 deletions
src/plugins/wp/Changelog
src/plugins/wp/doc/manual/wp_intro.tex
+7
-4
7 additions, 4 deletions
src/plugins/wp/doc/manual/wp_intro.tex
src/plugins/wp/doc/manual/wp_plugin.tex
+2
-2
2 additions, 2 deletions
src/plugins/wp/doc/manual/wp_plugin.tex
with
14 additions
and
8 deletions
src/plugins/wp/Changelog
+
5
−
2
View file @
5c5bd9d6
...
@@ -24,10 +24,13 @@
...
@@ -24,10 +24,13 @@
Plugin WP <next-release>
Plugin WP <next-release>
########################
########################
- WP [2022-01-10] Supported general variant measure
- WP [2022-01-10] Supported decreases clause
- TIP [2022-01-10] New tactic Mod-Mask: rewrite bitmask into/from modulo
- TIP [2022-01-10] New tactic Mod-Mask: rewrite bitmask into/from modulo
- TIP [2022-01-05] New tactic Clear: remove hypothesis
- TIP [2022-01-05] New tactic Clear: remove hypothesis
-* WP [2022-01-05] Fix loop invariant order
-* WP [2022-01-05] Fixed loop invariant order
- WP [2022-01-05] Weaken check loop invariant
- WP [2022-01-05] Weakened loop invariant verification (in particular
for check loop invariant)
- TIP [2021-11-30] Extended Split tactic: can split in hypotheses, can
- TIP [2021-11-30] Extended Split tactic: can split in hypotheses, can
split conjunctions into multiple hypotheses.
split conjunctions into multiple hypotheses.
- WP [2021-11-08] Removed legacy WP engine and option -wp-legacy
- WP [2021-11-08] Removed legacy WP engine and option -wp-legacy
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/doc/manual/wp_intro.tex
+
7
−
4
View file @
5c5bd9d6
...
@@ -198,10 +198,13 @@ speaking, the \emph{weakest precondition} of property $Q$ through
...
@@ -198,10 +198,13 @@ speaking, the \emph{weakest precondition} of property $Q$ through
statement
$
\mathit
{
stmt
}$
should also ensure termination and execution without
statement
$
\mathit
{
stmt
}$
should also ensure termination and execution without
runtime errors.
runtime errors.
The proof obligations generated by
\textsf
{
WP
}
do not entail
When the
\verb
+
terminates
+
clause is specified in function contracts,
systematic termination, unless you systematically specify and validate
\textsf
{
WP
}
generates proof
loop variant
\textsf
{
ACSL
}
annotations. Nevertheless,
\texttt
{
exit
}
behaviors of a
obligations to make sure that all loops have loop variants and that all function
function are correctly handled by
\textsf
{
WP
}
.
calls terminate whenever necessary (thus requiring
\verb
+
decreases
+
clause for
recursive functions). Furthermore,
\texttt
{
exit
}
behaviors of a function are
correctly handled by
\textsf
{
WP
}
. More details about proof of termination in
\textsf
{
WP
}
are provided in Section~
\ref
{
ss-sec:plugin-terminates
}
.
Regarding runtime errors, the proof obligations generated by
Regarding runtime errors, the proof obligations generated by
\textsf
{
WP
}
assume your program never raises any of them. As
\textsf
{
WP
}
assume your program never raises any of them. As
...
...
This diff is collapsed.
Click to expand it.
src/plugins/wp/doc/manual/wp_plugin.tex
+
2
−
2
View file @
5c5bd9d6
...
@@ -1050,6 +1050,7 @@ a second for the call to \verb+f2+. A last goal is generated at the call
...
@@ -1050,6 +1050,7 @@ a second for the call to \verb+f2+. A last goal is generated at the call
site: one must prove that
\verb
+
fp
+
is either
\verb
+
f1
+
or
\verb
+
f2
+
.
site: one must prove that
\verb
+
fp
+
is either
\verb
+
f1
+
or
\verb
+
f2
+
.
\subsubsection
{
Proof of
\texttt
{
@terminates
}}
\subsubsection
{
Proof of
\texttt
{
@terminates
}}
\label
{
ss-sec:plugin-terminates
}
In ACSL, a function can be specified to terminate when some condition
\verb
+
P
+
holds
In ACSL, a function can be specified to terminate when some condition
\verb
+
P
+
holds
in pre-condition.
in pre-condition.
...
@@ -1132,8 +1133,7 @@ as specified by the options:
...
@@ -1132,8 +1133,7 @@ as specified by the options:
recursive cluster (as defined in the ACSL manual) and shall terminate, WP checks that a
recursive cluster (as defined in the ACSL manual) and shall terminate, WP checks that a
\verb
+
decreases
+
clause is available for the function. Proving that existing
\verb
+
decreases
+
clause is available for the function. Proving that existing
recursive calls might be unreachable is delegated to the proof of the
recursive calls might be unreachable is delegated to the proof of the
\verb
+
decreases
+
clause. Note however that, currenlty, the proof of
\verb
+
decreases
+
\verb
+
decreases
+
clause.
clauses is not supported yet.
\paragraph
{
Function pointers.
}
On a call via a function pointer, WP checks that
\paragraph
{
Function pointers.
}
On a call via a function pointer, WP checks that
a
\verb
+
@calls
+
is specified for this function pointer. If so, WP just behaves
a
\verb
+
@calls
+
is specified for this function pointer. If so, WP just behaves
...
...
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