Skip to content

Commit 9b48909

Browse files
committed
Completing and restructuring the user docs a bit
1 parent 8f662cb commit 9b48909

File tree

9 files changed

+210
-60
lines changed

9 files changed

+210
-60
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ prepare:
22
pip install --user -r requirements.txt
33

44
serve:
5-
mkdocs serve
5+
mkdocs serve --livereload
66

77
build:
88
mkdocs build

docs/extra.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.md-nav__item--section > .md-nav__link[for] {
2+
color: var(--md-typeset-color) !important;
3+
}

docs/user/index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Welcome to KeY Documentation
2+
3+
Welcome to the **KeY user documentation index**. Use the navigation sidebar on the left to explore the available resources. This site provides information you need to get started with KeY, delve into detailed topics regarding user interactions, and learn about the proof script technology built into KeY.
4+
5+
Whether you're new to KeY or an experienced user, this documentation is designed to support your workflow—from interactive proving to advanced automated proof scripting.
6+
7+
## What Can You Find Here?
8+
9+
If you're just starting with KeY, the **User Guide** section will help you begin your journey. Check out the **Changelog** for recent updates, and find answers to common questions in the **FAQ**.
10+
11+
- The **Topics** section dives deeper into various aspects of using KeY, including
12+
- **User Interface Features**: Explore KeY’s unique UI capabilities
13+
- Dive into KeY’s **Proof Scripts** section to learn about proof scripts
14+
15+
16+
## Learn More
17+
18+
Additional information is available on the [KeY Project homepage](https://key-project.org) or on our [GitHub repository](https://github.com/KeYProject/key/), where you can find the source code, development updates, and contribute to the project.
19+
20+
We hope you find this documentation helpful and informative. Happy proving!
21+
22+
## Disclaimer
23+
24+
Some content of theses pages has been co-produced by AI agents, mainly as summaries of other pages, publications or other sources.

docs/workbench/Proof Scripts/commands.md

Lines changed: 112 additions & 38 deletions
Large diffs are not rendered by default.
Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,54 @@
11
# Scripting Interactive Proofs
22

3-
To persist interactions performed during proof contsruction in KeY and to replay these
4-
interactions, KeY allows users to use proof scripts.
53

6-
In this documentation the scripts that allow for branching statements are eplained. (see [Explanation
7-
of linear scripts](./linearScripts.md) for the other version of scripts in KeY)
4+
### Motivation for Proof Scripts in KeY
85

9-
The three main building blocks of the scripting language are mutators, control-flow
10-
structures, and selectors for proof goals. We describe the general concepts in the
11-
following.
6+
Formal verification in KeY often requires revisiting and refining
7+
intermediate specifications like loop invariants through a highly
8+
iterative process. However, even small adjustments to the program or
9+
its specification can invalidate entire proofs, necessitating complete
10+
reconstruction. Although KeY's current mechanism can replay proofs
11+
from fine-grained rule applications, it is brittle and vulnerable to
12+
minor changes. Especially in low-automation contexts, where many steps
13+
are performed manually, repeating those steps is time-consuming and
14+
error-prone.
1215

13-
##Mutators.
14-
Mutators are the most basic building blocks of the proof
15-
script. When executed a mutator may change the proof script state by changing
16-
variables and the underlying proof state by adding nodes to the proof tree.
16+
**Proof scripts offer a solution** by capturing the essential and complex reasoning steps, while delegating routine proof search tasks to the automatic engine. This significantly improves maintainability and usability of proofs as code or specifications evolve.
17+
18+
### Benefits of Proof Scripts in KeY
19+
20+
- **Robustness to Changes**: Scripts focus on core proof decisions rather than low-level steps, making them resilient to small changes in the code or specification.
21+
- **Increases Comprehensibility**: Proof scripts can convey the high-level proof ideas that allow users to understand the reasoning.
22+
- **Maintains Manual Effort**: Records manual proof actions (e.g., quantifier instantiations or definition expansions) so that they don't need to be repeated after specification changes.
23+
- **Improved Automation Synergy**: Proof scripts guide the prover through the difficult parts while letting the automated search handle simpler steps.
24+
- **Scalability to Complex Proofs**: Handles proof branching more effectively, applying scripts only where user interaction is needed.
25+
- **Better Usability over Previous Scripting**: Avoids complex top-level goal selection required in earlier global script mechanisms.
26+
- **Facilitates Proof Reuse**: Allows key insights and strategies to persist across code revisions, supporting iterative verification workflows.
27+
28+
Proof scripts are textual representations of rule applications,
29+
settings changes and macro invocations. They are notated in linear
30+
order. The target of a script command is usually the first open goal
31+
in the proof tree, i.e., the first reached when traversing the proof
32+
tree (not necessarily the first in the Goal pane in the GUI).
33+
34+
## Proof Script Languages
35+
36+
There are two flavours of proof script languages. One more low-level
37+
for the interaction on the level of JavaDL and one for more high-level
38+
interaction on the level of JML annotated to Java code.
39+
40+
### Linear Proof Scripts[^1]
41+
42+
[Documentation of Linear Proof Scripts](linearScripts)
43+
44+
Linear scripts are added to entire JavaDL proof obligations. They can
45+
be loaded interactively or stored in `.key` files.
46+
47+
### JML Proof Scripts
48+
49+
[Documentation of JML Proof Scripts](jml)
50+
51+
JML scripts are added to individual assertions of a Java method. They
52+
are annotated as JML comments in `.java` files.
53+
54+
[^1]: That is a working title name – might be subject to change.

docs/workbench/Proof Scripts/jml.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Proof Scripts in JML
1+
# Proof Scripts in JML
22

33
!!! note
44
This describes proof scripts from JML as opposed to [linear scripts](../linearScripts)
@@ -149,3 +149,7 @@ Here are some examples of proof scripts in JML:
149149
### Proof of Boyer-More using JML proof scripts
150150

151151
see https://github.com/KeYProject/key/blob/96a6a98328bb9dbaadfb5b54e11b29230e77dfe9/key.ui/examples/heap/BoyerMoore/src/BoyerMoore.java
152+
153+
### Proof of the [IPS4O sorting algorithm](https://doi.org/10.1007/978-3-031-57246-3_15) (partially) using scripts
154+
155+
see https://github.com/KeYProject/ips4o-verify/blob/pfeifer/STTT/src/main/java/de/wiesler/Sorter.java

docs/workbench/Proof Scripts/linearScripts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Linear Proof Scripts
1+
# Linear Proof Scripts[^1]
22

33
!!! note
44
This covers linear scripts. Scripts can also be attached to [JML assertions with scripts](../jml).
@@ -122,3 +122,4 @@ in the KeY repository:
122122
* https://github.com/KeYProject/key/blob/main/key.ui/examples/heap/quicksort/sort.key
123123
* https://github.com/KeYProject/key/blob/main/key.ui/examples/heap/quicksort/sort.script
124124

125+
[^1]: "Linear Scripts" is a working title name – might be subject to change.

docs/workbench/Proof Scripts/original.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
*Mattias Ulbrich <[email protected]>, 2015*
44

5-
!!! note
5+
!!! warning
66
This is the original announcement and probably a bit outdated.
7+
8+
!!! note
79
Experimental feature: Proof scripts are currently only visible in the GUI if KeY
810
is launched with the `--experimental` option. Concrete syntax is subject to
911
change.

mkdocs.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,17 @@ nav:
9090
# - quicktour/proving.md
9191
# - quicktour/appendix.md
9292
- User Guide:
93+
- user/index.md
9394
- changelog.md
9495
- user/FAQ.md
95-
- user/ADTs.md
96-
- user/Classpath.md
97-
- user/Interactive.md
98-
- user/JavaDLinJML.md
99-
- user/RemoveGenerics.md
100-
- user/Polarity.md
101-
- user/JavaGrammar.md
96+
- Topics:
97+
- user/ADTs.md
98+
- user/Classpath.md
99+
- user/Interactive.md
100+
- user/JavaDLinJML.md
101+
- user/RemoveGenerics.md
102+
- user/Polarity.md
103+
- user/JavaGrammar.md
102104
- UI Features:
103105
- user/UiFeatures/index.md
104106
- user/Exploration.md
@@ -160,6 +162,8 @@ nav:
160162
- devel/Testing/parserMessageTest.md
161163
- Write Documentation: "devel/howtodoc/index.md"
162164

165+
extra_css:
166+
- extra.css
163167

164168

165169
# nav_style: dark

0 commit comments

Comments
 (0)