Skip to content

Commit 559f4f3

Browse files
committed
address reviewer comments
1 parent 4e0508a commit 559f4f3

File tree

3 files changed

+41
-36
lines changed

3 files changed

+41
-36
lines changed

key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private ParsingFacade() {
5050
* <b>The use of this method is discouraged and should be avoided in all high level
5151
* scenarios.</b>
5252
*
53-
* @param ast a key ast object
53+
* @param ast a {@link KeyAst} object
5454
* @param <T> parse tree type
5555
* @return the {@link ParserRuleContext} inside the given ast object.
5656
*/

key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommandAst.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
///
2121
/// It is an abstraction to the commands of following structure:
2222
/// ```
23-
/// <commandName> key_1=value_1 ... key_m=value_m positionalArgs_1 ... positionalArgs_n {
23+
/// <commandName> key_1:value_1 ... key_m:value_m positionalArgs_1 ... positionalArgs_n {
2424
/// commands_0; ...; commands_k;
2525
/// }
2626
/// ```
@@ -49,13 +49,19 @@ public ScriptCommandAst(String commandName, Map<String, Object> namedArgs,
4949
this(commandName, namedArgs, positionalArgs, Collections.emptyList(), null);
5050
}
5151

52+
/// Renders this command a parsable string representation. The order of the arguments is as
53+
/// follows:
54+
/// key-value arguments, positional arguments and the additional script block.
55+
///
56+
/// @see de.uka.ilkd.key.nparser.ParsingFacade#parseScript(CharStream)
5257
public String asCommandLine() {
5358
return commandName + ' ' +
5459
namedArgs.entrySet().stream()
55-
.map(it -> it.getKey() + ": " + humanString(it.getValue()))
60+
.map(it -> it.getKey() + ": " + asReadableString(it.getValue()))
5661
.collect(joining(" "))
5762
+ ' '
58-
+ positionalArgs.stream().map(ScriptCommandAst::humanString).collect(joining(" "))
63+
+ positionalArgs.stream().map(ScriptCommandAst::asReadableString)
64+
.collect(joining(" "))
5965
+ (commands != null
6066
? " {"
6167
+ commands.stream().map(ScriptCommandAst::asCommandLine)
@@ -64,7 +70,7 @@ public String asCommandLine() {
6470
: ";");
6571
}
6672

67-
public static String humanString(Object value) {
73+
public static String asReadableString(Object value) {
6874
if (value instanceof ParserRuleContext ctx) {
6975
return ctx.getText();
7076
}

key.core/tacletProofs/seqPerm2/Taclet_schiffl_thm_1.proof

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -47,75 +47,74 @@
4747

4848
\proofScript {
4949
macro "split-prop";
50-
rule schiffl_lemma_2 formula: (seqPerm(f_s,f_t));
51-
instantiate hide var: x with: (f_x);
52-
instantiate hide var: y with: (f_y);
50+
rule schiffl_lemma_2 formula=(seqPerm(f_s,f_t));
51+
instantiate hide var=x with=(f_x);
52+
instantiate hide var=y with=(f_y);
5353
rule impLeft;
5454
tryclose branch;
5555
rule exLeft;
5656
macro "split-prop";
57-
rule seqPermDef occ: 1;
57+
rule seqPermDef occ=1;
5858
rule andRight;
5959
tryclose branch;
60-
instantiate hide var: s with: (r_0);
60+
instantiate hide var=s with=(r_0);
6161
rule andRight;
6262
tryclose branch;
6363
rule allRight;
6464
rule impRight;
65-
instantiate hide var: iv with: (iv_0);
65+
instantiate hide var=iv with=(iv_0);
6666
rule impLeft;
6767
tryclose branch;
6868
rule andLeft;
6969
rule seqNPermRange;
70-
instantiate hide var: iv with: (iv_0);
70+
instantiate hide var=iv with=(iv_0);
7171
rule impLeft;
7272
tryclose branch;
7373
rule andLeft;
7474
rule andLeft;
7575
rule seqNPermRange;
76-
instantiate hide var: iv with: (f_x);
76+
instantiate hide var=iv with=(f_x);
7777
rule impLeft;
7878
tryclose branch;
79-
// Wrong branch is selected here. Goal 1 instead of Goal 2
8079
rule andLeft;
8180
rule andLeft;
8281
rule seqNPermRange;
83-
instantiate hide var: iv with: (f_y);
82+
instantiate hide var=iv with=(f_y);
8483
rule impLeft;
8584
tryclose branch;
8685
rule andLeft;
8786
rule andLeft;
88-
rule getOfSeqDef occ: 0;
87+
rule getOfSeqDef occ=0;
8988
rule getOfSeqDef;
90-
rule ifthenelse_split occ: 0;
91-
rule andLeft occ: 0;
92-
rule sub_zero_2 occ: 0;
93-
rule ifthenelse_split occ: 2;
89+
rule ifthenelse_split occ=0;
90+
rule andLeft occ=0;
91+
rule sub_zero_2 occ=0;
92+
rule ifthenelse_split occ=2;
9493
rule andLeft;
95-
rule sub_zero_2 occ: 0;
96-
rule add_zero_right occ: 0;
97-
rule add_zero_right occ: 0;
98-
rule add_zero_right occ: 0;
99-
rule add_zero_right occ: 0;
100-
rule add_zero_right occ: 0;
101-
rule add_zero_right occ: 0;
102-
rule ifthenelse_split occ: 0;
103-
rule ifthenelse_split occ: 0;
94+
rule sub_zero_2 occ=0;
95+
rule add_zero_right occ=0;
96+
rule add_zero_right occ=0;
97+
rule add_zero_right occ=0;
98+
rule add_zero_right occ=0;
99+
rule add_zero_right occ=0;
100+
rule add_zero_right occ=0;
101+
rule ifthenelse_split occ=0;
102+
rule ifthenelse_split occ=0;
104103
tryclose branch;
105104
tryclose branch;
106-
rule ifthenelse_split occ: 0;
105+
rule ifthenelse_split occ=0;
107106
tryclose branch;
108-
rule ifthenelse_split occ: 0;
107+
rule ifthenelse_split occ=0;
109108
rule seqNPermInjective;
110-
instantiate hide var: iv with: (iv_0);
111-
instantiate hide var: jv with: (f_y);
109+
instantiate hide var=iv with=(iv_0);
110+
instantiate hide var=jv with=(f_y);
112111
rule impLeft;
113112
tryclose branch;
114113
tryclose branch;
115-
rule ifthenelse_split occ: 0;
114+
rule ifthenelse_split occ=0;
116115
rule seqNPermInjective;
117-
instantiate hide var: iv with: (iv_0);
118-
instantiate hide var: jv with: (f_x);
116+
instantiate hide var=iv with=(iv_0);
117+
instantiate hide var=jv with=(f_x);
119118
rule impLeft;
120119
tryclose branch;
121120
tryclose branch;

0 commit comments

Comments
 (0)