You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the definition of `cut_direct` below (part of `propRule.key`).
42
+
43
+
```
44
+
\schemaVariables {
45
+
\formula cutFormula;
46
+
}
47
+
48
+
\rules {
49
+
cut_direct {
50
+
\find(cutFormula)
51
+
\sameUpdateLevel
52
+
"CUT: #cutFormula TRUE" [main]:
53
+
\replacewith(true) \add(cutFormula ==>);
54
+
"CUT: #cutFormula FALSE":
55
+
\replacewith(false) \add( ==> cutFormula)
56
+
\heuristics(cut_direct)
57
+
};
58
+
}
59
+
```
60
+
61
+
First, we need to define the variables we want to use in the taclet.
62
+
This is the `\schemaVariables` block at the start of the `.key` file.
63
+
We only require a single `\formula` type schema variable called `cutFormula`.
64
+
65
+
Then, we define the actual taclets in this file by creating a `\rules` block.
66
+
For the purposes of this example, we limit ourselves to the cut_direct taclet.
67
+
`propRule.key` contains many more taclets.
68
+
The `\rules` block contains the taclet definitions, each of which begins with the name of the taclet
69
+
("cut_direct"), creating a new block defined by curly brackets and a semicolon at the end.
70
+
71
+
Since the `\find(...)` part of the taclet definition does not contain a `==>`, the `cut_direct` taclet finds (matches) a sub-term anywhere in a sequent formula.
72
+
The `\sameUpdateLevel` essentially ensures it doesn't match under an update application.
73
+
74
+
The taclet creates two new branches, which are defined directly afterwards.
75
+
The first branch is labeled "CUT: #cutFormula TRUE".
76
+
In this branch, the found sub-term is replaced with true (`\replacewith(true)`), and the found sub-term is added as a new sequent formula to the antecedent: `\add(cutFormula ==>)`.
77
+
78
+
A particular branch of the taclet can be tagged by enclosing the tag in brackets.
79
+
This tag must be written after the branch label.
80
+
The first branch in this example is tagged with "main".
81
+
This particular value causes the branch to be visually continued on the parent branch if [the linearized Proof Tree mode](../../user/ProofTreeLinearMode/) is active.
82
+
83
+
The second branch of the taclet is labeled "CUT: #cutFormula FALSE".
84
+
In this branch, the found sub-term is replaced with false (`\replacewith(false)`), and the found sub-term is added as a new sequent formula to the succedent: `\add( ==> cutFormula)`.
85
+
86
+
Finally, the taclet is added to the `cut_direct` heuristics group.
In the proof tree settings, you can enable the "Linearize Proof Tree" option.
4
+
5
+

6
+
7
+
## Effect when enabled
8
+
9
+
For symbolic execution steps, the "Normal Execution" branch will (visually) continue on the parent branch. See the screenshot below for a quick example.
10
+
The exceptional case branches (e.g. Null Reference, Index Out of Bounds) are therefore placed above the steps of the Normal Execution branch.
11
+
12
+

13
+
14
+
Additionally, the TRUE branch of cut_direct applications will visually continue on the parent branch.
15
+
This mechanism may be extended further by other taclets tagging their "main" created branch.
16
+
17
+

0 commit comments