diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 48c0a02ca41..2733ed5dc3c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/key.core.rifl/src/main/resources/de.uka.ilkd.key.util/rifl/blueprint_rifl.key b/key.core.rifl/src/main/resources/de.uka.ilkd.key.util/rifl/blueprint_rifl.key index 23e944e4752..5bfeec4f6c4 100644 --- a/key.core.rifl/src/main/resources/de.uka.ilkd.key.util/rifl/blueprint_rifl.key +++ b/key.core.rifl/src/main/resources/de.uka.ilkd.key.util/rifl/blueprint_rifl.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (autoModeTime "0") diff --git a/key.core/src/main/antlr4/KeYLexer.g4 b/key.core/src/main/antlr4/KeYLexer.g4 index 48c60c2c566..544c9371a42 100644 --- a/key.core/src/main/antlr4/KeYLexer.g4 +++ b/key.core/src/main/antlr4/KeYLexer.g4 @@ -391,7 +391,6 @@ RGUILLEMETS: '>''>' | '»' | '›'; IMPLICIT_IDENT: '<' '$'? (LETTER)+ '>' ('$lmtd')? -> type(IDENT); EQV: '<->' | '\u2194'; -PRIMES: ('\'')+; CHAR_LITERAL : '\'' ((' '..'&') | @@ -481,6 +480,7 @@ MODAILITYGENERIC: -> more, pushMode(modGeneric); */ //BACKSLASH: '\\'; +ERROR_UKNOWN_ESCAPE: '\\' IDENT; ERROR_CHAR: .; mode modDiamond; diff --git a/key.core/src/main/antlr4/KeYParser.g4 b/key.core/src/main/antlr4/KeYParser.g4 index 2d7704005fc..6c262484c93 100644 --- a/key.core/src/main/antlr4/KeYParser.g4 +++ b/key.core/src/main/antlr4/KeYParser.g4 @@ -41,7 +41,7 @@ problem | CHOOSECONTRACT (chooseContract=string_value SEMI)? | PROOFOBLIGATION (proofObligation=cvalue)? SEMI? ) - proofScript? + proofScriptEntry? ; @@ -852,10 +852,34 @@ preferences | c=cvalue ) // LBRACE, RBRACE included in cvalue#table ; -proofScript +proofScriptEntry : - PROOFSCRIPT ps = STRING_LITERAL + PROOFSCRIPT + ( STRING_LITERAL SEMI? + | LBRACE proofScript RBRACE + ) ; +proofScriptEOF: proofScript EOF; +proofScript: proofScriptCommand+; +proofScriptCommand: cmd=IDENT proofScriptParameters? + ( LBRACE sub=proofScript RBRACE SEMI? + | SEMI); + +proofScriptParameters: proofScriptParameter+; +proofScriptParameter : ((pname=proofScriptParameterName (COLON|EQUALS))? expr=proofScriptExpression); +proofScriptParameterName: AT? IDENT; // someone thought, that the let-command parameters should have a leading "@" +proofScriptExpression: + boolean_literal + | char_literal + | integer + | floatnum + | string_literal + | LPAREN (term | seq) RPAREN + | simple_ident + | abbreviation + | literals + ; + // PROOF proof: PROOF EOF; diff --git a/key.core/src/main/java/de/uka/ilkd/key/control/KeYEnvironment.java b/key.core/src/main/java/de/uka/ilkd/key/control/KeYEnvironment.java index f037dbe6482..3c69e319b48 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/control/KeYEnvironment.java +++ b/key.core/src/main/java/de/uka/ilkd/key/control/KeYEnvironment.java @@ -14,7 +14,7 @@ import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.java.abstraction.KeYJavaType; import de.uka.ilkd.key.logic.op.IObserverFunction; -import de.uka.ilkd.key.nparser.ProofScriptEntry; +import de.uka.ilkd.key.nparser.KeyAst.ProofScript; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.init.InitConfig; import de.uka.ilkd.key.proof.init.Profile; @@ -56,7 +56,7 @@ public class KeYEnvironment { /** * An optional field denoting a script contained in the proof file. */ - private final @Nullable ProofScriptEntry proofScript; + private final @Nullable ProofScript proofScript; /** * Indicates that this {@link KeYEnvironment} is disposed. @@ -83,9 +83,10 @@ public KeYEnvironment(U ui, InitConfig initConfig) { * * @param ui The {@link UserInterfaceControl} in which the {@link Proof} is loaded. * @param initConfig The loaded project. + * @param proofScript add an optional proof script */ public KeYEnvironment(U ui, InitConfig initConfig, Proof loadedProof, - @Nullable ProofScriptEntry proofScript, ReplayResult replayResult) { + @Nullable ProofScript proofScript, ReplayResult replayResult) { this.ui = ui; this.initConfig = initConfig; this.loadedProof = loadedProof; @@ -251,8 +252,10 @@ public static KeYEnvironment load(Profile profile, * @param poPropertiesToForce Some optional PO {@link Properties} to force. * @param ruleCompletionHandler An optional {@link RuleCompletionHandler}. * @param forceNewProfileOfNewProofs {@code} true - * {@code AbstractProblemLoader.profileOfNewProofs} will be used as {@link Profile} of - * new proofs, {@code false} {@link Profile} specified by problem file will be used for + * {@code AbstractProblemLoader.profileOfNewProofs} will + * be used as {@link Profile} of + * new proofs, {@code false} {@link Profile} + * specified by problem file will be used for * new proofs. * @return The {@link KeYEnvironment} which contains all references to the loaded location. * @throws ProblemLoaderException Occurred Exception @@ -290,7 +293,8 @@ public static KeYEnvironment load(Profile profile, List classPaths, File bootClassPath, List includes, Properties poPropertiesToForce, RuleCompletionHandler ruleCompletionHandler, Consumer callbackProofLoaded, - boolean forceNewProfileOfNewProofs) throws ProblemLoaderException { + boolean forceNewProfileOfNewProofs) + throws ProblemLoaderException { DefaultUserInterfaceControl ui = new DefaultUserInterfaceControl(ruleCompletionHandler); AbstractProblemLoader loader = ui.load(profile, location, classPaths, bootClassPath, includes, poPropertiesToForce, forceNewProfileOfNewProofs, callbackProofLoaded); @@ -319,13 +323,13 @@ public void dispose() { * Checks if this {@link KeYEnvironment} is disposed meaning that {@link #dispose()} was already * executed at least once. * - * @return {@code true} disposed, {@code false} not disposed and still functionable. + * @return {@code true} disposed, {@code false} not disposed and still functional. */ public boolean isDisposed() { return disposed; } - public @Nullable ProofScriptEntry getProofScript() { + public @Nullable ProofScript getProofScript() { return proofScript; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AllCommand.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AllCommand.java deleted file mode 100644 index 91e4421e0fb..00000000000 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AllCommand.java +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of KeY - https://key-project.org - * KeY is licensed under the GNU General Public License Version 2 - * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; - -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import de.uka.ilkd.key.proof.Goal; -import de.uka.ilkd.key.proof.Node; - -public class AllCommand extends AbstractCommand> { - - public AllCommand() { - super(null); - } - - @Override - public Map evaluateArguments(EngineState state, Map arguments) { - return arguments; - } - - @Override - public String getName() { - return "onAll"; - } - - @Override - protected void execute(Map args) throws ScriptException, InterruptedException { - String wrappedCmdname = args.get("#2"); - if (wrappedCmdname == null) { - throw new ScriptException("Missing command to apply onAll to"); - } - - ProofScriptCommand command = ProofScriptEngine.getCommand(wrappedCmdname); - if (command == null) { - throw new ScriptException("Unknown command: " + wrappedCmdname); - } - - HashMap newArgs = rearrangeArgs(args); - - try { - executeWrappedCommand(command, newArgs); - } catch (Exception e) { - throw new ScriptException(e); - } - - } - - private HashMap rearrangeArgs(Map args) { - HashMap newArgs = new HashMap<>(); - for (Entry en : args.entrySet()) { - if (en.getKey().matches("#[0-9]+")) { - int no = Integer.parseInt(en.getKey().substring(1)); - if (no != 1) { - newArgs.put("#" + (no - 1), en.getValue()); - } - } else { - newArgs.put(en.getKey(), en.getValue()); - } - } - return newArgs; - } - - private void executeWrappedCommand(ProofScriptCommand command, - HashMap newArgs) throws Exception { - A params = command.evaluateArguments(state, newArgs); - - // Node selectedNode = state.getSelectedNode(); - for (Goal g : proof.openGoals()) { - // if (isBelow(g, selectedNode)) { - state.setGoal(g); - command.execute(uiControl, params, state); - // } - } - // state.setGoal(selectedNode); - } - - private boolean isBelow(Goal g, Node above) { - if (above == null) { - return true; - } - - Node node = g.node(); - while (node != null) { - if (node == above) { - return true; - } - node = node.parent(); - } - - return false; - } -} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LetCommand.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LetCommand.java deleted file mode 100644 index c4f1ab0ec19..00000000000 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LetCommand.java +++ /dev/null @@ -1,60 +0,0 @@ -/* This file is part of KeY - https://key-project.org - * KeY is licensed under the GNU General Public License Version 2 - * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; - -import java.util.Map; - -import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.pp.AbbrevMap; - -public class LetCommand extends AbstractCommand> { - - public LetCommand() { - super(null); - } - - @Override - public Map evaluateArguments(EngineState state, Map arguments) { - return arguments; - } - - @Override - public void execute(AbstractUserInterfaceControl uiControl, Map args, - EngineState stateMap) throws ScriptException, InterruptedException { - - AbbrevMap abbrMap = stateMap.getAbbreviations(); - for (Map.Entry entry : args.entrySet()) { - String key = entry.getKey(); - if ("#1".equals(key)) { - continue; - } - if ("#literal".equals(key)) { - continue; - } - if (!key.startsWith("@")) { - throw new ScriptException("Unexpected parameter to let, only @var allowed: " + key); - } - - // get rid of @ - key = key.substring(1); - - if (abbrMap.containsAbbreviation(key)) { - // XXX desired or not? - throw new ScriptException(key + " is already fixed in this script"); - } - try { - abbrMap.put(stateMap.toTerm(entry.getValue(), null), key, true); - } catch (Exception e) { - throw new ScriptException(e); - } - } - - } - - @Override - public String getName() { - return "let"; - } - -} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/DescriptionFacade.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/DescriptionFacade.java deleted file mode 100644 index c1f6c7fda90..00000000000 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/DescriptionFacade.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This file is part of KeY - https://key-project.org - * KeY is licensed under the GNU General Public License Version 2 - * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; - -import java.io.IOException; -import java.util.Properties; - -import de.uka.ilkd.key.macros.scripts.ProofScriptCommand; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * This facade is used to load documentation for {@link ProofScriptCommand} and - * {@link ProofScriptArgument}. - *

- * It uses a {@code COMMANDS_DESCRIPTION} property file. - * - * @author Alexander Weigl - * @version 1 (18.08.17) - */ -public final class DescriptionFacade { - /** - * The filename of the XML properties containing the documentation of proof script commands. - */ - private static final String COMMANDS_DESCRIPTION = "commands_description.xml"; - private static final Logger LOGGER = LoggerFactory.getLogger(DescriptionFacade.class); - - /** - * Lazy-loaded properties - * - * @see #getProperties - */ - private static Properties properties = null; - - private DescriptionFacade() { - } - - /** - * Lazy loading of the properties. - * - * @return a properties - */ - public static Properties getProperties() { - try { - if (properties == null) { - properties = new Properties(); - properties.loadFromXML( - DescriptionFacade.class.getResourceAsStream(COMMANDS_DESCRIPTION)); - } - } catch (IOException e) { - LOGGER.warn("Failed to load properties", e); - } - return properties; - } - - /** - * Looks up the documentation for the given command in the properties file. If no documentation - * is available an empty string is returned. - * - * @param cmd non-null proof script command - * @return a non-null string - * @see ProofScriptCommand#getDocumentation() - */ - public static String getDocumentation(ProofScriptCommand cmd) { - return getString(cmd.getName()); - } - - /** - * Looks up the documentation for the given proof script argument. If no documentation is - * available an empty string is returned. - * - * @param arg non-null proof script argument - * @return a string or null, if {@code arg} is null or {@code arg.getCommand} returns null - * @see ProofScriptArgument#getDocumentation() - */ - public static String getDocumentation(ProofScriptArgument arg) { - if (arg == null || arg.getCommand() == null) { - return null; - } - String key = arg.getCommand().getName() + "." + arg.getName(); - return getString(key); - } - - /** - * Helper function for look-ups in the property file. - * - * @param key look up key - * @return a non-null string - */ - private static String getString(String key) { - String property = getProperties().getProperty(key); - if (null == property) { - LOGGER.warn("No documentation entry found for {} in {}", key, COMMANDS_DESCRIPTION); - return ""; - } - return property; - } -} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/package-info.java b/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/package-info.java deleted file mode 100644 index 232a2bf0b62..00000000000 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/package-info.java +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Proof script commands are a simple proof automation facility. - * - * @see de.uka.ilkd.key.macros.scripts.ProofScriptCommand - * @see de.uka.ilkd.key.macros.scripts.ProofScriptEngine - * @see de.uka.ilkd.key.macros.scripts.EngineState - * - * - * @author Mattias Ulbrich - * @author Alexander Weigl - * @version 1 (29.03.17) - */ -package de.uka.ilkd.key.macros.scripts; diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java index 095e3ca921a..0c5e7f170b7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java @@ -4,10 +4,10 @@ package de.uka.ilkd.key.nparser; import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.List; -import de.uka.ilkd.key.java.Position; import de.uka.ilkd.key.nparser.builder.BuilderHelpers; import de.uka.ilkd.key.nparser.builder.ChoiceFinder; import de.uka.ilkd.key.nparser.builder.FindProblemInformation; @@ -21,6 +21,7 @@ import org.key_project.util.java.StringUtil; import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.CharStreams; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.misc.Interval; @@ -70,7 +71,8 @@ public static class File extends KeyAst { super(ctx); } - public @Nullable ProofSettings findProofSettings() { + @Nullable + public ProofSettings findProofSettings() { ProofSettings settings = new ProofSettings(ProofSettings.DEFAULT_SETTINGS); if (ctx.preferences() != null && ctx.preferences().s != null) { @@ -92,17 +94,25 @@ public static class File extends KeyAst { * or including * other files. * - * @param url location pointing to the source of the AST * @return a {@link ProofScriptEntry} if {@code \proofscript} is present */ - public @Nullable ProofScriptEntry findProofScript(URI url) { - if (ctx.problem() != null && ctx.problem().proofScript() != null) { - KeYParser.ProofScriptContext pctx = ctx.problem().proofScript(); - Location location = new Location(url, - Position.newOneBased(pctx.ps.getLine(), pctx.ps.getCharPositionInLine())); - - String text = pctx.ps.getText(); - return new ProofScriptEntry(StringUtil.trim(text, '"'), location); + public @Nullable ProofScript findProofScript() { + if (ctx.problem() != null && ctx.problem().proofScriptEntry() != null) { + KeYParser.ProofScriptEntryContext pctx = ctx.problem().proofScriptEntry(); + + KeYParser.ProofScriptContext ps; + if (pctx.STRING_LITERAL() != null) { + var ctx = pctx.STRING_LITERAL().getSymbol(); + String text = pctx.STRING_LITERAL().getText(); + + // +1 for the removal of the quote. + text = StringUtil.move(StringUtil.trim(text, '"'), ctx.getLine(), + ctx.getCharPositionInLine() + 1); + return ParsingFacade.parseScript( + CharStreams.fromString(text, ctx.getTokenSource().getSourceName())); + } else { + return new KeyAst.ProofScript(pctx.proofScript()); + } } return null; } @@ -212,4 +222,27 @@ public Taclet(KeYParser.TacletContext taclet) { super(taclet); } } + + /** + * This struct encapsulate the information of a proof script found in key files. + * + * @author Alexander Weigl + * @version 1 (23.04.24) + */ + public static class ProofScript extends KeyAst { + ProofScript(KeYParser.@NonNull ProofScriptContext ctx) { + super(ctx); + } + + public URI getUrl() { + final var sourceName = ctx.start.getTokenSource().getSourceName(); + try { + if (sourceName.startsWith("file:") || sourceName.startsWith("http:") + || sourceName.startsWith("jar:")) + return new URI(sourceName); + } catch (URISyntaxException ignored) { + } + return new java.io.File(sourceName).toURI(); + } + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyIO.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyIO.java index 2dd0ad9f70d..5deec389524 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyIO.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/KeyIO.java @@ -88,6 +88,10 @@ public KeyIO() { */ public @NonNull Term parseExpression(@NonNull CharStream stream) { KeyAst.Term ctx = ParsingFacade.parseExpression(stream); + return interpretExpression(ctx); + } + + private Term interpretExpression(KeyAst.Term ctx) { ExpressionBuilder visitor = new ExpressionBuilder(services, nss); visitor.setAbbrevMap(abbrevMap); if (schemaNamespace != null) { @@ -118,6 +122,10 @@ public KeyIO() { return seq; } + public Sequent parseSequent(String sequent) { + return parseSequent(CharStreams.fromString(sequent)); + } + public Services getServices() { return services; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java index 9e458faddf0..e06db61d96e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ParsingFacade.java @@ -17,6 +17,7 @@ import de.uka.ilkd.key.nparser.builder.ChoiceFinder; import de.uka.ilkd.key.proof.io.RuleSource; import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.speclang.PositionedString; import de.uka.ilkd.key.util.parsing.BuildingException; import org.antlr.v4.runtime.*; @@ -25,7 +26,6 @@ import org.antlr.v4.runtime.tree.TerminalNode; import org.jspecify.annotations.NonNull; import org.jspecify.annotations.NullMarked; -import org.jspecify.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -92,13 +92,18 @@ public static List parseFiles(URL url) throws IOException { return ci; } - private static KeYParser createParser(CharStream stream) { - KeYParser p = new KeYParser(new CommonTokenStream(createLexer(stream))); + private static KeYParser createParser(TokenSource lexer) { + KeYParser p = new KeYParser(new CommonTokenStream(lexer)); p.removeErrorListeners(); p.addErrorListener(p.getErrorReporter()); return p; } + + private static KeYParser createParser(CharStream stream) { + return createParser(createLexer(stream)); + } + public static KeYLexer createLexer(Path file) throws IOException { return createLexer(CharStreams.fromPath(file)); } @@ -107,6 +112,17 @@ public static KeYLexer createLexer(CharStream stream) { return new KeYLexer(stream); } + public static @NonNull KeYLexer createLexer(@NonNull PositionedString ps) { + var position = ps.getLocation().getPosition(); + var uri = ps.getLocation().fileUri().toString(); + + CharStream result = CharStreams.fromString(ps.text, uri); + var lexer = createLexer(result); + lexer.getInterpreter().setCharPositionInLine(position.column()); + lexer.getInterpreter().setLine(position.line()); + return lexer; + } + public static KeyAst.File parseFile(URL url) throws IOException { long start = System.currentTimeMillis(); try (BufferedInputStream is = new BufferedInputStream(url.openStream()); @@ -166,6 +182,28 @@ public static KeyAst.Seq parseSequent(CharStream stream) { return seq; } + public static KeyAst.ProofScript parseScript(PositionedString ps) { + var rp = createParser(createLexer(ps)); + KeyAst.ProofScript ast = new KeyAst.ProofScript(rp.proofScript()); + rp.getErrorReporter().throwException(ps.text.split("\n")); + return ast; + } + + public static KeyAst.ProofScript parseScript(Path file) throws IOException { + return parseScript(CharStreams.fromPath(file)); + } + + public static KeyAst.ProofScript parseScript(CharStream stream) { + var rp = createParser(stream); + final var ctx = rp.proofScriptEOF().proofScript(); + rp.getErrorReporter().throwException(); + return new KeyAst.ProofScript(ctx); + } + + public static KeyAst.ProofScript parseScript(String text) { + return parseScript(CharStreams.fromString(text)); + } + /** * Translate a given context of a {@code string_value} grammar rule into a the literal value. In * particular it truncates, and substitutes quote escapes {@code \"}. @@ -192,7 +230,8 @@ public static KeYParser.Id_declarationContext parseIdDeclaration(CharStream stre return p.id_declaration(); } - public static @Nullable String getValueDocumentation(@Nullable TerminalNode docComment) { + public static @org.jspecify.annotations.Nullable String getValueDocumentation( + @org.jspecify.annotations.Nullable TerminalNode docComment) { if (docComment == null) { return null; } @@ -212,6 +251,7 @@ public static KeyAst.Taclet parseTaclet(CharStream source) { } // region configuration + /** * Parses the configuration determined by the given {@code file}. * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. @@ -227,8 +267,8 @@ public static KeyAst.ConfigurationFile parseConfigurationFile(Path file) throws /** * @param file non-null file to read as configuration - * @see #parseConfigurationFile(Path) * @throws IOException if the file is not found or not readable. + * @see #parseConfigurationFile(Path) */ public static KeyAst.ConfigurationFile parseConfigurationFile(File file) throws IOException { return parseConfigurationFile(file.toPath()); @@ -262,16 +302,16 @@ public static Configuration readConfigurationFile(CharStream input) { } /** - * @see #readConfigurationFile(CharStream) * @throws IOException if the file is not found or not readable. + * @see #readConfigurationFile(CharStream) */ public static Configuration readConfigurationFile(Path file) throws IOException { return readConfigurationFile(CharStreams.fromPath(file)); } /** - * @see #readConfigurationFile(CharStream) * @throws IOException if the file is not found or not readable. + * @see #readConfigurationFile(CharStream) */ public static Configuration readConfigurationFile(File file) throws IOException { return readConfigurationFile(file.toPath()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ExpressionBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ExpressionBuilder.java index d27fc75d9db..22e71c31913 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ExpressionBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/ExpressionBuilder.java @@ -1835,6 +1835,11 @@ private JavaQuery splitJava(List parts) { return (new JavaQuery(packageName, className, attributeName, kjt)); } + @Override + public Object visitProofScript(KeYParser.ProofScriptContext ctx) { + return null;// Do not traverse into proof scripts. + } + public void setAbbrevMap(AbbrevMap abbrevMap) { this.abbrevMap = abbrevMap; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/KeYUserProblemFile.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/KeYUserProblemFile.java index 2cd7f1a89da..50f7ea2be26 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/KeYUserProblemFile.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/KeYUserProblemFile.java @@ -5,7 +5,6 @@ import java.io.File; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; import de.uka.ilkd.key.java.abstraction.KeYJavaType; @@ -27,7 +26,6 @@ import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.Token; -import org.jspecify.annotations.NonNull; import org.jspecify.annotations.Nullable; @@ -185,11 +183,9 @@ public boolean hasProofScript() { * Returns the {@link ProofScriptEntry} in this resource * * @return {@link ProofScriptEntry} if present otherwise null - * @see KeyAst.File#findProofScript(URI) */ - public @Nullable ProofScriptEntry readProofScript() { - URI url = getInitialFile().toURI(); - return getParseContext().findProofScript(url); + public KeyAst.@Nullable ProofScript readProofScript() { + return getParseContext().findProofScript(); } /** @@ -249,7 +245,6 @@ public Profile getProfile() { * is defined by the file. */ private Profile readProfileFromFile() { - @NonNull ProblemInformation pi = getProblemInformation(); String profileName = pi.getProfile(); if (profileName != null && !profileName.isEmpty()) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java index a7d6c940c57..b2c428d800b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/AbstractProblemLoader.java @@ -15,6 +15,7 @@ import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.nparser.KeYLexer; +import de.uka.ilkd.key.nparser.KeyAst.ProofScript; import de.uka.ilkd.key.nparser.ProofScriptEntry; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Proof; @@ -661,7 +662,7 @@ public boolean hasProofScript() { /** * Returns a {@link ProofScriptEntry} if {@code \proofscript} is given with the problem. */ - public @Nullable ProofScriptEntry getProofScript() { + public @Nullable ProofScript getProofScript() { if (!hasProofScript()) { return null; } @@ -670,7 +671,6 @@ public boolean hasProofScript() { } private ReplayResult replayProof(Proof proof) { - LOGGER.info("Replaying proof {}", proof.name()); String status = ""; List errors = new LinkedList<>(); Node lastTouchedNode = proof.root(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java index a7277b80cf0..4cfe71eb6f1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/KeYFile.java @@ -229,7 +229,6 @@ public Includes readIncludes() throws ProofInputException { @Override public File readBootClassPath() { - @NonNull ProblemInformation pi = getProblemInformation(); String bootClassPath = pi.getBootClassPath(); if (bootClassPath == null) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AbstractCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AbstractCommand.java similarity index 56% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AbstractCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/AbstractCommand.java index e81c4416873..6cbe3c3a071 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AbstractCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AbstractCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.ArrayList; import java.util.List; @@ -9,29 +9,36 @@ import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.java.Services; -import de.uka.ilkd.key.macros.scripts.meta.ArgumentsLifter; -import de.uka.ilkd.key.macros.scripts.meta.DescriptionFacade; -import de.uka.ilkd.key.macros.scripts.meta.ProofScriptArgument; import de.uka.ilkd.key.proof.Proof; +import de.uka.ilkd.key.scripts.meta.ArgumentsLifter; +import de.uka.ilkd.key.scripts.meta.ProofScriptArgument; -/** - *

- * Inheritance: - *

- * - * @param - * @author Alexander Weigl - */ +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; + +/// A base class for {@link ProofScriptCommand}s. +/// This class brings automatically analyzes and meta-data of the given parameter class using +/// reflection and +/// decorators. +/// +/// To implement your own command, you need to define two classes a POJO carrying the parameters, +/// and child class of +/// {@link AbstractCommand}. You need to override [AbstractCommand#execute(Object)] to implement the +/// command logic. +/// +/// @param the expected parameter class +/// @author Alexander Weigl +@NullMarked public abstract class AbstractCommand implements ProofScriptCommand { - protected Proof proof; - protected Services service; - protected EngineState state; - protected AbstractUserInterfaceControl uiControl; + protected @Nullable Proof proof; + protected @Nullable Services service; + protected @Nullable EngineState state; + protected @Nullable AbstractUserInterfaceControl uiControl; /** * Documentation of this command. */ - protected String documentation = null; + protected @Nullable String documentation = null; /** * ... @@ -51,7 +58,7 @@ public List> getArguments() { @Override - public T evaluateArguments(EngineState state, Map arguments) throws Exception { + public T evaluateArguments(EngineState state, Map arguments) throws Exception { if (parameterClazz != null) { T obj = parameterClazz.getDeclaredConstructor().newInstance(); return state.getValueInjector().inject(this, obj, arguments); @@ -77,23 +84,16 @@ public void execute(AbstractUserInterfaceControl uiControl, T args, EngineState } } - /** - * @param args - * @throws ScriptException - * @throws InterruptedException - */ + /// Executes the command logic with the given parameters `args`. + /// + /// @param args an instance of the parameters + /// @throws ScriptException if something happened during execution + /// @throws InterruptedException if thread was interrupted during execution protected void execute(T args) throws ScriptException, InterruptedException { - } - /** - * {@inheritDoc} - */ @Override public String getDocumentation() { - if (documentation == null) { - documentation = DescriptionFacade.getDocumentation(this); - } - return documentation; + return ""; } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ActivateCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ActivateCommand.java similarity index 89% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ActivateCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ActivateCommand.java index d8df0e3d1d2..10b92cea564 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ActivateCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ActivateCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.proof.Goal; @@ -19,6 +19,11 @@ public String getName() { return "activate"; } + @Override + public String getDocumentation() { + return ""; + } + @Override public void execute(AbstractUserInterfaceControl uiControl, Void args, EngineState state) throws ScriptException, InterruptedException { diff --git a/key.core/src/main/java/de/uka/ilkd/key/scripts/AllCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AllCommand.java new file mode 100644 index 00000000000..bfc498df9e3 --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AllCommand.java @@ -0,0 +1,61 @@ +/* This file is part of KeY - https://key-project.org + * KeY is licensed under the GNU General Public License Version 2 + * SPDX-License-Identifier: GPL-2.0-only */ +package de.uka.ilkd.key.scripts; + +import java.util.List; +import java.util.Map; + +import de.uka.ilkd.key.control.AbstractUserInterfaceControl; +import de.uka.ilkd.key.nparser.KeYParser; +import de.uka.ilkd.key.proof.Goal; +import de.uka.ilkd.key.scripts.meta.ProofScriptArgument; + +public class AllCommand implements ProofScriptCommand> { + private String documentation; + + @Override + public List>> getArguments() { + return List.of(); + } + + @Override + public Map evaluateArguments(EngineState state, Map arguments) { + return arguments; + } + + @Override + public void execute(AbstractUserInterfaceControl uiControl, Map args, + EngineState stateMap) throws ScriptException, InterruptedException { + var block = (KeYParser.ProofScriptContext) args.get(ProofScriptEngine.KEY_SUB_SCRIPT); + + if (block == null) { + throw new ScriptException("Missing command to apply onAll to"); + } + + var proof = stateMap.getProof(); + // Node selectedNode = state.getSelectedNode(); + for (Goal g : proof.openGoals()) { + // if (isBelow(g, selectedNode)) { + stateMap.setGoal(g); + stateMap.getEngine().execute(uiControl, block.proofScriptCommand()); + // } + } + // state.setGoal(selectedNode); + } + + + @Override + public String getName() { + return "onAll"; + } + + /** + * {@inheritDoc} + */ + @Override + public String getDocumentation() { + return """ + Applies the given command to all the open goals."""; + } +} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssertCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AssertCommand.java similarity index 85% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssertCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/AssertCommand.java index 399e77cf310..d7c6a3ae432 100755 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssertCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AssertCommand.java @@ -1,11 +1,11 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; -import de.uka.ilkd.key.macros.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Option; /** * Halts the script if some condition is not met. @@ -22,9 +22,10 @@ public AssertCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) - throws Exception { - return state.getValueInjector().inject(this, new Parameters(), arguments); + public Parameters evaluateArguments(EngineState state, + Map arguments) throws Exception { + return state.getValueInjector().inject(this, new Parameters(), + arguments); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssumeCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AssumeCommand.java similarity index 80% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssumeCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/AssumeCommand.java index 56b6561ae68..4f98caa8dba 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AssumeCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AssumeCommand.java @@ -1,16 +1,16 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; @@ -25,7 +25,7 @@ public AssumeCommand() { } @Override - public FormulaParameter evaluateArguments(EngineState state, Map arguments) + public FormulaParameter evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new FormulaParameter(), arguments); } @@ -35,6 +35,15 @@ public String getName() { return "assume"; } + @Override + public String getDocumentation() { + return """ + The assume command is an unsound taclet rule and takes one argument: + + The command adds the formula passed as argument to the antecedent + a formula #2 to which the command is applied"""; + } + @Override public void execute(FormulaParameter parameter) throws ScriptException, InterruptedException { Taclet cut = diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AutoCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AutoCommand.java similarity index 89% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AutoCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/AutoCommand.java index 265f1020ae3..fa364dbe974 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AutoCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AutoCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import java.util.Optional; @@ -10,12 +10,11 @@ import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.logic.PosInOccurrence; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.ValueInjector; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.init.Profile; import de.uka.ilkd.key.prover.ProverCore; import de.uka.ilkd.key.prover.impl.ApplyStrategy; +import de.uka.ilkd.key.scripts.meta.*; import de.uka.ilkd.key.strategy.AutomatedRuleApplicationManager; import de.uka.ilkd.key.strategy.FocussedBreakpointRuleApplicationManager; @@ -40,10 +39,16 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) - throws Exception { + public String getDocumentation() { + return "The AutoCommand invokes the automatic strategy \"Auto\""; + } + + @Override + public Parameters evaluateArguments(EngineState state, Map arguments) + throws ConversionException, ArgumentRequiredException, InjectionReflectionException, + NoSpecifiedConverterException { Parameters args = new Parameters(); - ValueInjector.getInstance().inject(this, args, arguments); + state.getValueInjector().inject(this, args, arguments); return args; } @@ -104,9 +109,9 @@ public void execute(AbstractUserInterfaceControl uiControl, Parameters arguments * * @param maybeMatchesRegEx The RegEx which should match on the sequent formula to focus. * @param breakpointArg An optional breakpoint argument. - * @param goal The {@link Goal} to apply the strategy on, needed for the rule application + * @param goal The {@link Goal} to apply the strategy on, needed for the rule* application * manager. - * @param proverCore The {@link ProverCore}, needed for resetting the strategy afterward. + * @param proverCore The {@link ProverCore}, needed for resetting the strategy* afterward. * @param services The {@link Services} object. * @throws ScriptException */ @@ -137,11 +142,15 @@ public static class Parameters { @Option(value = "steps", required = false) public int maxSteps = -1; - /** Run on formula matching the given regex */ + /** + * Run on formula matching the given regex + */ @Option(value = "matches", required = false) public String matches = null; - /** Run on formula matching the given regex */ + /** + * Run on formula matching the given regex + */ @Option(value = "breakpoint", required = false) public String breakpoint = null; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AxiomCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/AxiomCommand.java similarity index 93% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AxiomCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/AxiomCommand.java index 1b0a1867e26..0b8f1745647 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/AxiomCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/AxiomCommand.java @@ -1,16 +1,16 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; @@ -27,7 +27,7 @@ public AxiomCommand() { } @Override - public FormulaParameter evaluateArguments(EngineState state, Map arguments) + public FormulaParameter evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new FormulaParameter(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/CutCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/CutCommand.java similarity index 85% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/CutCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/CutCommand.java index 96fa8a12fc3..c3989f160d5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/CutCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/CutCommand.java @@ -1,17 +1,17 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; @@ -32,13 +32,21 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public String getDocumentation() { + return """ + CutCommand has as script command name "cut" + + As parameters: + * a formula with the id "#2"""; + } + + @Override + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } /** - * * @param uiControl * @param args * @param state diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EchoCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/EchoCommand.java similarity index 91% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EchoCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/EchoCommand.java index 26943a05988..235835f7fb3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EchoCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/EchoCommand.java @@ -1,12 +1,12 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.macros.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Option; /** * A simple "echo" command for giving feedback to human observers during lengthy executions. @@ -22,7 +22,7 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EngineState.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/EngineState.java similarity index 63% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EngineState.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/EngineState.java index fc259f1cf23..7a08a13ea2f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/EngineState.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/EngineState.java @@ -1,9 +1,10 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; -import java.io.File; +import java.nio.file.Path; +import java.nio.file.Paths; import java.util.Deque; import java.util.LinkedList; import java.util.Objects; @@ -11,38 +12,54 @@ import java.util.function.Consumer; import de.uka.ilkd.key.java.Services; +import de.uka.ilkd.key.logic.NamespaceSet; +import de.uka.ilkd.key.logic.Semisequent; import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Term; -import de.uka.ilkd.key.macros.scripts.meta.ValueInjector; +import de.uka.ilkd.key.nparser.KeYParser.ProofScriptExpressionContext; import de.uka.ilkd.key.nparser.KeyIO; import de.uka.ilkd.key.parser.ParserException; import de.uka.ilkd.key.pp.AbbrevMap; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Proof; +import de.uka.ilkd.key.scripts.meta.ConversionException; +import de.uka.ilkd.key.scripts.meta.Converter; +import de.uka.ilkd.key.scripts.meta.NoSpecifiedConverterException; +import de.uka.ilkd.key.scripts.meta.ValueInjector; import de.uka.ilkd.key.settings.ProofSettings; import org.key_project.logic.sort.Sort; import org.key_project.util.collection.ImmutableList; +import org.key_project.util.java.StringUtil; import org.antlr.v4.runtime.CharStreams; import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Alexander Weigl * @version 1 (28.03.17) */ +@NullMarked public class EngineState { + public static final Logger LOGGER = LoggerFactory.getLogger(EngineState.class); + private final Proof proof; + private final ProofScriptEngine engine; + private final AbbrevMap abbrevMap = new AbbrevMap(); - /** - * nullable - */ - private Consumer observer; - private File baseFileName = new File("."); - private final ValueInjector valueInjector = ValueInjector.createDefault(); - private Goal goal; - private Node lastSetGoalNode; + private final ValueInjector valueInjector = createDefaultValueInjector(); + private final ExprEvaluator exprEvaluator = new ExprEvaluator(this); + + private @Nullable Consumer observer; + private Path baseFileName = Paths.get("."); + + private @Nullable Goal goal; + private @Nullable Node lastSetGoalNode; /** * If set to true, outputs all commands to observers and console. Otherwise, only shows explicit @@ -56,11 +73,64 @@ public class EngineState { */ private boolean failOnClosedOn = true; - public EngineState(Proof proof) { + public EngineState(Proof proof, ProofScriptEngine engine) { this.proof = proof; - valueInjector.addConverter(Term.class, (String s) -> toTerm(s, null)); - valueInjector.addConverter(Sequent.class, this::toSequent); - valueInjector.addConverter(Sort.class, this::toSort); + this.engine = engine; + } + + private ValueInjector createDefaultValueInjector() { + var v = ValueInjector.createDefault(); + v.addConverter(Term.class, String.class, (str) -> this.toTerm(str, null)); + v.addConverter(Sequent.class, String.class, this::toSequent); + v.addConverter(Sort.class, String.class, this::toSort); + + addContextTranslator(v, String.class); + addContextTranslator(v, Term.class); + addContextTranslator(v, Integer.class); + addContextTranslator(v, Byte.class); + addContextTranslator(v, Long.class); + addContextTranslator(v, Boolean.class); + addContextTranslator(v, Character.class); + addContextTranslator(v, Sequent.class); + addContextTranslator(v, Integer.TYPE); + addContextTranslator(v, Byte.TYPE); + addContextTranslator(v, Long.TYPE); + addContextTranslator(v, Boolean.TYPE); + addContextTranslator(v, Character.TYPE); + addContextTranslator(v, Term.class); + addContextTranslator(v, Sequent.class); + addContextTranslator(v, Semisequent.class); + return v; + } + + private void addContextTranslator(ValueInjector v, Class aClass) { + Converter converter = + (ProofScriptExpressionContext a) -> convertToString(v, aClass, a); + v.addConverter(aClass, ProofScriptExpressionContext.class, converter); + } + + @SuppressWarnings("unchecked") + private R convertToString(ValueInjector inj, Class aClass, + ProofScriptExpressionContext ctx) + throws Exception { + try { + if (aClass == String.class && ctx.string_literal() != null) { + return inj.getConverter(aClass, String.class) + .convert(StringUtil.trim(ctx.string_literal().getText(), '"')); + } + if (aClass == String.class) { + return inj.getConverter(aClass, String.class).convert(ctx.getText()); + } + + T value = (T) ctx.accept(exprEvaluator); + Class tClass = (Class) value.getClass(); + if (aClass.isAssignableFrom(value.getClass())) { + return aClass.cast(value); + } + return inj.getConverter(aClass, tClass).convert(value); + } catch (ConversionException | NoSpecifiedConverterException e) { + return inj.getConverter(aClass, String.class).convert(ctx.getText()); + } } protected static Goal getGoal(ImmutableList openGoals, Node node) { @@ -85,10 +155,11 @@ public Proof getProof() { * Returns the first open goal, which has to be automatic iff checkAutomatic is true. * * @param checkAutomatic Set to true if the returned {@link Goal} should be automatic. - * @return the first open goal, which has to be automatic iff checkAutomatic is true. - * + * @return the first open goal, which has to be automatic iff checkAutomatic + * is true. * @throws ProofAlreadyClosedException If the proof is already closed when calling this method. - * @throws ScriptException If there is no such {@link Goal}, or something else goes wrong. + * @throws ScriptException If there is no such {@link Goal}, or something else goes + * wrong. */ @SuppressWarnings("unused") public @NonNull Goal getFirstOpenGoal(boolean checkAutomatic) throws ScriptException { @@ -124,7 +195,6 @@ public Proof getProof() { /** * @return The first open and automatic {@link Goal}. - * * @throws ScriptException If there is no such {@link Goal}. */ public Goal getFirstOpenAutomaticGoal() throws ScriptException { @@ -190,7 +260,7 @@ private Goal findGoalFromRoot(final Node rootNode, boolean checkAutomatic) { } - public Term toTerm(String string, Sort sort) throws ParserException, ScriptException { + public Term toTerm(String string, @Nullable Sort sort) throws ParserException, ScriptException { final var io = getKeyIO(); var term = io.parseExpression(string); if (sort == null || term.sort().equals(sort)) @@ -212,7 +282,7 @@ public Sort toSort(String sortName) throws ScriptException { : getFirstOpenAutomaticGoal().getLocalNamespaces()).sorts().lookup(sortName); } - public Sequent toSequent(String sequent) throws ScriptException { + public Sequent toSequent(String sequent) throws ParserException, ScriptException { return getKeyIO().parseSequent(CharStreams.fromString(sequent)); } @@ -239,11 +309,11 @@ public void setObserver(Consumer observer) { this.observer = observer; } - public File getBaseFileName() { + public Path getBaseFileName() { return baseFileName; } - public void setBaseFileName(File baseFileName) { + public void setBaseFileName(Path baseFileName) { this.baseFileName = baseFileName; } @@ -274,4 +344,20 @@ public boolean isFailOnClosedOn() { public void setFailOnClosedOn(boolean failOnClosedOn) { this.failOnClosedOn = failOnClosedOn; } + + public ProofScriptEngine getEngine() { + return engine; + } + + public NamespaceSet getCurrentNamespaces() { + try { + return getFirstOpenAutomaticGoal().getLocalNamespaces(); + } catch (ScriptException e) { + return proof.getNamespaces(); + } + } + + public ExprEvaluator getEvaluator() { + return exprEvaluator; + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ExitCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ExitCommand.java similarity index 81% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ExitCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ExitCommand.java index 071cb6dbb30..966101b0b2a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ExitCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ExitCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; @@ -18,4 +18,9 @@ public void execute(AbstractUserInterfaceControl uiControl, Void args, EngineSta public String getName() { return "exit"; } + + @Override + public String getDocumentation() { + return "Kills the script execution."; + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/scripts/ExprEvaluator.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ExprEvaluator.java new file mode 100644 index 00000000000..ac6c67fa90a --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ExprEvaluator.java @@ -0,0 +1,106 @@ +/* This file is part of KeY - https://key-project.org + * KeY is licensed under the GNU General Public License Version 2 + * SPDX-License-Identifier: GPL-2.0-only */ +package de.uka.ilkd.key.scripts; + +import de.uka.ilkd.key.logic.Sequent; +import de.uka.ilkd.key.nparser.KeYParser; +import de.uka.ilkd.key.nparser.KeYParser.*; +import de.uka.ilkd.key.nparser.KeYParserBaseVisitor; +import de.uka.ilkd.key.nparser.builder.ExpressionBuilder; + +import org.antlr.v4.runtime.ParserRuleContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import static org.key_project.util.java.StringUtil.trim; + +/// Evaluates expression inside of proof script to their appropriate type. +/// +/// - [ExpressionContext]: [Term] +/// - [SeqContext]: [Sequent] +/// - [Boolean_literalContext]: [Boolean] +/// - [IntegerContext]: [Integer] +/// - [DoubleLiteralContext]: [Double] +/// - [String_literalContext]: [String] +/// +/// @author Alexander Weigl +/// @version 1 (18.01.25) +/// @see de.uka.ilkd.key.nparser.KeYParser.ProofScriptExpressionContext +class ExprEvaluator extends KeYParserBaseVisitor { + private static final Logger LOGGER = LoggerFactory.getLogger(ExprEvaluator.class); + private final EngineState state; + + ExprEvaluator(EngineState engineState) { + this.state = engineState; + } + + @Override + public Object visitBoolean_literal(Boolean_literalContext ctx) { + return Boolean.parseBoolean(ctx.getText()); + } + + @Override + public Object visitChar_literal(KeYParser.Char_literalContext ctx) { + return ctx.getText().charAt(1); // skip "'" + } + + @Override + public Object visitInteger(IntegerContext ctx) { + return Integer.parseInt(ctx.getText()); + } + + @Override + public Object visitFloatLiteral(KeYParser.FloatLiteralContext ctx) { + return Float.parseFloat(ctx.getText()); + } + + @Override + public Object visitDoubleLiteral(DoubleLiteralContext ctx) { + return Double.parseDouble(ctx.getText()); + } + + @Override + public String visitString_literal(String_literalContext ctx) { + return trim(ctx.getText(), '"'); + } + + @Override + public Sequent visitSeq(SeqContext ctx) { + var expressionBuilder = + new ExpressionBuilder(state.getProof().getServices(), state.getCurrentNamespaces()); + expressionBuilder.setAbbrevMap(state.getAbbreviations()); + var t = (Sequent) ctx.accept(expressionBuilder); + var warnings = expressionBuilder.getBuildingIssues(); + warnings.forEach(it -> LOGGER.warn("{}", it)); + warnings.clear(); + return t; + + } + + @Override + public Object visitSimple_ident(Simple_identContext ctx) { + return evaluateExpression(ctx); + } + + @Override + public Object visitTerm(KeYParser.TermContext ctx) { + return evaluateExpression(ctx); + } + + private Object evaluateExpression(ParserRuleContext ctx) { + var expressionBuilder = + new ExpressionBuilder(state.getProof().getServices(), state.getCurrentNamespaces()); + expressionBuilder.setAbbrevMap(state.getAbbreviations()); + var t = ctx.accept(expressionBuilder); + var warnings = expressionBuilder.getBuildingIssues(); + warnings.forEach(it -> LOGGER.warn("{}", it)); + warnings.clear(); + return t; + } + + @Override + protected Object aggregateResult(Object aggregate, Object nextResult) { + return nextResult == null ? aggregate : nextResult; + } +} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/FocusCommand.java similarity index 98% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/FocusCommand.java index cfcb48fca24..08de8956ca3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/FocusCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/FocusCommand.java @@ -1,20 +1,20 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Iterator; import java.util.Set; import de.uka.ilkd.key.logic.*; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.rule.FindTaclet; import de.uka.ilkd.key.rule.PosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; import de.uka.ilkd.key.rule.inst.SVInstantiations; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; import org.key_project.util.collection.ImmutableList; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/HideCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/HideCommand.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/HideCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/HideCommand.java index 85edd078c0b..411d556167d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/HideCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/HideCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; @@ -11,11 +11,11 @@ import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; @@ -44,7 +44,7 @@ public HideCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/InstantiateCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/InstantiateCommand.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/InstantiateCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/InstantiateCommand.java index 743059f00ec..f191b21d462 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/InstantiateCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/InstantiateCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; @@ -11,7 +11,6 @@ import de.uka.ilkd.key.logic.op.Quantifier; import de.uka.ilkd.key.logic.op.SchemaVariable; import de.uka.ilkd.key.logic.op.UpdateApplication; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Proof; @@ -20,6 +19,7 @@ import de.uka.ilkd.key.rule.PosTacletApp; import de.uka.ilkd.key.rule.Taclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; import org.key_project.util.collection.ImmutableList; @@ -41,7 +41,7 @@ public InstantiateCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } @@ -218,6 +218,15 @@ public String getName() { return "instantiate"; } + @Override + public String getDocumentation() { + return """ + instantiate var=a occ=2 with="a_8" hide +

+ instantiate formula="\\forall int a; phi(a)" with="a_8\" + """; + } + /** * */ diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/JavascriptCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/JavascriptCommand.java similarity index 92% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/JavascriptCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/JavascriptCommand.java index 029f735b632..06d5d9354b0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/JavascriptCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/JavascriptCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import javax.script.ScriptContext; @@ -10,11 +10,10 @@ import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Term; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.ValueInjector; import de.uka.ilkd.key.parser.ParserException; import de.uka.ilkd.key.pp.AbbrevException; import de.uka.ilkd.key.proof.Proof; +import de.uka.ilkd.key.scripts.meta.Option; public class JavascriptCommand extends AbstractCommand { @@ -45,9 +44,9 @@ public void execute(Parameters args) throws ScriptException, InterruptedExceptio } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { - return ValueInjector.injection(this, new Parameters(), arguments); + return state.getValueInjector().inject(this, new Parameters(), arguments); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LeaveCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/LeaveCommand.java similarity index 84% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LeaveCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/LeaveCommand.java index 5815bf6533f..95a686b3c3c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/LeaveCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/LeaveCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.proof.Goal; @@ -17,6 +17,11 @@ public String getName() { return "leave"; } + @Override + public String getDocumentation() { + return "Marks the current goal to be ignored by the macros."; + } + @Override public void execute(AbstractUserInterfaceControl uiControl, Void args, EngineState state) throws ScriptException, InterruptedException { diff --git a/key.core/src/main/java/de/uka/ilkd/key/scripts/LetCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/LetCommand.java new file mode 100644 index 00000000000..5a9165652db --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/LetCommand.java @@ -0,0 +1,86 @@ +/* This file is part of KeY - https://key-project.org + * KeY is licensed under the GNU General Public License Version 2 + * SPDX-License-Identifier: GPL-2.0-only */ +package de.uka.ilkd.key.scripts; + +import java.util.List; +import java.util.Map; + +import de.uka.ilkd.key.control.AbstractUserInterfaceControl; +import de.uka.ilkd.key.logic.Term; +import de.uka.ilkd.key.nparser.KeYParser; +import de.uka.ilkd.key.pp.AbbrevMap; +import de.uka.ilkd.key.scripts.meta.ProofScriptArgument; + +import org.jspecify.annotations.NullMarked; + +/// The *let* command lets you introduce entries to the abbreviation table. +/// ``` +/// let @abbrev1=term1 ... @abbrev2=term2 force=true; +/// ``` +/// **Arguments:** +/// - varargs any key-value where *value* is a term and key is prefixed with `@` +/// - `force` : `boolean` if set the bindings are overridden otherwise conflicts results into an +/// exception. +/// +/// **Changes:** +/// * Jan,2025 (weigl): add new parameter {@code force} to override bindings. +@NullMarked +public class LetCommand implements ProofScriptCommand> { + + @Override + public List>> getArguments() { + return List.of(); + } + + @Override + public Map evaluateArguments(EngineState state, Map arguments) { + return arguments; + } + + @Override + public void execute(AbstractUserInterfaceControl uiControl, Map args, + EngineState stateMap) throws ScriptException, InterruptedException { + + AbbrevMap abbrMap = stateMap.getAbbreviations(); + + boolean force = args.containsKey("force"); + + for (Map.Entry entry : args.entrySet()) { + String key = entry.getKey(); + if (key.startsWith("#") || key.equals("force")) { + continue; + } + + if (!key.startsWith("@")) { + throw new ScriptException("Unexpected parameter to let, only @var allowed: " + key); + } + + // get rid of @ + key = key.substring(1); + + if (abbrMap.containsAbbreviation(key) && !force) { + throw new ScriptException(key + " is already fixed in this script"); + } + try { + final var termCtx = (KeYParser.ProofScriptExpressionContext) entry.getValue(); + final var value = termCtx.accept(stateMap.getEvaluator()); + final var term = stateMap.getValueInjector().convert(value, Term.class); + abbrMap.put(term, key, true); + } catch (Exception e) { + throw new ScriptException(e); + } + } + + } + + @Override + public String getName() { + return "let"; + } + + @Override + public String getDocumentation() { + return ""; + } +} diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/MacroCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/MacroCommand.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/MacroCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/MacroCommand.java index 88f40a5346f..706e96a1fb4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/MacroCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/MacroCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.HashMap; import java.util.Map; @@ -14,12 +14,12 @@ import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.macros.ProofMacro; import de.uka.ilkd.key.macros.ProofMacroFinishedInfo; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.Varargs; import de.uka.ilkd.key.pp.LogicPrinter; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.prover.TaskStartedInfo; import de.uka.ilkd.key.prover.impl.DefaultTaskStartedInfo; +import de.uka.ilkd.key.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Varargs; public class MacroCommand extends AbstractCommand { private static final Map macroMap = loadMacroMap(); @@ -43,7 +43,7 @@ private static Map loadMacroMap() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/NoArgumentCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/NoArgumentCommand.java similarity index 66% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/NoArgumentCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/NoArgumentCommand.java index 4388c70fc84..255b47ca9e6 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/NoArgumentCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/NoArgumentCommand.java @@ -1,14 +1,13 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.ArrayList; import java.util.List; import java.util.Map; -import de.uka.ilkd.key.macros.scripts.meta.DescriptionFacade; -import de.uka.ilkd.key.macros.scripts.meta.ProofScriptArgument; +import de.uka.ilkd.key.scripts.meta.ProofScriptArgument; /** * @author Alexander Weigl @@ -21,12 +20,7 @@ public List> getArguments() { } @Override - public Void evaluateArguments(EngineState state, Map arguments) { + public Void evaluateArguments(EngineState state, Map arguments) { return null; } - - @Override - public String getDocumentation() { - return DescriptionFacade.getDocumentation(this); - } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofAlreadyClosedException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofAlreadyClosedException.java similarity index 93% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofAlreadyClosedException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ProofAlreadyClosedException.java index 270838de2f2..47c74d846d0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofAlreadyClosedException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofAlreadyClosedException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; /** * Thrown if during the execution of a command, the proof is already closed. May or may not lead to diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptCommand.java similarity index 90% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptCommand.java index c6bc38a87cf..7f319d10f24 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptCommand.java @@ -1,13 +1,15 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.List; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.macros.scripts.meta.ProofScriptArgument; +import de.uka.ilkd.key.scripts.meta.ProofScriptArgument; + +import org.jspecify.annotations.NullMarked; /** * A {@link ProofScriptCommand} is an executable mutation on the given proof. It abstracts complex @@ -24,6 +26,7 @@ * @author Mattias Ulbrich * @author Alexander Weigl */ +@NullMarked public interface ProofScriptCommand { /** @@ -35,7 +38,7 @@ public interface ProofScriptCommand { * @param arguments * @return */ - T evaluateArguments(EngineState state, Map arguments) throws Exception; + T evaluateArguments(EngineState state, Map arguments) throws Exception; /** * @param uiControl the current ui controller diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptEngine.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptEngine.java similarity index 52% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptEngine.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptEngine.java index 0d3285e00fc..66216374e0a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ProofScriptEngine.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ProofScriptEngine.java @@ -1,24 +1,29 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; -import java.io.File; import java.io.IOException; -import java.io.StringReader; import java.net.URI; -import java.nio.file.Files; +import java.nio.file.InvalidPathException; +import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; import java.util.function.Consumer; +import java.util.stream.Collectors; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.java.Position; +import de.uka.ilkd.key.nparser.KeYParser; +import de.uka.ilkd.key.nparser.KeyAst; +import de.uka.ilkd.key.nparser.ParsingFacade; +import de.uka.ilkd.key.nparser.builder.BuilderHelpers; import de.uka.ilkd.key.parser.Location; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Proof; +import org.antlr.v4.runtime.RuleContext; +import org.antlr.v4.runtime.misc.Interval; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,43 +32,43 @@ * @author Alexander Weigl */ public class ProofScriptEngine { - private static final String SYSTEM_COMMAND_PREFIX = "@"; + public static final int KEY_START_INDEX_PARAMETER = 2; + public static final String KEY_SUB_SCRIPT = "#block"; private static final int MAX_CHARS_PER_COMMAND = 80; private static final Map> COMMANDS = loadCommands(); private static final Logger LOGGER = LoggerFactory.getLogger(ProofScriptEngine.class); - private final Location initialLocation; - private final String script; + private final KeyAst.ProofScript script; - /** The initially selected goal. */ + /** + * The initially selected goal. + */ private final Goal initiallySelectedGoal; - /** The engine state map. */ + /** + * The engine state map. + */ private EngineState stateMap; private Consumer commandMonitor; - public ProofScriptEngine(File file) throws IOException { - this.initialLocation = new Location(file.toURI(), Position.newOneBased(1, 1)); - this.script = Files.readString(file.toPath()); - this.initiallySelectedGoal = null; + public ProofScriptEngine(Path file) throws IOException { + this(ParsingFacade.parseScript(file), null); } - public ProofScriptEngine(String script, Location initLocation) { - this(script, initLocation, null); + public ProofScriptEngine(KeyAst.ProofScript script) { + this(script, null); } /** * Instantiates a new proof script engine. * * @param script the script - * @param initLocation the initial location * @param initiallySelectedGoal the initially selected goal */ - public ProofScriptEngine(String script, Location initLocation, Goal initiallySelectedGoal) { + public ProofScriptEngine(KeyAst.ProofScript script, Goal initiallySelectedGoal) { this.script = script; - this.initialLocation = initLocation; this.initiallySelectedGoal = initiallySelectedGoal; } @@ -78,40 +83,48 @@ private static Map> loadCommands() { return result; } - @SuppressWarnings("unchecked") public void execute(AbstractUserInterfaceControl uiControl, Proof proof) throws IOException, InterruptedException, ScriptException { - - ScriptLineParser mlp = new ScriptLineParser(new StringReader(script), initialLocation); - - stateMap = new EngineState(proof); + var ctx = ParsingFacade.getParseRuleContext(script); + stateMap = new EngineState(proof, this); if (initiallySelectedGoal != null) { stateMap.setGoal(initiallySelectedGoal); } // add the filename (if available) to the statemap. - Optional uri = initialLocation.getFileURI(); - uri.ifPresent(value -> stateMap.setBaseFileName(Paths.get(value).toFile())); + URI url = script.getUrl(); + try { + stateMap.setBaseFileName(Paths.get(url)); + } catch (InvalidPathException ignored) { + // weigl: occurs on windows platforms, due to the fact + // that the URI contains "" from ANTLR4 when read by string + // "<" is illegal on windows + } // add the observer (if installed) to the state map if (commandMonitor != null) { stateMap.setObserver(commandMonitor); } + execute(uiControl, ctx.proofScriptCommand()); + } + + @SuppressWarnings("unchecked") + public void execute(AbstractUserInterfaceControl uiControl, + List commands) + throws InterruptedException, ScriptException { + Location start = script.getStartLocation(); + Proof proof = stateMap.getProof(); int cnt = 0; - while (true) { + for (KeYParser.ProofScriptCommandContext commandContext : commands) { if (Thread.interrupted()) { throw new InterruptedException(); } - ScriptLineParser.ParsedCommand parsed = mlp.parseCommand(); - if (parsed == null) { - // EOF reached - break; - } - final Map argMap = parsed.args(); - final Location start = parsed.start(); + var argMap = getArguments(commandContext); + + String name = commandContext.cmd.getText(); String cmd = "'" + argMap.get(ScriptLineParser.LITERAL_KEY) + "'"; if (cmd.length() > MAX_CHARS_PER_COMMAND) { @@ -119,29 +132,23 @@ public void execute(AbstractUserInterfaceControl uiControl, Proof proof) } final Node firstNode = stateMap.getFirstOpenAutomaticGoal().node(); - if (commandMonitor != null && stateMap.isEchoOn() - && !Optional.ofNullable(argMap.get(ScriptLineParser.COMMAND_KEY)).orElse("") - .startsWith(SYSTEM_COMMAND_PREFIX)) { + if (commandMonitor != null && stateMap.isEchoOn()) { commandMonitor .accept(new ExecuteInfo(cmd, start, firstNode.serialNr())); } try { - String name = argMap.get(ScriptLineParser.COMMAND_KEY); - if (name == null) { - throw new ScriptException("No command"); - } - ProofScriptCommand command = (ProofScriptCommand) COMMANDS.get(name); if (command == null) { - throw new ScriptException("Unknown command " + name); + throw new ScriptException("Unknown command " + name + " at " + + BuilderHelpers.getPosition(commandContext)); } Object o = command.evaluateArguments(stateMap, argMap); - if (!name.startsWith(SYSTEM_COMMAND_PREFIX) && stateMap.isEchoOn()) { + if (stateMap.isEchoOn()) { LOGGER.debug("[{}] goal: {}, source line: {}, command: {}", ++cnt, - firstNode.serialNr(), parsed.start().getPosition().line(), cmd); + firstNode.serialNr(), commandContext.start.getLine(), cmd); } command.execute(uiControl, o, stateMap); firstNode.getNodeInfo().setScriptRuleApplication(true); @@ -150,20 +157,20 @@ public void execute(AbstractUserInterfaceControl uiControl, Proof proof) } catch (ProofAlreadyClosedException e) { if (stateMap.isFailOnClosedOn()) { throw new ScriptException( - String.format( - """ - Proof already closed while trying to fetch next goal. - This error can be suppressed by setting '@failonclosed off'. - - Command: %s - Line:%d - """, - argMap.get(ScriptLineParser.LITERAL_KEY), start.getPosition().line()), - start, e); + String.format(""" + Proof already closed while trying to fetch next goal. + This error can be suppressed by setting '@failonclosed off'. + + Command: %s + Position: %s + """, + commandContext.getText(), + BuilderHelpers.getPosition(commandContext))); } else { LOGGER.info( - "Proof already closed at command \"{}\" at line %d, terminating in line {}", - argMap.get(ScriptLineParser.LITERAL_KEY), start.getPosition().line()); + "Proof already closed at command \"{}\" at line {}, terminating", + argMap.get(ScriptLineParser.LITERAL_KEY), + BuilderHelpers.getPosition(commandContext)); break; } } catch (Exception e) { @@ -171,13 +178,49 @@ public void execute(AbstractUserInterfaceControl uiControl, Proof proof) proof.getSubtreeGoals(stateMap.getProof().root()) .forEach(g -> LOGGER.debug("{}", g.sequent())); throw new ScriptException( - String.format("Error while executing script: %s\n\nCommand: %s", e.getMessage(), - argMap.get(ScriptLineParser.LITERAL_KEY)), - start, e); + String.format("Error while executing script: %s%n%nCommand: %s%nPosition: %s%n", + e.getMessage(), prettyPrintCommand(commandContext), + BuilderHelpers.getPosition(commandContext)), + e); + } + } + } + + + public static String prettyPrintCommand(KeYParser.ProofScriptCommandContext ctx) { + return ctx.cmd.getText() + + (ctx.proofScriptParameters() != null + ? " " + ctx.proofScriptParameters().proofScriptParameter().stream() + .map(RuleContext::getText) + .collect(Collectors.joining(" ")) + : "") + + ";"; + } + + + private Map getArguments(KeYParser.ProofScriptCommandContext commandContext) { + var map = new TreeMap(); + int i = KEY_START_INDEX_PARAMETER; + + if (commandContext.proofScriptParameters() != null) { + for (var pc : commandContext.proofScriptParameters().proofScriptParameter()) { + String key = pc.pname != null ? pc.pname.getText() : "#" + (i++); + map.put(key, pc.expr); } } + + if (commandContext.sub != null) { + map.put(KEY_SUB_SCRIPT, commandContext.sub); + } + + var in = commandContext.start.getTokenSource().getInputStream(); + var txt = in.getText( + Interval.of(commandContext.start.getStartIndex(), commandContext.stop.getStopIndex())); + map.put(ScriptLineParser.LITERAL_KEY, txt); + return map; } + public EngineState getStateMap() { return stateMap; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/RewriteCommand.java similarity index 98% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/RewriteCommand.java index 4695163c98d..b94a4a36948 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RewriteCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/RewriteCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.ArrayList; import java.util.List; @@ -10,7 +10,6 @@ import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.logic.*; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.RuleAppIndex; @@ -18,6 +17,7 @@ import de.uka.ilkd.key.rule.PosTacletApp; import de.uka.ilkd.key.rule.RewriteTaclet; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.util.collection.ImmutableList; import org.key_project.util.collection.ImmutableSLList; @@ -68,7 +68,7 @@ public String getName() { @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } @@ -85,7 +85,7 @@ public void execute(AbstractUserInterfaceControl uiControl, Parameters args, Eng List failposInOccs = findAndExecReplacement(args, allApps, state); // if not all find terms successfully replaced, apply cut - if (failposInOccs.size() >= 1) { + if (!failposInOccs.isEmpty()) { CutCommand cut = new CutCommand(); CutCommand.Parameters param = new CutCommand.Parameters(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RuleCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/RuleCommand.java similarity index 94% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RuleCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/RuleCommand.java index 1519b73e0de..2df4991727f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/RuleCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/RuleCommand.java @@ -1,16 +1,17 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.*; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; import de.uka.ilkd.key.java.Services; -import de.uka.ilkd.key.logic.*; +import de.uka.ilkd.key.logic.PosInOccurrence; +import de.uka.ilkd.key.logic.PosInTerm; +import de.uka.ilkd.key.logic.SequentFormula; +import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.Varargs; import de.uka.ilkd.key.pp.LogicPrinter; import de.uka.ilkd.key.proof.BuiltInRuleAppIndex; import de.uka.ilkd.key.proof.Goal; @@ -18,6 +19,8 @@ import de.uka.ilkd.key.proof.RuleAppIndex; import de.uka.ilkd.key.proof.rulefilter.TacletFilter; import de.uka.ilkd.key.rule.*; +import de.uka.ilkd.key.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Varargs; import org.key_project.logic.Name; import org.key_project.util.collection.ImmutableList; @@ -50,7 +53,24 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public String getDocumentation() { + return """ + Command that applies a calculus rule. + All parameters are passed as strings and converted by the command. + + The parameters are: +
    +
  1. #2 = rule name
  2. +
  3. on= key.core.logic.Term on which the rule should be applied to as String (find part of the rule)
  4. +
  5. formula= toplevel formula in which term appears in
  6. +
  7. occ = occurrence number
  8. +
  9. inst_= instantiation
  10. +
+ """; + } + + @Override + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SMTCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SMTCommand.java similarity index 95% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SMTCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SMTCommand.java index 09b9de3b237..8b03dc6ba84 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SMTCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SMTCommand.java @@ -1,14 +1,13 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.*; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.ValueInjector; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.rule.IBuiltInRuleApp; +import de.uka.ilkd.key.scripts.meta.Option; import de.uka.ilkd.key.settings.DefaultSMTSettings; import de.uka.ilkd.key.settings.ProofIndependentSettings; import de.uka.ilkd.key.smt.*; @@ -42,9 +41,9 @@ private static Map computeSolverMap() { } @Override - public SMTCommandArguments evaluateArguments(EngineState state, Map arguments) + public SMTCommandArguments evaluateArguments(EngineState state, Map arguments) throws Exception { - return ValueInjector.injection(this, new SMTCommandArguments(), arguments); + return state.getValueInjector().inject(this, new SMTCommandArguments(), arguments); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveInstCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SaveInstCommand.java similarity index 89% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveInstCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SaveInstCommand.java index 2271383a161..db3a95d6f19 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveInstCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SaveInstCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; @@ -25,24 +25,24 @@ * * @author Dominic Steinhoefel */ -public class SaveInstCommand extends AbstractCommand> { +public class SaveInstCommand extends AbstractCommand> { public SaveInstCommand() { super(null); } @Override - public Map evaluateArguments(EngineState state, Map arguments) { + public Map evaluateArguments(EngineState state, Map arguments) { return arguments; } @Override - public void execute(AbstractUserInterfaceControl uiControl, Map args, + public void execute(AbstractUserInterfaceControl uiControl, Map args, EngineState stateMap) throws ScriptException, InterruptedException { AbbrevMap abbrMap = stateMap.getAbbreviations(); - for (Map.Entry entry : args.entrySet()) { + for (Map.Entry entry : args.entrySet()) { String key = entry.getKey(); - final String value = entry.getValue(); + final var value = entry.getValue(); if ("#1".equals(key)) { continue; } @@ -65,7 +65,7 @@ public void execute(AbstractUserInterfaceControl uiControl, Map stateMap.getFirstOpenAutomaticGoal().node().parent().getAppliedRuleApp(); if (ruleApp instanceof TacletApp tacletApp) { final Object inst = tacletApp.matchConditions().getInstantiations() - .lookupValue(new Name(value)); + .lookupValue(new Name(value.toString())); if (inst != null && ((Term) inst).op() instanceof JFunction) { abbrMap.put((Term) inst, key, true); } else { diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveNewNameCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SaveNewNameCommand.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveNewNameCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SaveNewNameCommand.java index b8b4b159e9a..a812e2ae9b9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SaveNewNameCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SaveNewNameCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.List; import java.util.Map; @@ -11,11 +11,11 @@ import de.uka.ilkd.key.logic.TermBuilder; import de.uka.ilkd.key.logic.op.JFunction; import de.uka.ilkd.key.logic.op.ProgramVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.pp.AbbrevMap; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.rule.TacletApp; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; import org.key_project.logic.Named; @@ -36,7 +36,7 @@ public SaveNewNameCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SchemaVarCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SchemaVarCommand.java similarity index 94% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SchemaVarCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SchemaVarCommand.java index 40a1ba15085..04bb15c193e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SchemaVarCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SchemaVarCommand.java @@ -1,15 +1,15 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.OperatorSV; import de.uka.ilkd.key.logic.op.SchemaVariableFactory; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.pp.AbbrevMap; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.logic.Name; import org.key_project.logic.sort.Sort; @@ -24,7 +24,7 @@ public SchemaVarCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommand.java similarity index 79% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommand.java index a389c0b0ad3..e06cfc41434 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptCommand.java @@ -1,12 +1,13 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; -import java.io.File; +import java.nio.file.Files; import java.nio.file.NoSuchFileException; +import java.nio.file.Path; -import de.uka.ilkd.key.macros.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Option; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,13 +27,13 @@ public static class Parameters { @Override public void execute(Parameters args) throws ScriptException, InterruptedException { - File root = state.getBaseFileName(); - if (!root.isDirectory()) { - root = root.getParentFile(); + Path root = state.getBaseFileName(); + if (!Files.isDirectory(root)) { + root = root.getParent(); } - File file = new File(root, args.filename); + Path file = root.resolve(args.filename); - LOGGER.info("Included script " + file); + LOGGER.info("Included script {}", file); try { ProofScriptEngine pse = new ProofScriptEngine(file); diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptException.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptException.java index c5ff4d935f8..f55b350e369 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import de.uka.ilkd.key.parser.Location; import de.uka.ilkd.key.util.parsing.HasLocation; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptLineParser.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptLineParser.java similarity index 99% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptLineParser.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptLineParser.java index c6b5e3db7b0..9708ac764d0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptLineParser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptLineParser.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.io.IOException; import java.io.Reader; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptNode.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptNode.java similarity index 98% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptNode.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptNode.java index 18531d0516b..a3a0dc8336e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptNode.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptNode.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.LinkedList; import java.util.List; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptTreeParser.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptTreeParser.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptTreeParser.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptTreeParser.java index d9ca99cfd58..45454c49097 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/ScriptTreeParser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/ScriptTreeParser.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.io.IOException; import java.io.InputStreamReader; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SelectCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SelectCommand.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SelectCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SelectCommand.java index 3c8978e0113..8adac3236b7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SelectCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SelectCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Deque; import java.util.LinkedList; @@ -13,10 +13,10 @@ import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.SequentFormula; import de.uka.ilkd.key.logic.Term; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; import de.uka.ilkd.key.proof.Proof; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.util.collection.ImmutableList; @@ -28,7 +28,7 @@ public SelectCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetCommand.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SetCommand.java index 9ccd3c2c274..206b3a3d0d8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetCommand.java @@ -1,14 +1,14 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.init.Profile; import de.uka.ilkd.key.rule.OneStepSimplifier; +import de.uka.ilkd.key.scripts.meta.Option; import de.uka.ilkd.key.settings.ProofSettings; import de.uka.ilkd.key.strategy.Strategy; import de.uka.ilkd.key.strategy.StrategyFactory; @@ -21,7 +21,7 @@ public SetCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetEchoCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetEchoCommand.java similarity index 91% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetEchoCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SetEchoCommand.java index b4a14a5e7b9..5be8eda6f6d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetEchoCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetEchoCommand.java @@ -1,12 +1,12 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.macros.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Option; /** * A simple "echo" command for giving feedback to human observers during lengthy executions. @@ -22,7 +22,7 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetFailOnClosedCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetFailOnClosedCommand.java similarity index 92% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetFailOnClosedCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SetFailOnClosedCommand.java index f2f9e3840d3..8718a725c30 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SetFailOnClosedCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SetFailOnClosedCommand.java @@ -1,12 +1,12 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.macros.scripts.meta.Option; +import de.uka.ilkd.key.scripts.meta.Option; /** * Sets the behavior if an already closed proof is encountered: Either throw an exception (default @@ -27,7 +27,7 @@ public String getName() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SkipCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/SkipCommand.java similarity index 78% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SkipCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/SkipCommand.java index 94ae7521398..cb317c3fa23 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/SkipCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/SkipCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; @@ -17,4 +17,8 @@ public String getName() { return "skip"; } + @Override + public String getDocumentation() { + return "Does exactly nothing. Really nothing."; + } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/TryCloseCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/TryCloseCommand.java similarity index 90% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/TryCloseCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/TryCloseCommand.java index 183f12b3e85..d5a6c435a3c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/TryCloseCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/TryCloseCommand.java @@ -1,15 +1,14 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.Map; import de.uka.ilkd.key.macros.TryCloseMacro; -import de.uka.ilkd.key.macros.scripts.meta.Option; -import de.uka.ilkd.key.macros.scripts.meta.ValueInjector; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Node; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.util.collection.ImmutableList; @@ -28,9 +27,9 @@ public TryCloseCommand() { } @Override - public TryCloseArguments evaluateArguments(EngineState state, Map arguments) + public TryCloseArguments evaluateArguments(EngineState state, Map arguments) throws Exception { - return ValueInjector.injection(this, new TryCloseArguments(), arguments); + return state.getValueInjector().inject(this, new TryCloseArguments(), arguments); } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/UnhideCommand.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/UnhideCommand.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/UnhideCommand.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/UnhideCommand.java index 1a1bfcf4055..2fa41d42697 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/UnhideCommand.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/UnhideCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.HashSet; import java.util.Map; @@ -10,12 +10,12 @@ import de.uka.ilkd.key.logic.Sequent; import de.uka.ilkd.key.logic.Term; import de.uka.ilkd.key.logic.op.SchemaVariable; -import de.uka.ilkd.key.macros.scripts.meta.Option; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.RuleAppIndex; import de.uka.ilkd.key.proof.rulefilter.TacletFilter; import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.Taclet; +import de.uka.ilkd.key.scripts.meta.Option; import org.key_project.util.collection.ImmutableList; @@ -48,7 +48,7 @@ public UnhideCommand() { } @Override - public Parameters evaluateArguments(EngineState state, Map arguments) + public Parameters evaluateArguments(EngineState state, Map arguments) throws Exception { return state.getValueInjector().inject(this, new Parameters(), arguments); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentRequiredException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentRequiredException.java similarity index 94% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentRequiredException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentRequiredException.java index a876abcc271..e4c031af1c7 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentRequiredException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentRequiredException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * Signals if an argument is required but was not set during an injection. diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentsLifter.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentsLifter.java similarity index 93% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentsLifter.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentsLifter.java index 958a61dc8dc..83f19846bd3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ArgumentsLifter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ArgumentsLifter.java @@ -1,14 +1,14 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; -import de.uka.ilkd.key.macros.scripts.ProofScriptCommand; +import de.uka.ilkd.key.scripts.ProofScriptCommand; /** * @author Alexander Weigl @@ -64,7 +64,6 @@ private static ProofScriptArgument lift(Option option, Field field) { arg.setRequired(option.required()); arg.setField(field); arg.setType(field.getType()); - arg.setDocumentation(DescriptionFacade.getDocumentation(arg)); return arg; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ConversionException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ConversionException.java similarity index 95% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ConversionException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ConversionException.java index bf7276bff93..351c192fc78 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ConversionException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ConversionException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * @author Alexander Weigl diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/StringConverter.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Converter.java similarity index 69% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/StringConverter.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Converter.java index 00161e10835..ec20894856f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/StringConverter.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Converter.java @@ -1,15 +1,15 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** - * A {@link StringConverter} translates a textual representation to an instance of {@code T}. + * A {@link Converter} translates an instance of {@code R} to an instance of {@code T}. * * @param * @author Alexander Weigl */ -public interface StringConverter { +public interface Converter { /** * Translates the textual representation given in {@code s} to an instance of {@code T}. * @@ -17,5 +17,5 @@ public interface StringConverter { * @return an corresponding instance of T * @throws Exception if there is an error during the translation (format incorrent etc..) */ - T convert(String s) throws Exception; + R convert(T s) throws Exception; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Flag.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Flag.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Flag.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Flag.java index 42705d5789d..85a1f619066 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Flag.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Flag.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; // Need to switch spotless off for the comment because it replaces @Flag with @Flag // spotless:off diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionException.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionException.java index 7e96a157952..d613d4b2910 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionReflectionException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionReflectionException.java similarity index 96% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionReflectionException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionReflectionException.java index 8bd1f82fc0f..a50d7192294 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/InjectionReflectionException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/InjectionReflectionException.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * @author Alexander Weigl diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/NoSpecifiedConverterException.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/NoSpecifiedConverterException.java similarity index 89% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/NoSpecifiedConverterException.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/NoSpecifiedConverterException.java index 41837a3c6a9..22d28fbc280 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/NoSpecifiedConverterException.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/NoSpecifiedConverterException.java @@ -1,12 +1,12 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * Indicates a missing converter. *

- * This is exception is raised if {@link StringConverter} is found for string to the desired type + * This is exception is raised if {@link Converter} is found for string to the desired type * {@code T}. The desired type is in the stored {@link ProofScriptArgument}. * * @author Alexander Weigl diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Option.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Option.java similarity index 95% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Option.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Option.java index dd5dfcd78ef..b5b705b3bbc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Option.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Option.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ProofScriptArgument.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ProofScriptArgument.java similarity index 97% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ProofScriptArgument.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ProofScriptArgument.java index af9c3907334..06cdbf1d36b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ProofScriptArgument.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ProofScriptArgument.java @@ -1,12 +1,12 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.lang.reflect.Field; import java.util.Objects; -import de.uka.ilkd.key.macros.scripts.ProofScriptCommand; +import de.uka.ilkd.key.scripts.ProofScriptCommand; /** * @author Alexander Weigl diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Type.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Type.java similarity index 86% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Type.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Type.java index 4808457583e..eb4ea2acf3e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Type.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Type.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; /** * @author Alexander Weigl diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjector.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ValueInjector.java similarity index 63% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjector.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ValueInjector.java index a94da0c5e24..648b7fabed2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjector.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/ValueInjector.java @@ -1,14 +1,15 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; -import de.uka.ilkd.key.macros.scripts.ProofScriptCommand; +import de.uka.ilkd.key.scripts.ProofScriptCommand; /** * @author Alexander Weigl @@ -23,7 +24,7 @@ public class ValueInjector { private static ValueInjector instance; /** - * A mapping between desired types and suitable @{@link StringConverter}. + * A mapping between desired types and suitable @{@link Converter}. *

* Should be * @@ -31,7 +32,17 @@ public class ValueInjector { * T --> StringConverter * */ - private final Map, StringConverter> converters = new HashMap<>(); + private final Map, Converter> converters = new HashMap<>(); + + /** + * @param source + * @param target + * @param + * @param + */ + private record ConverterKey( + Class source, Class target) { + } /** * Injects the given {@code arguments} in the {@code obj}. For more details see @@ -48,7 +59,7 @@ public class ValueInjector { * @throws ConversionException an converter could not translate the given value in arguments */ public static T injection(ProofScriptCommand command, T obj, - Map arguments) throws ArgumentRequiredException, + Map arguments) throws ArgumentRequiredException, InjectionReflectionException, NoSpecifiedConverterException, ConversionException { return getInstance().inject(command, obj, arguments); } @@ -74,29 +85,33 @@ public static ValueInjector getInstance() { */ public static ValueInjector createDefault() { ValueInjector vi = new ValueInjector(); - vi.addConverter(Integer.class, Integer::parseInt); - vi.addConverter(Long.class, Long::parseLong); - vi.addConverter(Boolean.class, Boolean::parseBoolean); - vi.addConverter(Double.class, Double::parseDouble); - vi.addConverter(String.class, (String s) -> s); - vi.addConverter(Boolean.TYPE, Boolean::parseBoolean); - vi.addConverter(Byte.TYPE, Byte::parseByte); - vi.addConverter(Character.TYPE, s -> s.charAt(0)); - vi.addConverter(Short.TYPE, Short::parseShort); - vi.addConverter(Integer.TYPE, Integer::parseInt); - vi.addConverter(Long.TYPE, Long::parseLong); - vi.addConverter(Double.TYPE, Double::parseDouble); - vi.addConverter(Float.TYPE, Float::parseFloat); + vi.addConverter(Integer.class, String.class, Integer::parseInt); + vi.addConverter(Long.class, String.class, Long::parseLong); + vi.addConverter(Boolean.class, String.class, Boolean::parseBoolean); + vi.addConverter(Double.class, String.class, Double::parseDouble); + vi.addConverter(String.class, String.class, (String s) -> s); + vi.addConverter(Boolean.TYPE, String.class, Boolean::parseBoolean); + vi.addConverter(Byte.TYPE, String.class, Byte::parseByte); + vi.addConverter(Character.TYPE, String.class, (String s) -> s.charAt(0)); + vi.addConverter(Short.TYPE, String.class, Short::parseShort); + vi.addConverter(Integer.TYPE, String.class, Integer::parseInt); + vi.addConverter(Long.TYPE, String.class, Long::parseLong); + vi.addConverter(Double.TYPE, String.class, Double::parseDouble); + vi.addConverter(Float.TYPE, String.class, Float::parseFloat); + vi.addConverter(Integer.TYPE, Integer.class, (Integer i) -> (int) i); + vi.addConverter(Double.TYPE, Double.class, d -> d); + vi.addConverter(Boolean.TYPE, Boolean.class, b -> b); + return vi; } /** * Injects the converted version of the given {@code arguments} in the given {@code obj}. * + * @param type safety * @param command a proof script command * @param obj a non-null instance of a parameter class (with annotation) * @param arguments a non-null string map - * @param type safety * @return the same object as {@code obj} * @throws ArgumentRequiredException a required argument was not given in {@code arguments} * @throws InjectionReflectionException an access on some reflection methods occurred @@ -105,7 +120,7 @@ public static ValueInjector createDefault() { * @see Option * @see Flag */ - public T inject(ProofScriptCommand command, T obj, Map arguments) + public T inject(ProofScriptCommand command, T obj, Map arguments) throws ConversionException, InjectionReflectionException, NoSpecifiedConverterException, ArgumentRequiredException { List> meta = @@ -126,9 +141,9 @@ public T inject(ProofScriptCommand command, T obj, Map ar for (ProofScriptArgument vararg : varArgs) { final Map map = getStringMap(obj, vararg); final int prefixLength = vararg.getName().length(); - for (Map.Entry e : arguments.entrySet()) { - String k = e.getKey(); - String v = e.getValue(); + for (Map.Entry e : arguments.entrySet()) { + var k = e.getKey(); + var v = e.getValue(); if (!usedKeys.contains(k) && k.startsWith(vararg.getName())) { map.put(k.substring(prefixLength), convert(vararg, v)); usedKeys.add(k); @@ -155,10 +170,10 @@ private Map getStringMap(Object obj, ProofScriptArgument vara } } - private void injectIntoField(ProofScriptArgument meta, Map args, Object obj) + private void injectIntoField(ProofScriptArgument meta, Map args, Object obj) throws InjectionReflectionException, ArgumentRequiredException, ConversionException, NoSpecifiedConverterException { - final String val = args.get(meta.getName()); + final var val = args.get(meta.getName()); if (val == null) { if (meta.isRequired()) { throw new ArgumentRequiredException(String.format( @@ -183,41 +198,77 @@ private void injectIntoField(ProofScriptArgument meta, Map ar } } - private Object convert(ProofScriptArgument meta, String val) + @SuppressWarnings("unchecked") + private Object convert(ProofScriptArgument meta, Object val) throws NoSpecifiedConverterException, ConversionException { - StringConverter converter = getConverter(meta.getType()); + var converter = (Converter) getConverter(meta.getType(), val.getClass()); if (converter == null) { throw new NoSpecifiedConverterException( - "No converter registered for class: " + meta.getField().getType(), meta); + "No converter registered for class: " + meta.getField().getType() + " from " + + val.getClass(), + meta); } try { return converter.convert(val); } catch (Exception e) { - throw new ConversionException(String.format("Could not convert value %s to type %s", - val, meta.getField().getType().getName()), e, meta); + throw new ConversionException( + String.format("Could not convert value %s (%s) to type %s", + val, val.getClass(), meta.getField().getType().getName()), + e, meta); + } + } + + public T convert(Object val, Class type) + throws NoSpecifiedConverterException, ConversionException { + Converter converter = (Converter) getConverter(type, val.getClass()); + + if (converter == null) { + throw new NoSpecifiedConverterException( + "No converter registered for class: " + type + " from " + val.getClass(), null); + } + try { + return converter.convert(val); + } catch (Exception e) { + throw new ConversionException( + String.format("Could not convert value %s (%s) to type %s", val, val.getClass(), + type), + e, null); } } /** * Registers the given converter for the specified class. * - * @param clazz a class + * @param ret a class * @param conv a converter for the given class * @param an arbitrary type */ - public void addConverter(Class clazz, StringConverter conv) { - converters.put(clazz, conv); + public void addConverter(Class ret, Class arg, Converter conv) { + converters.put(new ConverterKey<>(ret, arg), conv); + } + + public void addConverter(Converter conv) { + var m = conv.getClass().getMethods()[0]; + converters.put(new ConverterKey<>(m.getReturnType(), m.getParameterTypes()[0]), conv); } /** * Finds a converter for the given class. * - * @param clazz a non-null class * @param an arbitrary type + * @param ret a non-null class + * @param arg * @return null or a suitable converter (registered) converter for the requested class. */ @SuppressWarnings("unchecked") - public StringConverter getConverter(Class clazz) { - return (StringConverter) converters.get(clazz); + public Converter getConverter(Class ret, Class arg) { + return (Converter) converters.get(new ConverterKey<>(ret, arg)); + } + + @Override + public String toString() { + return "%s(%s)".formatted( + getClass().getName(), + converters.keySet().stream().map(Record::toString).collect(Collectors.joining(",\n"))); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Varargs.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Varargs.java similarity index 92% rename from key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Varargs.java rename to key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Varargs.java index 691a0195e12..9067db519e9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/macros/scripts/meta/Varargs.java +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/meta/Varargs.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/key.core/src/main/java/de/uka/ilkd/key/scripts/package-info.java b/key.core/src/main/java/de/uka/ilkd/key/scripts/package-info.java new file mode 100644 index 00000000000..cd1f9cb41e0 --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/scripts/package-info.java @@ -0,0 +1,13 @@ +/** + * Proof script commands are a simple proof automation facility. + * + * @see de.uka.ilkd.key.scripts.ProofScriptCommand + * @see de.uka.ilkd.key.scripts.ProofScriptEngine + * @see de.uka.ilkd.key.scripts.EngineState + * + * + * @author Mattias Ulbrich + * @author Alexander Weigl + * @version 1 (29.03.17) + */ +package de.uka.ilkd.key.scripts; diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedLabeledString.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedLabeledString.java index 3d4897492ff..6cb377a4edc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedLabeledString.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedLabeledString.java @@ -8,6 +8,8 @@ import org.key_project.util.collection.ImmutableArray; +import org.jspecify.annotations.NullMarked; + /** * A positionedString with labels, which can then be passed over to the translated term. For the * moment, this is used to distinguish implicit specifications from explicit ones and {@code &} from @@ -16,6 +18,7 @@ * * @author Michael Kirsten */ +@NullMarked public class PositionedLabeledString extends PositionedString { public final ImmutableArray labels; diff --git a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java index 74a1149d883..dfbcdbd789b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java +++ b/key.core/src/main/java/de/uka/ilkd/key/speclang/PositionedString.java @@ -13,32 +13,32 @@ import org.key_project.util.collection.ImmutableArray; import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; /** * A string with associated position information (file and line number). The position information is * used for error reporting. */ +@NullMarked public class PositionedString { - - public final @NonNull String text; - - public final @NonNull Location location; - private static final ImmutableArray EMPTY_LABEL_LIST = new ImmutableArray<>(); - public PositionedString(@NonNull String text, @NonNull Location location) { - if (text == null || location == null) { - throw new IllegalArgumentException(); - } + public final String text; + public final Location location; - this.text = text; - this.location = location; + public PositionedString(String text, Location location) { + this.text = Objects.requireNonNull(text); + this.location = Objects.requireNonNull(location); } - public PositionedString(@NonNull String text, URI fileName) { - this(text, new Location(fileName, Position.UNDEFINED)); + public PositionedString(String text, org.antlr.v4.runtime.Token t) { + this(text, Location.fromToken(t)); } + public PositionedString(String text, @Nullable URI fileName) { + this(text, new Location(fileName, Position.UNDEFINED)); + } public PositionedString(String text) { this(text, (URI) null); diff --git a/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.macros.scripts.ProofScriptCommand b/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.macros.scripts.ProofScriptCommand deleted file mode 100644 index 3cac23e7e25..00000000000 --- a/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.macros.scripts.ProofScriptCommand +++ /dev/null @@ -1,35 +0,0 @@ -# -# Script commands to be used in proof scripts -# - -de.uka.ilkd.key.macros.scripts.EchoCommand -de.uka.ilkd.key.macros.scripts.MacroCommand -de.uka.ilkd.key.macros.scripts.FocusCommand -de.uka.ilkd.key.macros.scripts.AutoCommand -de.uka.ilkd.key.macros.scripts.CutCommand -de.uka.ilkd.key.macros.scripts.SetCommand -de.uka.ilkd.key.macros.scripts.SetEchoCommand -de.uka.ilkd.key.macros.scripts.SetFailOnClosedCommand -de.uka.ilkd.key.macros.scripts.SMTCommand -de.uka.ilkd.key.macros.scripts.RuleCommand -de.uka.ilkd.key.macros.scripts.ActivateCommand -de.uka.ilkd.key.macros.scripts.LeaveCommand -de.uka.ilkd.key.macros.scripts.TryCloseCommand -de.uka.ilkd.key.macros.scripts.ExitCommand -de.uka.ilkd.key.macros.scripts.InstantiateCommand -de.uka.ilkd.key.macros.scripts.SelectCommand -de.uka.ilkd.key.macros.scripts.ScriptCommand -de.uka.ilkd.key.macros.scripts.LetCommand -de.uka.ilkd.key.macros.scripts.SaveInstCommand -de.uka.ilkd.key.macros.scripts.SaveNewNameCommand -de.uka.ilkd.key.macros.scripts.SchemaVarCommand -de.uka.ilkd.key.macros.scripts.JavascriptCommand -de.uka.ilkd.key.macros.scripts.SkipCommand -de.uka.ilkd.key.macros.scripts.AxiomCommand -de.uka.ilkd.key.macros.scripts.AssumeCommand -# does not exist? # de.uka.ilkd.key.macros.scripts.SettingsCommand -de.uka.ilkd.key.macros.scripts.AssertCommand -de.uka.ilkd.key.macros.scripts.RewriteCommand -de.uka.ilkd.key.macros.scripts.AllCommand -de.uka.ilkd.key.macros.scripts.HideCommand -de.uka.ilkd.key.macros.scripts.UnhideCommand diff --git a/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.scripts.ProofScriptCommand b/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.scripts.ProofScriptCommand new file mode 100644 index 00000000000..ad6e048bebc --- /dev/null +++ b/key.core/src/main/resources/META-INF/services/de.uka.ilkd.key.scripts.ProofScriptCommand @@ -0,0 +1,35 @@ +# +# Script commands to be used in proof scripts +# + +de.uka.ilkd.key.scripts.EchoCommand +de.uka.ilkd.key.scripts.MacroCommand +de.uka.ilkd.key.scripts.FocusCommand +de.uka.ilkd.key.scripts.AutoCommand +de.uka.ilkd.key.scripts.CutCommand +de.uka.ilkd.key.scripts.SetCommand +de.uka.ilkd.key.scripts.SetEchoCommand +de.uka.ilkd.key.scripts.SetFailOnClosedCommand +de.uka.ilkd.key.scripts.SMTCommand +de.uka.ilkd.key.scripts.RuleCommand +de.uka.ilkd.key.scripts.ActivateCommand +de.uka.ilkd.key.scripts.LeaveCommand +de.uka.ilkd.key.scripts.TryCloseCommand +de.uka.ilkd.key.scripts.ExitCommand +de.uka.ilkd.key.scripts.InstantiateCommand +de.uka.ilkd.key.scripts.SelectCommand +de.uka.ilkd.key.scripts.ScriptCommand +de.uka.ilkd.key.scripts.LetCommand +de.uka.ilkd.key.scripts.SaveInstCommand +de.uka.ilkd.key.scripts.SaveNewNameCommand +de.uka.ilkd.key.scripts.SchemaVarCommand +de.uka.ilkd.key.scripts.JavascriptCommand +de.uka.ilkd.key.scripts.SkipCommand +de.uka.ilkd.key.scripts.AxiomCommand +de.uka.ilkd.key.scripts.AssumeCommand +# does not exist? # de.uka.ilkd.key.macros.scripts.SettingsCommand +de.uka.ilkd.key.scripts.AssertCommand +de.uka.ilkd.key.scripts.RewriteCommand +de.uka.ilkd.key.scripts.AllCommand +de.uka.ilkd.key.scripts.HideCommand +de.uka.ilkd.key.scripts.UnhideCommand diff --git a/key.core/src/main/resources/de/uka/ilkd/key/macros/scripts/meta/commands_description.xml b/key.core/src/main/resources/de/uka/ilkd/key/macros/scripts/meta/commands_description.xml deleted file mode 100644 index 5f40816623b..00000000000 --- a/key.core/src/main/resources/de/uka/ilkd/key/macros/scripts/meta/commands_description.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - This is a comment - - - - - - The assume command is an unsound taclet rule and takes one argument: - - The command adds the formula passed as argument to the antecedent - a formula #2 to which the command is applied - - - The AutoCommand invokes the automatic strategy "Auto" - - - * The command object CutCommand has as scriptcommand name "cut" - * As parameters: - * a formula with the id "#2" - - - - - - - - - - - - - - - - *

  • #2 = rule name
  • - *
  • on= key.core.logic.Term on which the rule should be applied to as String (find part of the rule)
  • - *
  • formula= toplevel formula in which term appears in
  • - *
  • occ = occurrence number
  • - *
  • inst_= instantiation
  • - * - ]]> - - - - - - - - instantiate formula="\forall int a; phi(a)" with="a_8" - ]]> - - \ No newline at end of file diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/charListRules.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/charListRules.key index 49d81852178..9d5ed85b0d6 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/charListRules.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/charListRules.key @@ -168,7 +168,7 @@ \varcond(\notFreeIn(iv, l), \notFreeIn(iv, c), \notFreeIn(iv, i)) - \replacewith(\ifExiv; (i >= 0 + \replacewith(\ifEx iv; (i >= 0 & iv >= i & iv < seqLen(l) & int::seqGet(l, iv) = c) @@ -275,7 +275,7 @@ \schemaVar \variables int iv; \find(clIndexOfCl(sourceStr, i, searchStr)) \varcond(\notFreeIn(iv, searchStr), \notFreeIn(iv, sourceStr), \notFreeIn(iv, i)) - \replacewith(\ifExiv; (iv >= i + \replacewith(\ifEx iv; (iv >= i & iv >= 0 & iv + seqLen(searchStr) <= seqLen(sourceStr) & (seqSub(sourceStr, iv, iv + seqLen(searchStr)) = searchStr)) @@ -294,7 +294,7 @@ \schemaVar \variables int iv; \find(clLastIndexOfChar(sourceStr, c, i)) \varcond(\notFreeIn(iv, c), \notFreeIn(iv, i), \notFreeIn(iv, sourceStr)) - \replacewith(\ifExiv; (iv > 0 + \replacewith(\ifEx iv; (iv > 0 & i >= iv & i - iv < seqLen(sourceStr) & int::seqGet(sourceStr, i - iv) = c) @@ -312,7 +312,7 @@ \schemaVar \variables int iv; \find(clLastIndexOfCl(sourceStr, i, searchStr)) \varcond(\notFreeIn(iv, searchStr), \notFreeIn(iv, i), \notFreeIn(iv, sourceStr)) - \replacewith(\ifExiv; (iv > 0 + \replacewith(\ifEx iv; (iv > 0 & i - iv >= 0 & seqLen(searchStr) + i - iv <= seqLen(sourceStr) & (seqSub(sourceStr, i - iv, seqLen(searchStr) + i - iv) = searchStr)) diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ifThenElseRules.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ifThenElseRules.key index bcab149e29a..c1a93f88ba6 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ifThenElseRules.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/ifThenElseRules.key @@ -250,7 +250,7 @@ \sameUpdateLevel \varcond(\notFreeIn(intVar, intValue)) \replacewith({\subst intVar; intValue}then); - \replacewith(\ifExintVar; (phi)\then(then)\else(else)) + \replacewith(\ifEx intVar; (phi)\then(then)\else(else)) \add( ==> {\subst intVar; intValue}phi & \forall intVar; (phi -> wellOrderLeqInt(intValue, intVar))) }; @@ -281,7 +281,7 @@ \sameUpdateLevel \varcond(\notFreeIn(intVar, intValue)) \replacewith({\subst intVar; intValue}b); - \replacewith(\ifExintVar; (phi)\then(b)\else(c)) + \replacewith(\ifEx intVar; (phi)\then(b)\else(c)) \add( ==> {\subst intVar; intValue}phi & \forall intVar; (phi -> wellOrderLeqInt(intValue, intVar))) \displayname "ifExthenelse1_solve" diff --git a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/wdFormulaRules.key b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/wdFormulaRules.key index b9e3bb6048a..93d0a6355b6 100644 --- a/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/wdFormulaRules.key +++ b/key.core/src/main/resources/de/uka/ilkd/key/proof/rules/wdFormulaRules.key @@ -127,7 +127,7 @@ wd_Logical_Op_ExCond_Expr { \find( - wd(\ifExj; (a)\then(s)\else(t)) + wd(\ifEx j; (a) \then(s) \else(t)) ) \varcond( \notFreeIn(j, t) @@ -142,7 +142,7 @@ wd_Logical_Op_ExCond_Form { \find( - WD(\ifExj; (a)\then(b)\else(c)) + WD(\ifEx j; (a)\then(b)\else(c)) ) \varcond( \notFreeIn(j, c) @@ -259,7 +259,7 @@ wd_Logical_Op_ExCond_Expr { \find( - wd(\ifExj; (a)\then(s)\else(t)) + wd(\ifEx j; (a)\then(s)\else(t)) ) \varcond( \notFreeIn(j, t), @@ -278,7 +278,7 @@ wd_Logical_Op_ExCond_Form { \find( - WD(\ifExj; (a)\then(b)\else(c)) + WD(\ifEx j; (a)\then(b)\else(c)) ) \varcond( \notFreeIn(j, c), @@ -465,7 +465,7 @@ wd_Logical_Op_ExCond_Expr { \find( - wd(\ifExj; (a)\then(s)\else(t)) + wd(\ifEx j; (a)\then(s)\else(t)) ) \varcond( \notFreeIn(j, t), @@ -484,7 +484,7 @@ wd_T_Logical_Op_ExCond_Form { \find( - T(\ifExj; (a)\then(b)\else(c)) + T(\ifEx j; (a)\then(b)\else(c)) ) \varcond( \notFreeIn(j, c), @@ -503,7 +503,7 @@ wd_F_Logical_Op_ExCond_Form { \find( - F(\ifExj; (a)\then(b)\else(c)) + F(\ifEx j; (a)\then(b)\else(c)) ) \varcond( \notFreeIn(j, c), diff --git a/key.core/src/test/java/de/uka/ilkd/key/logic/TestLocalSymbols.java b/key.core/src/test/java/de/uka/ilkd/key/logic/TestLocalSymbols.java index 69234d167b4..adb37b43ecb 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/logic/TestLocalSymbols.java +++ b/key.core/src/test/java/de/uka/ilkd/key/logic/TestLocalSymbols.java @@ -7,11 +7,8 @@ import java.util.Set; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.java.Position; import de.uka.ilkd.key.java.Services; import de.uka.ilkd.key.macros.AbstractPropositionalExpansionMacro; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.parser.Location; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.init.JavaProfile; @@ -19,6 +16,7 @@ import de.uka.ilkd.key.rule.NoPosTacletApp; import de.uka.ilkd.key.rule.TacletApp; import de.uka.ilkd.key.rule.TacletForTests; +import de.uka.ilkd.key.scripts.ProofScriptEngine; import de.uka.ilkd.key.util.HelperClassForTests; import org.key_project.util.collection.ImmutableList; @@ -124,13 +122,17 @@ public void testSkolemization() throws Exception { // there was a bug. @Test public void testDoubleInstantiation() throws Exception { + File proofFile = new File(TEST_RESOURCES_DIR_PREFIX, "doubleSkolem.key"); + Assertions.assertTrue(proofFile.exists(), "Proof file does not exist" + proofFile); + + KeYEnvironment env = KeYEnvironment.load( + JavaProfile.getDefaultInstance(), proofFile, null, null, + null, true); - KeYEnvironment env = loadProof("doubleSkolem.key"); Proof proof = env.getLoadedProof(); - String script = env.getProofScript().script(); + var script = env.getProofScript(); - ProofScriptEngine pse = - new ProofScriptEngine(script, new Location(null, Position.newOneBased(1, 1))); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(null, proof); ImmutableList openGoals = proof.openGoals(); diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/proverules/ProveRulesTest.java b/key.core/src/test/java/de/uka/ilkd/key/proof/proverules/ProveRulesTest.java index c71823dc978..ee65a9fc6bb 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/proverules/ProveRulesTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/proverules/ProveRulesTest.java @@ -9,12 +9,13 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.init.Profile; import de.uka.ilkd.key.proof.io.ProblemLoaderException; import de.uka.ilkd.key.proof.mgt.LemmaJustification; import de.uka.ilkd.key.rule.Taclet; +import de.uka.ilkd.key.scripts.ProofScriptEngine; import de.uka.ilkd.key.util.HelperClassForTests; import de.uka.ilkd.key.util.LinkedHashMap; @@ -66,9 +67,9 @@ public void loadTacletProof(String tacletName, Taclet taclet, File proofFile) th KeYEnvironment env = KeYEnvironment.load(proofFile); Proof proof = env.getLoadedProof(); - var script = env.getProofScript(); + KeyAst.ProofScript script = env.getProofScript(); if (script != null) { - ProofScriptEngine pse = new ProofScriptEngine(script.script(), script.location()); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(env.getUi(), proof); } @@ -140,9 +141,11 @@ public Stream data() throws ProblemLoaderException { * Create list of constructor parameters containig one entry for each taclet name. (that * means there will be one test case for each taclet) */ - return tacletNames.stream().map( - tacletName -> DynamicTest.dynamicTest(tacletName, () -> loadTacletProof(tacletName, - tacletObjectByTacletName.get(tacletName), proofFileByTacletName.get(tacletName)))); + return tacletNames.stream() + .map(tacletName -> DynamicTest.dynamicTest(tacletName, + () -> loadTacletProof(tacletName, + tacletObjectByTacletName.get(tacletName), + proofFileByTacletName.get(tacletName)))); } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/GenerateUnitTests.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/GenerateUnitTests.java index b8dbbaf79b3..2f215633bb2 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/GenerateUnitTests.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/GenerateUnitTests.java @@ -116,12 +116,15 @@ private static void createUnitClass(RunAllProofsTestUnit unit) Map vars = new TreeMap<>(); vars.put("className", className); vars.put("packageName", packageName); - vars.put("baseDirectory", settings.getBaseDirectory().getAbsolutePath()); + vars.put("baseDirectory", settings.getBaseDirectory().getAbsolutePath() + .replaceAll("\\\\", "/")); vars.put("statisticsFile", - settings.getStatisticsFile().getStatisticsFile().getAbsolutePath()); + settings.getStatisticsFile().getStatisticsFile().getAbsolutePath() + .replaceAll("\\\\", "/")); vars.put("name", name); vars.put("reloadEnabled", String.valueOf(settings.reloadEnabled())); - vars.put("tempDir", settings.getTempDir().getAbsolutePath()); + vars.put("tempDir", settings.getTempDir().getAbsolutePath() + .replaceAll("\\\\", "/")); vars.put("globalSettings", settings.getGlobalKeYSettings().replace("\n", "\\n")); vars.put("localSettings", @@ -164,13 +167,13 @@ private static void createUnitClass(RunAllProofsTestUnit unit) switch (file.getTestProperty()) { case PROVABLE -> methods.append("assertProvability(\"") - .append(keyFile.getAbsolutePath()).append("\");"); + .append(keyFile.getAbsolutePath().replaceAll("\\\\", "/")).append("\");"); case NOTPROVABLE -> methods.append("assertUnProvability(\"") - .append(keyFile.getAbsolutePath()).append("\");"); + .append(keyFile.getAbsolutePath().replaceAll("\\\\", "/")).append("\");"); case LOADABLE -> methods.append("assertLoadability(\"") - .append(keyFile.getAbsolutePath()).append("\");"); + .append(keyFile.getAbsolutePath().replaceAll("\\\\", "/")).append("\");"); case NOTLOADABLE -> methods.append("assertUnLoadability(\"") - .append(keyFile.getAbsolutePath()).append("\");"); + .append(keyFile.getAbsolutePath().replaceAll("\\\\", "/")).append("\");"); } methods.append("}"); } diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProveTest.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProveTest.java index 87d614a794b..29a6ce14602 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProveTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProveTest.java @@ -9,14 +9,14 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.nparser.ProofScriptEntry; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.io.AbstractProblemLoader; import de.uka.ilkd.key.proof.io.ProblemLoaderException; import de.uka.ilkd.key.proof.io.ProofSaver; import de.uka.ilkd.key.proof.runallproofs.proofcollection.StatisticsFile; import de.uka.ilkd.key.proof.runallproofs.proofcollection.TestProperty; +import de.uka.ilkd.key.scripts.ProofScriptEngine; import de.uka.ilkd.key.settings.ProofSettings; import org.key_project.util.collection.Pair; @@ -103,12 +103,10 @@ private void runKey(String file, TestProperty testProperty) throws Exception { try { LOGGER.info("({}) Start proving", caseId); // Initialize KeY environment and load proof. - Pair, ProofScriptEntry> pair = - load(keyFile); + var pair = load(keyFile); LOGGER.info("({}) Proving done", caseId); - env = pair.first; - ProofScriptEntry script = pair.second; + var script = pair.second; loadedProof = env.getLoadedProof(); AbstractProblemLoader.ReplayResult replayResult = env.getReplayResult(); @@ -182,14 +180,14 @@ private void reload(File proofFile, Proof loadedProof) throws Exception { * want to use a different strategy. */ private void autoMode(KeYEnvironment env, Proof loadedProof, - ProofScriptEntry script) throws Exception { + KeyAst.ProofScript script) throws Exception { // Run KeY prover. if (script == null) { // auto mode env.getProofControl().startAndWaitForAutoMode(loadedProof); } else { // ... script - ProofScriptEngine pse = new ProofScriptEngine(script.script(), script.location()); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(env.getUi(), env.getLoadedProof()); } } @@ -197,8 +195,8 @@ private void autoMode(KeYEnvironment env, Proof loa /* * has resemblances with KeYEnvironment.load ... */ - private Pair, ProofScriptEntry> load( - File keyFile) throws ProblemLoaderException { + private Pair, KeyAst.ProofScript> load(File keyFile) + throws ProblemLoaderException { KeYEnvironment env = KeYEnvironment.load(keyFile); return new Pair<>(env, env.getProofScript()); } diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/performance/DataRecordingTestFile.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/performance/DataRecordingTestFile.java index a3d76205930..2c6a0261c2d 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/performance/DataRecordingTestFile.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/performance/DataRecordingTestFile.java @@ -8,7 +8,7 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.nparser.ProofScriptEntry; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.runallproofs.proofcollection.ProofCollectionSettings; import de.uka.ilkd.key.proof.runallproofs.proofcollection.TestFile; @@ -28,7 +28,7 @@ public DataRecordingTestFile(TestProperty testProperty, String path, @Override protected void autoMode(KeYEnvironment env, Proof loadedProof, - ProofScriptEntry script) throws Exception { + KeyAst.ProofScript script) throws Exception { // Run KeY prover. if (script == null) { DataRecordingStrategy strategy = new DataRecordingStrategy(loadedProof, this); diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/proofcollection/TestFile.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/proofcollection/TestFile.java index af762f4e45a..8880bea0ac9 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/proofcollection/TestFile.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/proofcollection/TestFile.java @@ -12,14 +12,14 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.nparser.ProofScriptEntry; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.io.AbstractProblemLoader.ReplayResult; import de.uka.ilkd.key.proof.io.ProblemLoaderException; import de.uka.ilkd.key.proof.io.ProofSaver; import de.uka.ilkd.key.proof.runallproofs.RunAllProofsTest; import de.uka.ilkd.key.proof.runallproofs.TestResult; +import de.uka.ilkd.key.scripts.ProofScriptEngine; import de.uka.ilkd.key.settings.ProofSettings; import org.key_project.util.collection.Pair; @@ -163,7 +163,7 @@ public TestResult runKey() throws Exception { // Initialize KeY environment and load proof. var pair = load(keyFile); env = pair.first; - ProofScriptEntry script = pair.second; + var script = pair.second; loadedProof = env.getLoadedProof(); ReplayResult replayResult; @@ -262,14 +262,14 @@ protected void reload(boolean verbose, File proofFile, Proof loadedProof, boolea * want to use a different strategy. */ protected void autoMode(KeYEnvironment env, Proof loadedProof, - ProofScriptEntry script) throws Exception { + KeyAst.ProofScript script) throws Exception { // Run KeY prover. if (script == null) { // auto mode env.getProofControl().startAndWaitForAutoMode(loadedProof); } else { // ... script - ProofScriptEngine pse = new ProofScriptEngine(script.script(), script.location()); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(env.getUi(), env.getLoadedProof()); } } @@ -277,8 +277,8 @@ protected void autoMode(KeYEnvironment env, Proof l /* * has resemblances with KeYEnvironment.load ... */ - private Pair, ProofScriptEntry> load( - File keyFile) throws ProblemLoaderException { + private Pair, KeyAst.ProofScript> load(File keyFile) + throws ProblemLoaderException { KeYEnvironment env = KeYEnvironment.load(keyFile); return new Pair<>(env, env.getProofScript()); } diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/FocusCommandTest.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/FocusCommandTest.java similarity index 68% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/FocusCommandTest.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/FocusCommandTest.java index 5e2225a062e..ba455e97c51 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/FocusCommandTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/FocusCommandTest.java @@ -1,15 +1,14 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.nio.file.Files; import java.nio.file.Path; import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.java.Position; -import de.uka.ilkd.key.parser.Location; +import de.uka.ilkd.key.nparser.ParsingFacade; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.io.ProofSaver; @@ -26,13 +25,14 @@ public class FocusCommandTest { @Test public void testSimpleSelection() throws Exception { Path temp = Files.createTempFile("key-focus-command", ".key"); - Files.writeString(temp, "\\functions { int i; } \\problem { i=1&i=2 -> i=3|i=4 }" + - "\\proofScript \"prop-simp; \""); + Files.writeString(temp, """ + \\functions { int i; } \\problem { i=1&i=2 -> i=3|i=4 }\ + \\proofScript { macro "prop-simp"; } + """); KeYEnvironment env = KeYEnvironment.load(temp.toFile()); Proof p = env.getLoadedProof(); - ProofScriptEngine pse = new ProofScriptEngine( - "macro 'nosplit-prop'; focus 'i=1 ==> i = 4';", - new Location(null, Position.newOneBased(1, 1))); + var script = ParsingFacade.parseScript("macro \"nosplit-prop\"; focus (i=1 ==> i = 4);"); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(env.getUi(), p); assertEquals(1, p.openGoals().size()); @@ -45,15 +45,15 @@ public void testSimpleSelection() throws Exception { public void testSelectionWithLabels() throws Exception { Path temp = Files.createTempFile("key-focus-command", ".key"); Files.writeString(temp, - "\\functions { int i; } \\problem { i=1<> -> i=(3< (implicit)\", \"[]\")>>) }" - + - "\\proofScript \"prop-simp; \""); + """ + \\functions { int i; } \\problem { i=1<> -> i=(3< (implicit)", "[]")>>) }\ + \\proofScript { macro "prop-simp"; } + """); KeYEnvironment env = KeYEnvironment.load(temp.toFile()); Proof p = env.getLoadedProof(); - ProofScriptEngine pse = new ProofScriptEngine( - "macro 'nosplit-prop'; focus 'i=1 ==> i = 3';", - new Location(null, Position.newOneBased(1, 1))); + var script = ParsingFacade.parseScript("macro \"nosplit-prop\"; focus (i=1 ==> i = 3);"); + ProofScriptEngine pse = new ProofScriptEngine(script); pse.execute(env.getUi(), p); assertEquals(1, p.openGoals().size()); diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/SMTCommandTest.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/SMTCommandTest.java similarity index 83% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/SMTCommandTest.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/SMTCommandTest.java index bd0c27e8b3a..bdadefa6330 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/SMTCommandTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/SMTCommandTest.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.util.HashMap; @@ -15,11 +15,11 @@ public class SMTCommandTest { @Test public void testInstantiation() throws Exception { - HashMap args = new HashMap<>(); + HashMap args = new HashMap<>(); args.put("solver", "z3"); SMTCommand cmd = new SMTCommand(); - SMTCommand.SMTCommandArguments o = cmd.evaluateArguments(new EngineState(null), args); + SMTCommand.SMTCommandArguments o = cmd.evaluateArguments(new EngineState(null, null), args); Assertions.assertEquals("z3", o.solver); } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/ScriptLineParserTest.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/ScriptLineParserTest.java similarity index 96% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/ScriptLineParserTest.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/ScriptLineParserTest.java index 2a29eaf008a..553c9020f11 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/ScriptLineParserTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/ScriptLineParserTest.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.io.StringReader; diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/TestProofScriptCommand.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/TestProofScriptCommand.java similarity index 82% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/TestProofScriptCommand.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/TestProofScriptCommand.java index 23b409533c3..3b50efd649d 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/TestProofScriptCommand.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/TestProofScriptCommand.java @@ -1,7 +1,7 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts; +package de.uka.ilkd.key.scripts; import java.io.BufferedReader; import java.io.FileNotFoundException; @@ -17,8 +17,7 @@ import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.java.Position; -import de.uka.ilkd.key.parser.Location; +import de.uka.ilkd.key.nparser.ParsingFacade; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.smt.newsmt2.MasterHandlerTest; @@ -72,16 +71,19 @@ void testProofScript(String name, Path path) throws Exception { Proof proof = env.getLoadedProof(); - String script = props.get("script"); - ProofScriptEngine pse = - new ProofScriptEngine(script, - new Location(path.toUri(), Position.newOneBased(1, 1))); + var script = ParsingFacade.parseScript(props.get("script")); + ProofScriptEngine pse = new ProofScriptEngine(script); try { pse.execute(env.getUi(), proof); - } catch (Exception ex) { - assertTrue(props.containsKey("exception"), "unexpected exception"); - Assertions.assertEquals(ex.getMessage(), props.get("exception").trim()); + } catch (ScriptException ex) { + assertTrue(props.containsKey("exception"), + "An exception was not expected, but got " + ex.getMessage()); + // weigl: fix spurious error on Windows machine due to different file endings. + String msg = ex.getMessage().trim().replaceAll("\r\n", "\n"); + Assertions.assertTrue(msg.startsWith(props.get("exception").trim()), + "Unexpected exception: " + ex.getMessage() + "\n expected: " + + props.get("exception").trim()); return; } diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/RewriteTest.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/meta/RewriteTest.java similarity index 79% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/RewriteTest.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/meta/RewriteTest.java index bc733ab5a62..d81a888274b 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/RewriteTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/meta/RewriteTest.java @@ -1,17 +1,19 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.io.File; import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; import de.uka.ilkd.key.control.DefaultUserInterfaceControl; import de.uka.ilkd.key.control.KeYEnvironment; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.macros.scripts.ScriptException; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.io.ProblemLoaderException; +import de.uka.ilkd.key.scripts.ProofScriptEngine; +import de.uka.ilkd.key.scripts.ScriptException; import de.uka.ilkd.key.util.HelperClassForTests; import org.junit.jupiter.api.Test; @@ -29,12 +31,12 @@ public class RewriteTest { @Test public void testTransitive() throws IOException, ScriptException, InterruptedException, ProblemLoaderException { - File script = - new File(HelperClassForTests.TESTCASE_DIRECTORY, "scriptCommands/rewrite.script"); + Path script = HelperClassForTests.TESTCASE_DIRECTORY.toPath() + .resolve("scriptCommands/rewrite.script"); File keyFile = new File(HelperClassForTests.TESTCASE_DIRECTORY, "scriptCommands/transitive.key"); - assumeTrue(script.exists(), "Required script file not found: " + script); + assumeTrue(Files.exists(script), "Required script file not found: " + script); assumeTrue(keyFile.exists(), "Required KeY file not found: " + keyFile); KeYEnvironment env = KeYEnvironment.load(keyFile); @@ -47,6 +49,7 @@ public void testTransitive() String firstOpenGoal = p.openGoals().head().sequent().toString(); String expectedSequent = "[equals(x,f),equals(x,z)]==>[equals(z,f)]"; + System.out.println(p); assertEquals(expectedSequent, firstOpenGoal); } @@ -57,12 +60,12 @@ public void testTransitive() @Test public void testLessTransitive() throws IOException, ScriptException, InterruptedException, ProblemLoaderException { - File script = - new File(HelperClassForTests.TESTCASE_DIRECTORY, "scriptCommands/lesstrans.script"); + Path script = HelperClassForTests.TESTCASE_DIRECTORY.toPath() + .resolve("scriptCommands/lesstrans.script"); File keyFile = new File(HelperClassForTests.TESTCASE_DIRECTORY, "scriptCommands/less_trans.key"); - assumeTrue(script.exists(), "Required script file not found: " + script); + assumeTrue(Files.exists(script), "Required script file not found: " + script); assumeTrue(keyFile.exists(), "Required KeY file not found: " + keyFile); KeYEnvironment env = KeYEnvironment.load(keyFile); diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java b/key.core/src/test/java/de/uka/ilkd/key/scripts/meta/ValueInjectorTest.java similarity index 84% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java rename to key.core/src/test/java/de/uka/ilkd/key/scripts/meta/ValueInjectorTest.java index f202819f2ba..4c310560826 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/ValueInjectorTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/scripts/meta/ValueInjectorTest.java @@ -1,16 +1,16 @@ /* This file is part of KeY - https://key-project.org * KeY is licensed under the GNU General Public License Version 2 * SPDX-License-Identifier: GPL-2.0-only */ -package de.uka.ilkd.key.macros.scripts.meta; +package de.uka.ilkd.key.scripts.meta; import java.util.HashMap; import java.util.List; import java.util.Map; import de.uka.ilkd.key.control.AbstractUserInterfaceControl; -import de.uka.ilkd.key.macros.scripts.AbstractCommand; -import de.uka.ilkd.key.macros.scripts.EngineState; -import de.uka.ilkd.key.macros.scripts.ScriptException; +import de.uka.ilkd.key.scripts.AbstractCommand; +import de.uka.ilkd.key.scripts.EngineState; +import de.uka.ilkd.key.scripts.ScriptException; import org.junit.jupiter.api.Test; @@ -24,12 +24,12 @@ public class ValueInjectorTest { @Test public void testInjectionSimple() throws Exception { PP pp = new PP(); - Map args = new HashMap<>(); - args.put("b", "true"); - args.put("i", "42"); + Map args = new HashMap<>(); + args.put("b", true); + args.put("i", 42); args.put("s", "blubb"); - ValueInjector.injection(null, pp, args); + ValueInjector.injection(new PPCommand(), pp, args); assertTrue(pp.b); assertEquals(42, pp.i); @@ -40,7 +40,7 @@ public void testInjectionSimple() throws Exception { @Test public void testRequired() { PP pp = new PP(); - Map args = new HashMap<>(); + Map args = new HashMap<>(); args.put("b", "true"); args.put("s", "blubb"); assertThrows(ArgumentRequiredException.class, @@ -81,7 +81,7 @@ public void testInferScriptArguments() throws NoSuchFieldException { public static class PP { @Option("b") boolean b; - @Option(value = "i", required = true) + @Option(value = "i") int i; @Option(value = "s", required = false) String s; @@ -93,7 +93,7 @@ public PPCommand() { } @Override - public PP evaluateArguments(EngineState state, Map arguments) { + public PP evaluateArguments(EngineState state, Map arguments) { return null; } diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/andRight.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/andRight.props similarity index 100% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/andRight.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/andRight.props diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.exc.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.exc.props similarity index 80% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.exc.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.exc.props index c5d0c3f7111..d36783e2dcc 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.exc.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.exc.props @@ -6,11 +6,11 @@ ### script -macro split-prop; +macro "split-prop"; hide "b ==>"; ### exception Error while executing script: This formula is not on the sequent: b -Command: hide "b ==>" \ No newline at end of file +Command: hide "b ==>"; \ No newline at end of file diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.props similarity index 88% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.props index 92608db46b7..2028fe1a02f 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/hide.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/hide.props @@ -6,7 +6,7 @@ ### script -macro split-prop; +macro "split-prop"; hide "a ==> d, e"; ### goals diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/rule.exc.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/rule.exc.props similarity index 87% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/rule.exc.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/rule.exc.props index 3b74aa51305..12c04eb8f21 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/rule.exc.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/rule.exc.props @@ -11,4 +11,4 @@ rule andLeft; Error while executing script: No matching applications. -Command: rule andLeft \ No newline at end of file +Command: rule andLeft; \ No newline at end of file diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/selectFormula.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/selectFormula.props similarity index 86% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/selectFormula.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/selectFormula.props index b6d6b1f1283..58b42b1770c 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/selectFormula.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/selectFormula.props @@ -6,7 +6,7 @@ ### script -macro split-prop; +macro "split-prop"; select formula="b"; ### goals diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide.props similarity index 63% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide.props index cd737edebf1..cbb6fbe7410 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide.props @@ -5,9 +5,9 @@ ### script rule impRight; -hide '2=3 ==> 3=4'; -unhide '2=3 ==>'; -unhide '==> 3=4'; +hide "2=3 ==> 3=4"; +unhide "2=3 ==>"; +unhide "==> 3=4"; ### goals diff --git a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide2.props b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide2.props similarity index 71% rename from key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide2.props rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide2.props index 63334562432..41953ad5fd9 100644 --- a/key.core/src/test/resources/de/uka/ilkd/key/macros/scripts/cases/unhide2.props +++ b/key.core/src/test/resources/de/uka/ilkd/key/scripts/cases/unhide2.props @@ -5,8 +5,8 @@ ### script rule impRight; -hide '2=3 ==> 3=4'; -unhide '2=3 ==> 3=4'; +hide "2=3 ==> 3=4"; +unhide "2=3 ==> 3=4"; ### goals diff --git a/key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/lesstrans.script b/key.core/src/test/resources/de/uka/ilkd/key/scripts/lesstrans.script similarity index 100% rename from key.core/src/test/java/de/uka/ilkd/key/macros/scripts/meta/lesstrans.script rename to key.core/src/test/resources/de/uka/ilkd/key/scripts/lesstrans.script diff --git a/key.core/src/test/resources/testcase/localSymbols/doubleSkolem.key b/key.core/src/test/resources/testcase/localSymbols/doubleSkolem.key index 13de0c6ffa1..53307224597 100644 --- a/key.core/src/test/resources/testcase/localSymbols/doubleSkolem.key +++ b/key.core/src/test/resources/testcase/localSymbols/doubleSkolem.key @@ -1,8 +1,8 @@ \problem { \forall int i; i > 0 | \forall int i; i < 0 } -\proofScript " +\proofScript { rule orRight; - rule allRight formula='\forall int i; i > 0'; - rule allRight formula='\forall int i; i < 0'; -" + rule allRight formula=(\forall int i; i > 0); + rule allRight formula=(\forall int i; i < 0); +} \ No newline at end of file diff --git a/key.core/tacletProofs/seqPerm2/Taclet_schiffl_lemma_2.proof b/key.core/tacletProofs/seqPerm2/Taclet_schiffl_lemma_2.proof index f3e76838eb8..bef3d72c971 100644 --- a/key.core/tacletProofs/seqPerm2/Taclet_schiffl_lemma_2.proof +++ b/key.core/tacletProofs/seqPerm2/Taclet_schiffl_lemma_2.proof @@ -44,88 +44,88 @@ "class": "de.uka.ilkd.key.taclettranslation.lemma.TacletProofObligationInput", } -\proofScript " -macro split-prop; +\proofScript { +macro "split-prop"; rule allRight; rule allRight; -macro split-prop; -rule 'seqPermDefLeft'; -rule 'andLeft'; -rule 'exLeft'; -macro split-prop; -# the following equations are useful in many case. +macro "split-prop"; +rule "seqPermDefLeft"; +rule "andLeft"; +rule "exLeft"; +macro "split-prop"; +// the following equations are useful in many case. rule seqNPermRange; -instantiate var=iv with='v_x_0' occ=1; +instantiate var=iv with=(v_x_0) occ=1; rule impLeft; tryclose branch; rule andLeft; rule andLeft; -# 1. triple of equations -instantiate var=iv with='v_y_0' occ=1; +// 1. triple of equations +instantiate var=iv with=(v_y_0) occ=1; rule impLeft; tryclose branch; rule andLeft; rule andLeft; -# 2. triple of equations +// 2. triple of equations rule seqNPermDefLeft; -instantiate var=iv with='v_x_0' occ=2; +instantiate var=iv with=(v_x_0) occ=2; rule impLeft; -tryclose branch; +tryclose branch; rule exLeft; rule andLeft; rule andLeft; -# 3. triple of equations -instantiate hide var=iv with='v_y_0' occ=2; +// 3. triple of equations +instantiate hide var=iv with=(v_y_0) occ=2; rule impLeft; -tryclose branch; +tryclose branch; rule exLeft; rule andLeft; rule andLeft; -# 4. triple of equations -instantiate var=iv with='jv_0' occ=1; +// 4. triple of equations +instantiate var=iv with=(jv_0) occ=1; rule impLeft; tryclose branch; rule andLeft; rule andLeft; -rule castAdd formula='s_0[jv_0] = v_x_0' occ=0; -# 5. set of equations -instantiate hide var=iv with='jv_1' occ=1; +rule castAdd formula=(s_0[jv_0] = v_x_0) occ=0; +// 5. set of equations +instantiate hide var=iv with=(jv_1) occ=1; rule impLeft; tryclose branch; rule andLeft; rule andLeft; -rule castAdd formula='s_0[jv_1] = v_y_0' occ=0; -# 6. set of equations -instantiate var=iv with='v_x_0'; +rule castAdd formula=(s_0[jv_1] = v_y_0) occ=0; +// 6. set of equations +instantiate var=iv with=(v_x_0); rule impLeft; tryclose branch; -# 7. equation -instantiate var=iv with='v_y_0'; +// 7. equation +instantiate var=iv with=(v_y_0); rule impLeft; tryclose branch; -# 8. equation -cut 'v_x_0 = v_y_0'; -# This corresponds to case A in the Notes. -instantiate hide var='v_r' with='seqSwap(s_0,v_x_0,jv_0)'; -# in the following r refers to this instantion +// 8. equation +cut (v_x_0 = v_y_0); +// This corresponds to case A in the Notes. +instantiate hide var="v_r" with=(seqSwap(s_0,v_x_0,jv_0)); +// in the following r refers to this instantiation rule andRight; rule andRight; rule andRight; rule andRight; rule lenOfSwap; tryclose branch; -# established: r is of correct length +// established: r is of correct length rule seqNPermSwapNPerm; -instantiate hide var='iv' with='v_x_0' occ=1; -instantiate hide var='jv' with='jv_0'; +instantiate hide var="iv" with=(v_x_0) occ=1; +instantiate hide var="jv" with=(jv_0); rule impLeft; tryclose branch; tryclose branch; -# established: r is permutation +// established: r is permutation rule allRight; rule impRight; rule andLeft; -instantiate var=iv with='v_iv_0'; +instantiate var="iv" with=(v_iv_0); rule impLeft; tryclose branch; rule getOfSwap; @@ -140,7 +140,7 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: witness property of r +// established: witness property of r rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; @@ -151,7 +151,7 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: r fixes v_x_0 +// established: r fixes v_x_0 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; @@ -162,35 +162,35 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: r fixes v_y_0 -# from now on v_x_0 != v_y_0 -cut '(int)s_0[v_x_0] = (int)s_0[v_y_0]'; +// established: r fixes v_y_0 +// from now on v_x_0 != v_y_0 +cut ((int)s_0[v_x_0]=(int)s_0[v_y_0]); rule seqNPermInjective; -instantiate hide var=iv with='v_x_0'; -instantiate hide var=jv with='v_y_0'; +instantiate hide var=iv with=(v_x_0); +instantiate hide var=jv with=(v_y_0); rule impLeft; tryclose branch; tryclose branch; -## from now on s_0[v_x_0] != v_x_0 -cut '(int)s_0[v_x_0] = v_x_0'; -# This corresponds to case B1 & B2 in the Notes. -instantiate hide var=v_r with='seqSwap(s_0,v_y_0,jv_1)'; -# in the following r1 refers to this instantion +// from now on s_0[v_x_0] != v_x_0 +cut ((int)s_0[v_x_0] = v_x_0); +// This corresponds to case B1 & B2 in the Notes. +instantiate hide var=v_r with=(seqSwap(s_0,v_y_0,jv_1)); +// in the following r1 refers to this instantion rule andRight; rule andRight; rule andRight; rule andRight; tryclose branch; -# established: r1 is of the correct length +// established: r1 is of the correct length rule seqNPermSwapNPerm; -instantiate hide var=iv with='v_y_0'; -instantiate hide var=jv with='jv_1'; +instantiate hide var=iv with=(v_y_0); +instantiate hide var=jv with=(jv_1); tryclose branch; -# established: r1 is permutation +// established: r1 is permutation rule allRight; rule impRight; rule andLeft; -instantiate var=iv with='v_iv_0'; +instantiate var=iv with=(v_iv_0); rule impLeft; tryclose branch; rule getOfSwap; @@ -203,43 +203,43 @@ rule ifthenelse_split occ=0; tryclose branch; rule ifthenelse_split occ=0; tryclose branch; -instantiate var=iv with='v_y_0'; +instantiate var=iv with=(v_y_0); rule impLeft; tryclose branch; tryclose branch; tryclose branch; tryclose branch; -# established: witness property for r1 +// established: witness property for r1 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; tryclose branch; tryclose branch; -# established: r1 fixes v_x_0 +// established: r1 fixes v_x_0 tryclose branch; -# established: r1 fixes v_y_0 -# from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 -cut '(int)s_0[v_y_0] = v_y_0'; -# This corresponds to case B3 in the Notes. -instantiate hide var=v_r with='seqSwap(s_0,v_x_0,jv_0)'; -# in the following r2 refers to this instantion +// established: r1 fixes v_y_0 +// from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 +cut ((int)s_0[v_y_0] = v_y_0); +// This corresponds to case B3 in the Notes. +instantiate hide var=v_r with=(seqSwap(s_0,v_x_0,jv_0)); +// in the following r2 refers to this instantion rule andRight; rule andRight; rule andRight; rule andRight; tryclose branch; -# established: r2 is of the correct length +// established: r2 is of the correct length rule seqNPermSwapNPerm; -instantiate hide var=iv with='v_x_0'; -instantiate hide var=jv with='jv_0'; +instantiate hide var=iv with=(v_x_0); +instantiate hide var=jv with=(jv_0); rule impLeft; tryclose branch; tryclose branch; -# established: r2 is permutation +// established: r2 is permutation rule allRight; rule impRight; rule andLeft; -instantiate var=iv with='v_iv_0'; +instantiate var=iv with=(v_iv_0); rule impLeft; tryclose branch; rule getOfSwap; @@ -254,51 +254,51 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: witness property for r2 +// established: witness property for r2 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; tryclose branch; tryclose branch; -# established: r2 fixes v_x_0 +// established: r2 fixes v_x_0 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; tryclose branch; tryclose branch; -# established: r2 fixes v_y_0 -# from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and s_0[v_y_0]!= v_y_0 -cut '(int)s_0[v_x_0]=v_y_0'; -# This corresponds to case B4i & B4iii in the Notes. -instantiate hide var=v_r with='seqSwap(seqSwap(s_0,jv_0,v_x_0),jv_0,v_y_0)'; -# in the following r3 refers to this instantion +// established: r2 fixes v_y_0 +// from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and s_0[v_y_0]!= v_y_0 +cut ((int)s_0[v_x_0]=v_y_0); +// This corresponds to case B4i & B4iii in the Notes. +instantiate hide var=v_r with=(seqSwap(seqSwap(s_0,jv_0,v_x_0),jv_0,v_y_0)); +// in the following r3 refers to this instantion rule andRight; rule andRight; rule andRight; rule andRight; tryclose branch; -# established: r3 is of the correct length +// established: r3 is of the correct length rule seqNPermSwapNPerm; -instantiate hide var=iv with='jv_0'; -instantiate hide var=jv with='v_x_0'; +instantiate hide var=iv with=(jv_0); +instantiate hide var=jv with=(v_x_0); rule impLeft; tryclose branch; -rule seqNPermSwapNPerm formula='seqNPerm(seqSwap(s_0, jv_0, v_x_0))'; -instantiate hide var=iv with='jv_0'; -instantiate hide var=jv with='v_y_0'; +rule seqNPermSwapNPerm formula=(seqNPerm(seqSwap(s_0, jv_0, v_x_0))); +instantiate hide var=iv with=(jv_0); +instantiate hide var=jv with=(v_y_0); rule impLeft; tryclose branch; tryclose branch; -# established: r3 is permutation +// established: r3 is permutation rule allRight; rule impRight; rule andLeft; -# start: providing equation for latter use -# in many case distinctions -instantiate var=iv with='v_iv_0'; +// start: providing equation for latter use +// in many case distinctions +instantiate var=iv with=(v_iv_0); rule impLeft; tryclose branch; -# end: providing equation for latter use +// end: providing equation for latter use rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; @@ -318,7 +318,7 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: case v_iv_3=jv_0 in the unravelling of r3 +// established: case v_iv_3=jv_0 in the unravelling of r3 rule ifthenelse_split; rule getOfSwap; rule ifthenelse_negated; @@ -330,7 +330,7 @@ rule ifthenelse_split occ=0; tryclose branch; tryclose branch; tryclose branch; -# established: case v_iv_3=v_y_0 in the unravelling of r3 +// established: case v_iv_3=v_y_0 in the unravelling of r3 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; @@ -344,7 +344,7 @@ tryclose branch; tryclose branch; tryclose branch; tryclose branch; -# established: witness property for r3 +// established: witness property for r3 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; @@ -361,45 +361,57 @@ tryclose branch; tryclose branch; tryclose branch; tryclose branch; -# established: r3 fixes v_x_0 +// established: r3 fixes v_x_0 rule getOfSwap; rule ifthenelse_negated; rule ifthenelse_split occ=0; tryclose branch; tryclose branch; -# established: r3 fixes v_y_0 -# from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and -# s_0[v_y_0]!= v_y_0 and s_0[v_x_0]!= v_y_0 -# This corresponds to case B4ii in the Notes. -# in the following r4 refers to this instantion -# established: r4 is of the correct length +// established: r3 fixes v_y_0 +// from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and +// s_0[v_y_0]!= v_y_0 and s_0[v_x_0]!= v_y_0 +cut (int::seqGet(s_0, v_y_0)=v_x_0); +// This corresponds to case B4ii in the Notes. +// in the following r4 refers to this instantion +tryclose branch; +// established: r4 is of the correct length rule seqNPermSwapNPerm; -instantiate hide var=iv with='jv_1'; -instantiate hide var=jv with='v_y_0'; +instantiate hide var=iv with=(jv_1); +instantiate hide var=jv with=(v_y_0); rule impLeft; tryclose branch; -rule seqNPermSwapNPerm formula='seqNPerm(seqSwap(s_0,jv_1,v_y_0))'; -instantiate hide var=iv with='jv_1'; -instantiate hide var=jv with='v_x_0'; +rule seqNPermSwapNPerm formula=(seqNPerm(seqSwap(s_0,jv_1,v_y_0))); +instantiate hide var=iv with=(jv_1); +instantiate hide var=jv with=(v_x_0); rule impLeft; tryclose branch; tryclose branch; -# established: r4 is permutation -# established: r4 fixes v_y_0 -# from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and -# s_0[v_y_0]!= v_y_0 and s_0[v_x_0]!= v_y_0 and s_0[v_y_0]!=v_x_0; -# this corresponds to case B4iv in the Notes -# in the following r5 refers to this instantion +// established: r4 is permutation +// established: r4 fixes v_y_0 +// from now on v_x_0 != v_y_0 and s_0[v_x_0]!= v_x_0 and +// s_0[v_y_0]!= v_y_0 and s_0[v_x_0]!= v_y_0 and s_0[v_y_0]!=v_x_0; +// this corresponds to case B4iv in the Notes +// in the following r5 refers to this instantion tryclose branch; -# established: r5 is of the correct length -rule seqNPermSwapNPerm formula='seqNPerm(s_0)'; -instantiate hide var=iv with='v_x_0'; -instantiate hide var=jv with='jv_0'; +// established: r5 is of the correct length +rule seqNPermSwapNPerm formula=(seqNPerm(s_0)); +instantiate hide var=iv with=(v_x_0); +instantiate hide var=jv with=(jv_0); rule impLeft; tryclose branch; -rule seqNPermSwapNPerm formula='seqNPerm(seqSwap(s_0,v_x_0,jv_0))'; -instantiate hide var=iv with='v_y_0'; -instantiate hide var=jv with='jv_1'; -instantiate hide var=v_r with='seqSwap(seqSwap(s_0, v_x_0, jv_0), v_y_0, jv_1)'; +rule seqNPermSwapNPerm formula=(seqNPerm(seqSwap(s_0,v_x_0,jv_0))); +instantiate hide var=iv with=(v_y_0); +instantiate hide var=jv with=(jv_1); +instantiate hide var=v_r with=(seqSwap(seqSwap(s_0, v_x_0, jv_0), v_y_0, jv_1)); tryclose branch; -" +rule seqNPermSwapNPerm formula=(seqNPerm(s_0)); +instantiate hide var=iv with=(v_x_0); +instantiate hide var=jv with=(jv_0); +rule impLeft; +tryclose branch; +rule seqNPermSwapNPerm formula=(seqNPerm(seqSwap(s_0,v_x_0,jv_0))); +instantiate hide var=iv with=(v_y_0); +instantiate hide var=jv with=(jv_1); +instantiate hide var=v_r with=(seqSwap(seqSwap(s_0, v_x_0, jv_0), v_y_0, jv_1)); +tryclose branch; +} \ No newline at end of file diff --git a/key.core/tacletProofs/seqPerm2/Taclet_schiffl_thm_1.proof b/key.core/tacletProofs/seqPerm2/Taclet_schiffl_thm_1.proof index 18e01b6e463..b1d14b8b29e 100644 --- a/key.core/tacletProofs/seqPerm2/Taclet_schiffl_thm_1.proof +++ b/key.core/tacletProofs/seqPerm2/Taclet_schiffl_thm_1.proof @@ -45,41 +45,41 @@ } -\proofScript " -macro split-prop; -rule schiffl_lemma_2 formula='seqPerm(f_s, f_t)'; -instantiate hide var=x with='f_x'; -instantiate hide var=y with='f_y'; +\proofScript { +macro "split-prop"; +rule schiffl_lemma_2 formula=(seqPerm(f_s,f_t)); +instantiate hide var=x with=(f_x); +instantiate hide var=y with=(f_y); rule impLeft; tryclose branch; rule exLeft; -macro split-prop; +macro "split-prop"; rule seqPermDef occ=1; rule andRight; tryclose branch; -instantiate hide var=s with='r_0'; +instantiate hide var=s with=(r_0); rule andRight; tryclose branch; rule allRight; rule impRight; -instantiate hide var=iv with='iv_0'; +instantiate hide var=iv with=(iv_0); rule impLeft; tryclose branch; rule andLeft; rule seqNPermRange; -instantiate hide var=iv with='iv_0'; +instantiate hide var=iv with=(iv_0); rule impLeft; tryclose branch; rule andLeft; rule andLeft; rule seqNPermRange; -instantiate hide var=iv with='f_x'; +instantiate hide var=iv with=(f_x); rule impLeft; tryclose branch; rule andLeft; rule andLeft; rule seqNPermRange; -instantiate hide var=iv with='f_y'; +instantiate hide var=iv with=(f_y); rule impLeft; tryclose branch; rule andLeft; @@ -106,20 +106,20 @@ rule ifthenelse_split occ=0; tryclose branch; rule ifthenelse_split occ=0; rule seqNPermInjective; -instantiate hide var=iv with='iv_0'; -instantiate hide var=jv with='f_y'; +instantiate hide var=iv with=(iv_0); +instantiate hide var=jv with=(f_y); rule impLeft; tryclose branch; tryclose branch; rule ifthenelse_split occ=0; rule seqNPermInjective; -instantiate hide var=iv with='iv_0'; -instantiate hide var=jv with='f_x'; +instantiate hide var=iv with=(iv_0); +instantiate hide var=jv with=(f_x); rule impLeft; tryclose branch; tryclose branch; tryclose branch; tryclose branch; tryclose branch; -" +} diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_no_return_secure(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_no_return_secure(int)).Non-interference contract.0.m.key index ec9e8723af5..a4109de1103 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_no_return_secure(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_no_return_secure(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_while_secure(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_while_secure(int)).Non-interference contract.0.m.key index de036635717..6e2dc1f6db5 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_while_secure(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__block_while_secure(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_1(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_1(int)).Non-interference contract.0.m.key index 9edbbee5ad9..0be585fd339 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_1(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_1(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_3(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_3(int)).Non-interference contract.0.m.key index 17494b1d853..38027eeefb8 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_3(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_3(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_4(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_4(int)).Non-interference contract.0.m.key index cf1e0a104df..bd523d38c1d 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_4(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__insecure_4(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_1(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_1(int)).Non-interference contract.0.m.key index dbedfab6e1b..c15c9b3af49 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_1(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_1(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_2(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_2(int)).Non-interference contract.0.m.key index 02fa2170bba..3110c12c583 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_2(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_2(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_3(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_3(int)).Non-interference contract.0.m.key index 1ba087042b6..f1aa5e54166 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_3(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_3(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_4(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_4(int)).Non-interference contract.0.m.key index 62f695a224e..9f79d5186bc 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_4(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_4(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_5()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_5()).Non-interference contract.0.m.key index ea5dbe5f3ef..2fef7b82f1f 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_5()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_5()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_6(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_6(int)).Non-interference contract.0.m.key index d911c8ec0a1..95cbf681bf7 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_6(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_6(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_7(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_7(int)).Non-interference contract.0.m.key index ea4e7b14104..41856cc4dd5 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_7(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_7(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_8(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_8(int)).Non-interference contract.0.m.key index eb4af395ed2..6940311f4b9 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_8(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__secure_8(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_insecure(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_insecure(int)).Non-interference contract.0.m.key index 59e7b539e0a..97e0a28a1a9 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_insecure(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_insecure(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_secure(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_secure(int)).Non-interference contract.0.m.key index 43d27804246..7bac6acea38 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_secure(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFBlockExamples(contract.IFBlockExamples__while_block_secure(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithBlockContract()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithBlockContract()).Non-interference contract.0.m.key index 3febc9e9c3b..26bec2d13ff 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithBlockContract()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithBlockContract()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithoutBlockContract()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithoutBlockContract()).Non-interference contract.0.m.key index 9bbd9de88e1..321e8f843ec 100644 --- a/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithoutBlockContract()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/BlockContracts/contract.IFEfficiencyExamples(contract.IFEfficiencyExamples__mWithoutBlockContract()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ConditionalConfidential/CCExample(CCExample__getConfidentialData(CCExample.User)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ConditionalConfidential/CCExample(CCExample__getConfidentialData(CCExample.User)).Non-interference contract.0.m.key index 52c5ea7f8c8..ce676226e09 100644 --- a/key.ui/examples/InformationFlow/ConditionalConfidential/CCExample(CCExample__getConfidentialData(CCExample.User)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ConditionalConfidential/CCExample(CCExample__getConfidentialData(CCExample.User)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__hammer(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__hammer(int)).Non-interference contract.0.m.key index 921349fd087..b9b1849e406 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__hammer(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__hammer(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile(int)).Non-interference contract.0.m.key index 6264db4d1db..346d0ef40a9 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile2(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile2(int)).Non-interference contract.0.m.key index bd49a74f97f..1c8ed8c5151 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile2(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_doubleNestedWhile2(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile(int)).Non-interference contract.0.m.key index 62a61dd5d76..ade619f9def 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile_2(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile_2(int)).Non-interference contract.0.m.key index 593a8b81a4a..ec188c16400 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile_2(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_twoWhile_2(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_while_3(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_while_3(int)).Non-interference contract.0.m.key index d5aace00ec6..9d3383fa208 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_while_3(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__insecure_while_3(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__loc_secure_while(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__loc_secure_while(int)).Non-interference contract.0.m.key index 7be03e546d5..91dfdde7421 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__loc_secure_while(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__loc_secure_while(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while(int)).Non-interference contract.0.m.key index a157548cab6..3de5b07c8cd 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while_wrongInv(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while_wrongInv(int)).Non-interference contract.0.m.key index e5bc8605cbb..906015454eb 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while_wrongInv(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__notSecure_while_wrongInv(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__print(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__print(int)).Non-interference contract.0.m.key index 8981e9c89ec..1ec4dea41c6 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__print(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__print(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_doubleNestedWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_doubleNestedWhile(int)).Non-interference contract.0.m.key index bf2422f7d27..c0da6d9b75d 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_doubleNestedWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_doubleNestedWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedTwoWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedTwoWhile(int)).Non-interference contract.0.m.key index ea7c8639f1b..9c638e4a32f 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedTwoWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedTwoWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedWhile(int)).Non-interference contract.0.m.key index 80dd2515d87..059cfcf3f51 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_nestedWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_twoWhile(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_twoWhile(int)).Non-interference contract.0.m.key index fa6ba686183..67b3a0d23a0 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_twoWhile(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_twoWhile(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while(int)).Non-interference contract.0.m.key index fa41fbd228b..852904428d7 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_2(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_2(int)).Non-interference contract.0.m.key index a58c0613971..c1fce4c75b9 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_2(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_2(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_4(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_4(int)).Non-interference contract.0.m.key index f145a8ddb00..b54d2fb017a 100644 --- a/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_4(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/LoopInvariants/loop.IFLoopExamples(loop.IFLoopExamples__secure_while_4(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_assignment_n2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_assignment_n2()).Non-interference contract.0.m.key index f2a8e07f624..1390d31f6f3 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_assignment_n2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_assignment_n2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_if_high_n5_n1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_if_high_n5_n1()).Non-interference contract.0.m.key index 7caaafe5c0c..4ea0c771e4a 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_if_high_n5_n1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__insecure_if_high_n5_n1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n1()).Non-interference contract.0.m.key index 45a06bca300..cffcc674627 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n2()).Non-interference contract.0.m.key index 1824f85cb16..8ea9c1d190c 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n3()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n3()).Non-interference contract.0.m.key index 165669350fd..aa674a2f2ff 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n3()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n3()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n4()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n4()).Non-interference contract.0.m.key index 927f1d2a85c..8432dd06c0e 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n4()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n4()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n5(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n5(int)).Non-interference contract.0.m.key index b19561af07f..8342764f33e 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n5(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n5(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n6()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n6()).Non-interference contract.0.m.key index d8df2e99218..f65a2060c9a 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n6()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__n6()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_array_param((I,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_array_param((I,int)).Non-interference contract.0.m.key index acd77cc8f4c..7c64944e28a 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_array_param((I,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_array_param((I,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignment_0_n9()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignment_0_n9()).Non-interference contract.0.m.key index 63459767189..01cf32a5474 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignment_0_n9()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignment_0_n9()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignments_n2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignments_n2()).Non-interference contract.0.m.key index 91b45a73f11..f2da671dcee 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignments_n2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_assignments_n2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_catch_exception()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_catch_exception()).Non-interference contract.0.m.key index 9e02c670775..5097e7ab2e2 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_catch_exception()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_catch_exception()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n1()).Non-interference contract.0.m.key index e37e5f6b4ea..35538c67c51 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n5_n1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n5_n1()).Non-interference contract.0.m.key index 2ba5d6a43d0..2338b61f784 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n5_n1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_if_high_n5_n1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n5()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n5()).Non-interference contract.0.m.key index f6937b84ac8..42f5ae394c1 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n5()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n5()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n6()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n6()).Non-interference contract.0.m.key index fd2ff30e513..698b7693a6d 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n6()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_n6()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion(int)).Non-interference contract.0.m.key index 02a9f37aab4..c13182b652d 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion_2((I,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion_2((I,int)).Non-interference contract.0.m.key index c8cb49b495f..434cdbb77a1 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion_2((I,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_recursion_2((I,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n1_n2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n1_n2()).Non-interference contract.0.m.key index dc386419536..93c300cca80 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n1_n2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n1_n2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n3_precond_n4()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n3_precond_n4()).Non-interference contract.0.m.key index 96d7be35efc..2e5af81087a 100644 --- a/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n3_precond_n4()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MethodContracts/contract.IFMethodContract(contract.IFMethodContract__secure_sequential_n3_precond_n4()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__insecure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__insecure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key index ea3e346daa0..0e82ae5e2f0 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__insecure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__insecure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__secure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__secure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key index 824d5c9c9e9..1c9f951bb09 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__secure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.AliasingExamples(mini.AliasingExamples__secure_1(mini.AliasingExamples,mini.AliasingExamples,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.0.m.key index fe743234519..ec76229dad7 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.1.m.key index 09daf915332..ce21a6b4b66 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.DifferenceSeqLocset(mini.DifferenceSeqLocset__m()).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_1()).Non-interference contract.0.m.key index 242844614ee..cc7b3c1f434 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_2()).Non-interference contract.0.m.key index 179737ab75b..575031b57f4 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p1_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_1()).Non-interference contract.0.m.key index da4e2fae546..67d7f1692d7 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_2()).Non-interference contract.0.m.key index b9080356040..bad68722a82 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__insecure_p2_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.0.m.key index 5356aa43e7d..3ab867e9c93 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.1.m.key index 7135192982a..9d8b0339867 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_1()).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_2()).Non-interference contract.0.m.key index bf2fd70aa97..15c1df76461 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_3()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_3()).Non-interference contract.0.m.key index 283ce2e941e..99098563a53 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_3()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_3()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_4()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_4()).Non-interference contract.0.m.key index f72e807c5f8..7a4946c8f1e 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_4()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_4()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_5()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_5()).Non-interference contract.0.m.key index d40a614cdcb..00441b265b8 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_5()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_5()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_6()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_6()).Non-interference contract.0.m.key index 8ebacfd1135..a8f73b4b23a 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_6()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p1_6()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_1()).Non-interference contract.0.m.key index 16d2b1b4b68..a764e72d58e 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_2()).Non-interference contract.0.m.key index a3a448f8311..7d7545ca8eb 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_3()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_3()).Non-interference contract.0.m.key index 371eb63b338..9a7ee922d62 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_3()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_3()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_4()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_4()).Non-interference contract.0.m.key index a52b1e7cc6d..ab68ec7d05c 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_4()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_4()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_5()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_5()).Non-interference contract.0.m.key index c43104fbb93..de89538741e 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_5()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_5()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_6()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_6()).Non-interference contract.0.m.key index f1df86d552a..cdc49fc8015 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_6()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_6()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_7()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_7()).Non-interference contract.0.m.key index a21ee90d537..487b154b7ee 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_7()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_7()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_8()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_8()).Non-interference contract.0.m.key index 04271b6e660..72774ccb0a8 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_8()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_p2_8()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_parameter(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_parameter(int)).Non-interference contract.0.m.key index d1a74ee3193..fd4f76768fb 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_parameter(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamples(mini.MiniExamples__secure_parameter(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_1()).Non-interference contract.0.m.key index de34df3b20c..07093607592 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_2()).Non-interference contract.0.m.key index 41f4168e4ab..abf57b05e88 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_3()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_3()).Non-interference contract.0.m.key index b7db99e9bd1..25a5ae7b2c3 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_3()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_3()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_4()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_4()).Non-interference contract.0.m.key index 5d5a50765c2..e552441fab8 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_4()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_4()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_5()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_5()).Non-interference contract.0.m.key index 5afa8676647..c3824b69d14 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_5()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_5()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_6()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_6()).Non-interference contract.0.m.key index fd4b200c94d..6ab23397090 100644 --- a/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_6()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/MiniExamples/mini.MiniExamplesLecture(mini.MiniExamplesLecture__m_6()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__getQ()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__getQ()).Non-interference contract.0.m.key index 8b53de0102d..0569e723769 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__getQ()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__getQ()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.0.m.key index 009deaaffee..3834258d7be 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.1.m.key index c7174d60cf6..e704cec55de 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_1()).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_2()).Non-interference contract.0.m.key index 0b7a0ea0a4d..49807978241 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee(object.AmtoftBanerjee__m_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__cexp(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__cexp(int)).Non-interference contract.0.m.key index 26f5c25304f..1309f39d030 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__cexp(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__cexp(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__expensive(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__expensive(int)).Non-interference contract.0.m.key index d2ca9b763ab..8d8b150a858 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__expensive(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee2(object.AmtoftBanerjee2__expensive(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee3(object.AmtoftBanerjee3__m()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee3(object.AmtoftBanerjee3__m()).Non-interference contract.0.m.key index 246b22cd4bb..5da07c37381 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee3(object.AmtoftBanerjee3__m()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.AmtoftBanerjee3(object.AmtoftBanerjee3__m()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.Naumann(object.Naumann__Pair_m(int,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.Naumann(object.Naumann__Pair_m(int,int)).Non-interference contract.0.m.key index c93866f0c17..5f89cd43ddb 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.Naumann(object.Naumann__Pair_m(int,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.Naumann(object.Naumann__Pair_m(int,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.0.m.key index 624cffe2c08..1aa8113e13b 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.1.m.key index 7cac48a1724..8a86c7d5169 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__if_two_object_creation_next()).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.0.m.key index 8a8e6a8a582..8ac6ba2f13e 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.1.m.key index 4be1676be8c..c546f80e0c2 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_object_assignment()).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_two_object_creation()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_two_object_creation()).Non-interference contract.0.m.key index f4bb8ec09f9..afed05a2f81 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_two_object_creation()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__insecure_two_object_creation()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_if_two_object_creation()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_if_two_object_creation()).Non-interference contract.0.m.key index dcef988b11f..2d35a3cbc15 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_if_two_object_creation()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_if_two_object_creation()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_method_call()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_method_call()).Non-interference contract.0.m.key index da4ed56f2ac..c75bd562ae5 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_method_call()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_method_call()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation()).Non-interference contract.0.m.key index 72ebdfd7faa..a91ccce8bbb 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_2()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_2()).Non-interference contract.0.m.key index a8c382524c1..0a73845e7a1 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_2()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_2()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_3()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_3()).Non-interference contract.0.m.key index a8e863dd702..4b9b5ed7f76 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_3()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_object_creation_3()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_two_object_creation()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_two_object_creation()).Non-interference contract.0.m.key index 83426d2deaa..982a153223e 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_two_object_creation()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_two_object_creation()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_while_i((Ljava.lang.Object)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_while_i((Ljava.lang.Object)).Non-interference contract.0.m.key index 84737aa74ed..00b11fb0b70 100644 --- a/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_while_i((Ljava.lang.Object)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/NewObjects/object.ObjectOrientation(object.ObjectOrientation__secure_while_i((Ljava.lang.Object)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput()).Non-interference contract.0.m.key index 3c59ec6835c..93b6efd6e06 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput(int)).Non-interference contract.0.m.key index f0fadfcae9b..6211ca72dc6 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInput(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage((B)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage((B)).Non-interference contract.0.m.key index f98a9a2bef1..adf5aac6b4b 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage((B)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage((B)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage()).Non-interference contract.0.m.key index a0f509d06e1..dcf51082d1b 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedInputMessage()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutput(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutput(int)).Non-interference contract.0.m.key index bf42c76f9a1..8257896ec04 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutput(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutput(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutputMessage((B)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutputMessage((B)).Non-interference contract.0.m.key index f727de4cba9..21e5b4de615 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutputMessage((B)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Environment(simple_evoting.Environment__untrustedOutputMessage((B)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.NetworkClient(simple_evoting.NetworkClient__send((B,simple_evoting.Server,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.NetworkClient(simple_evoting.NetworkClient__send((B,simple_evoting.Server,int)).Non-interference contract.0.m.key index 567055aa9ec..7027e853b16 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.NetworkClient(simple_evoting.NetworkClient__send((B,simple_evoting.Server,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.NetworkClient(simple_evoting.NetworkClient__send((B,simple_evoting.Server,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.0.m.key index 02b2033a888..9e76f2503a7 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.1.m.key index e6653c5bdad..56bf989e501 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMT(simple_evoting.SMT__send(simple_evoting.Message,int,simple_evoting.Server)).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMTEnv(simple_evoting.SMTEnv__send(int,int,int,simple_evoting.Server,int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMTEnv(simple_evoting.SMTEnv__send(int,int,int,simple_evoting.Server,int)).Non-interference contract.0.m.key index 2ef388b298a..b02c8018405 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMTEnv(simple_evoting.SMTEnv__send(int,int,int,simple_evoting.Server,int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.SMTEnv(simple_evoting.SMTEnv__send(int,int,int,simple_evoting.Server,int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__main()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__main()).Non-interference contract.0.m.key index 1860f904f18..df810c10557 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__main()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__main()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__publishResult()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__publishResult()).Non-interference contract.0.m.key index fea53b4db95..fded36b5fe1 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__publishResult()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Setup(simple_evoting.Setup__publishResult()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.0.m.key index 8edee775505..71cee83176c 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.1.m.key b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.1.m.key index 83b1e53207b..9ca06a169a1 100644 --- a/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.1.m.key +++ b/key.ui/examples/InformationFlow/SimpleEvoting/simple_evoting.Voter(simple_evoting.Voter__onSendBallot(simple_evoting.Server)).Non-interference contract.1.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/Sum/SumExample(SumExample__getSum()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/Sum/SumExample(SumExample__getSum()).Non-interference contract.0.m.key index fd56916fd29..cb131766f6a 100644 --- a/key.ui/examples/InformationFlow/Sum/SumExample(SumExample__getSum()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/Sum/SumExample(SumExample__getSum()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.Bank(banking_example.Bank__login(int,(C)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.Bank(banking_example.Bank__login(int,(C)).Non-interference contract.0.m.key index 8b6ad2c3354..95e35bef010 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.Bank(banking_example.Bank__login(int,(C)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.Bank(banking_example.Bank__login(int,(C)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__depositMoney(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__depositMoney(int)).Non-interference contract.0.m.key index 29825dcb1a6..0163264e62f 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__depositMoney(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__depositMoney(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getBalance()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getBalance()).Non-interference contract.0.m.key index 064a88f4ba7..36aa3152965 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getBalance()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getBalance()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getId()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getId()).Non-interference contract.0.m.key index 800607731a4..bbd03dcc255 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getId()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.BankAccount(banking_example.BankAccount__getId()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key index 6fbb81fe494..c45709f83c4 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key index 133b7b90053..e76fb1f6c8c 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example.UserAccount(banking_example.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.Bank(banking_example2.Bank__login(int,(C)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.Bank(banking_example2.Bank__login(int,(C)).Non-interference contract.0.m.key index d358bd82570..f9feca74cca 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.Bank(banking_example2.Bank__login(int,(C)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.Bank(banking_example2.Bank__login(int,(C)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__depositMoney(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__depositMoney(int)).Non-interference contract.0.m.key index ae3e9bc2fb5..c8a24261a06 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__depositMoney(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__depositMoney(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getBalance()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getBalance()).Non-interference contract.0.m.key index 6cf873dcf7f..499bb627b37 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getBalance()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getBalance()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getId()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getId()).Non-interference contract.0.m.key index 521016aa98f..3a1752240cb 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getId()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.BankAccount(banking_example2.BankAccount__getId()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key index d81fcbfcebd..bb117351643 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__getBankAccount(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key index 1c0dbd8f3f0..472e69576b4 100644 --- a/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyBanking/banking_example2.UserAccount(banking_example2.UserAccount__tryLogin(int,(C)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__inputVote()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__inputVote()).Non-interference contract.0.m.key index 84f66f60f75..5470ec4ecf7 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__inputVote()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__inputVote()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__insecure_voting()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__insecure_voting()).Non-interference contract.0.m.key index adeda69551c..cbb024d8e06 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__insecure_voting()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__insecure_voting()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__isValid(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__isValid(int)).Non-interference contract.0.m.key index e474d224e73..d17c02c2946 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__isValid(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__isValid(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__publishVoterParticipation()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__publishVoterParticipation()).Non-interference contract.0.m.key index 8664d34d097..0943abb145d 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__publishVoterParticipation()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__publishVoterParticipation()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__secure_voting()).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__secure_voting()).Non-interference contract.0.m.key index fa393b45cd3..86edb0f78a5 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__secure_voting()).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__secure_voting()).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__sendVote(int)).Non-interference contract.0.m.key b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__sendVote(int)).Non-interference contract.0.m.key index 304a19710aa..b22685822ba 100644 --- a/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__sendVote(int)).Non-interference contract.0.m.key +++ b/key.ui/examples/InformationFlow/ToyVoting/Voter(Voter__sendVote(int)).Non-interference contract.0.m.key @@ -47,7 +47,7 @@ "class": "de.uka.ilkd.key.informationflow.po.InfFlowContractPO", } -\proofScript "macro 'infflow-autopilot';" +\proofScript { macro "infflow-autopilot"; } \proof { (keyLog "0" (keyUser "kirsten" ) (keyVersion "de4c58c270d097d36f2ff647cca5aa0c0c488891")) diff --git a/key.ui/examples/heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key b/key.ui/examples/heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key index 02141d29060..96676e19274 100644 --- a/key.ui/examples/heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key +++ b/key.ui/examples/heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key @@ -47,9 +47,9 @@ \chooseContract "ListOperationsNonNull[ListOperationsNonNull::setValueAt_NN(ListNN,int,int)].JML normal_behavior operation contract.0"; -\proofScript " -macro autopilot; -macro simp-upd; -rule observerDependencyEQ; -tryclose; -" \ No newline at end of file +\proofScript { + macro autopilot; + macro "simp-upd"; + rule observerDependencyEQ; + tryclose; +} \ No newline at end of file diff --git a/key.ui/examples/heap/quicksort/sort.key b/key.ui/examples/heap/quicksort/sort.key index 34f7edb0ba0..aec2b4fdb1e 100644 --- a/key.ui/examples/heap/quicksort/sort.key +++ b/key.ui/examples/heap/quicksort/sort.key @@ -4,4 +4,4 @@ \chooseContract "Quicksort[Quicksort::sort([I,int,int)].JML normal_behavior operation contract.0"; -\proofScript "script 'sort.script';" +\proofScript { script "sort.script"; } diff --git a/key.ui/examples/heap/quicksort/sort.script b/key.ui/examples/heap/quicksort/sort.script index 63babd983b1..c2f8153fa2d 100644 --- a/key.ui/examples/heap/quicksort/sort.script +++ b/key.ui/examples/heap/quicksort/sort.script @@ -1,12 +1,12 @@ -macro autopilot-prep; +macro "autopilot-prep"; -# -# proof obligation for seqPerm after 3 method calls + +// proof obligation for seqPerm after 3 method calls select formula="{heapAtPre:=heap || exc:=null || heap:=heapAfter_sort_0} seqPerm(seqDef{int u;}(0, array.length, any::select(heap, array, arr(u))), seqDef{int u;}(0, array.length, any::select(heapAtPre, array, arr(u))))"; -macro simp-upd; +macro "simp-upd"; let @seqPre="seqDef{int u;}(0, array.length, array[u])" @seqSplit="seqDef{int u;}(0, array.length, any::select(heapAfter_split, array, arr(u)))" @@ -31,6 +31,6 @@ rule seqPermTrans rule seqPermSym formula="seqPerm(@seqPre, @seqSort0)"; -# Now, the power of autopilot is enough. -# Run another 10000 on each open goal. +// Now, the power of autopilot is enough. +// Run another 10000 on each open goal. tryclose; diff --git a/key.ui/examples/heap/quicksort/split.key b/key.ui/examples/heap/quicksort/split.key index e3c8ab5a653..55478da5989 100644 --- a/key.ui/examples/heap/quicksort/split.key +++ b/key.ui/examples/heap/quicksort/split.key @@ -10,35 +10,34 @@ \chooseContract "Quicksort[Quicksort::split([I,int,int)].JML normal_behavior operation contract.0"; -\proofScript " - -macro autopilot-prep; - -# the power of autopilot is not enough. run another 10000 on open goals -tryclose; - -# two goals remain open after autopilot -# both have to do with the seqPerm condition - -# first goal: body preserves invariant seqPerm condition -macro simp-upd; -rule seqPermFromSwap; -rule andRight; - # the first of the two conjuncts is easy - auto; - # the 2nd requires instantiations; - instantiate hide var=iv with=i_0; - instantiate hide var=jv with=j_0; - auto; - -# 2nd goal: use case, also seqPerm condition, rather similar -macro simp-upd; -rule seqPermFromSwap; -rule andRight; - # the first of the two conjuncts is easy - auto; - # the 2nd requires instantiations - instantiate hide var=iv with=i_0; - instantiate hide var=jv with=to; - auto; -" \ No newline at end of file +\proofScript { + macro "autopilot-prep"; + + // the power of autopilot is not enough. run another 10000 on open goals + tryclose; + + // two goals remain open after autopilot + // both have to do with the seqPerm condition + + // first goal: body preserves invariant seqPerm condition + macro "simp-upd"; + rule seqPermFromSwap; + rule andRight; + // the first of the two conjuncts is easy + auto; + // the 2nd requires instantiations; + instantiate hide var="iv" with=(i_0); + instantiate hide var=jv with=j_0; + auto; + + // 2nd goal: use case, also seqPerm condition, rather similar + macro "simp-upd"; + rule seqPermFromSwap; + rule andRight; + // the first of the two conjuncts is easy + auto; + // the 2nd requires instantiations + instantiate hide var="iv" with=(i_0); + instantiate hide var="jv" with=(to); + auto; +} \ No newline at end of file diff --git a/key.ui/examples/heap/quicksort/split.script b/key.ui/examples/heap/quicksort/split.script index d3c035b7c0c..3131f6495fe 100644 --- a/key.ui/examples/heap/quicksort/split.script +++ b/key.ui/examples/heap/quicksort/split.script @@ -1,29 +1,29 @@ -macro autopilot-prep; +macro "autopilot-prep"; -# the power of autopilot is not enough. run another 10000 on open goals +// the power of autopilot is not enough. run another 10000 on open goals tryclose; -# two goals remain open after autopilot -# both have to do with the seqPerm condition +// two goals remain open after autopilot +// both have to do with the seqPerm condition -# first goal: body preserves invariant seqPerm condition -macro simp-upd; +// first goal: body preserves invariant seqPerm condition +macro "simp-upd"; rule seqPermFromSwap; rule andRight; - # the first of the two conjuncts is easy + // the first of the two conjuncts is easy auto; - # the 2nd requires instantiations; + // the 2nd requires instantiations; instantiate hide var=iv with=i_0; instantiate hide var=jv with=j_0; auto; -# 2nd goal: use case, also seqPerm condition, rather similar -macro simp-upd; +// 2nd goal: use case, also seqPerm condition, rather similar +macro "simp-upd"; rule seqPermFromSwap; rule andRight; - # the first of the two conjuncts is easy + // the first of the two conjuncts is easy auto; - # the 2nd requires instantiations + // the 2nd requires instantiations instantiate hide var=iv with=i_0; instantiate hide var=jv with=to; auto; \ No newline at end of file diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofScriptWorker.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofScriptWorker.java index 6c94d762e00..ccb6b52727a 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofScriptWorker.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/ProofScriptWorker.java @@ -5,12 +5,9 @@ import java.awt.*; import java.awt.Dialog.ModalityType; -import java.io.File; -import java.io.IOException; import java.net.URI; -import java.nio.file.Files; import java.util.List; -import java.util.concurrent.*; +import java.util.concurrent.CancellationException; import java.util.function.Consumer; import javax.swing.*; import javax.swing.text.BadLocationException; @@ -19,53 +16,51 @@ import de.uka.ilkd.key.core.InterruptListener; import de.uka.ilkd.key.core.KeYMediator; import de.uka.ilkd.key.core.KeYSelectionModel; -import de.uka.ilkd.key.java.Position; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.macros.scripts.ScriptException; -import de.uka.ilkd.key.parser.Location; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; +import de.uka.ilkd.key.scripts.ProofScriptEngine; +import de.uka.ilkd.key.scripts.ScriptException; +import org.jspecify.annotations.NullMarked; +import org.jspecify.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Executes s given script. */ -public class ProofScriptWorker extends SwingWorker +@NullMarked +public class ProofScriptWorker extends SwingWorker<@Nullable Object, ProofScriptEngine.Message> implements InterruptListener { private static final Logger LOGGER = LoggerFactory.getLogger(ProofScriptWorker.class); private final KeYMediator mediator; - private final String script; - private final Location initialLocation; + private final KeyAst.ProofScript script; - /** The initially selected goal. */ - private final Goal initiallySelectedGoal; + /** + * The initially selected goal. + */ + private final @Nullable Goal initiallySelectedGoal; - /** The proof script engine. */ - private ProofScriptEngine engine; - private JDialog monitor; - private JTextArea logArea; + /** + * The proof script engine. + */ + private final ProofScriptEngine engine; + private final JDialog monitor = new JDialog(MainWindow.getInstance(), + "Running Script ...", ModalityType.MODELESS); + private final JTextArea logArea = new JTextArea(); private final Consumer observer = this::publish; - public ProofScriptWorker(KeYMediator mediator, File file) throws IOException { - this.initialLocation = new Location(file.toURI(), Position.newOneBased(1, 1)); - this.script = Files.readString(file.toPath()); - this.mediator = mediator; - this.initiallySelectedGoal = null; - } - /** * Instantiates a new proof script worker. * * @param mediator the mediator * @param script the script - * @param location the location */ - public ProofScriptWorker(KeYMediator mediator, String script, Location location) { - this(mediator, script, location, null); + public ProofScriptWorker(KeYMediator mediator, KeyAst.ProofScript script) { + this(mediator, script, null); } /** @@ -73,21 +68,19 @@ public ProofScriptWorker(KeYMediator mediator, String script, Location location) * * @param mediator the mediator * @param script the script - * @param location the location * @param initiallySelectedGoal the initially selected goal */ - public ProofScriptWorker(KeYMediator mediator, String script, Location location, - Goal initiallySelectedGoal) { + public ProofScriptWorker(KeYMediator mediator, KeyAst.ProofScript script, + @Nullable Goal initiallySelectedGoal) { this.mediator = mediator; this.script = script; - this.initialLocation = location; this.initiallySelectedGoal = initiallySelectedGoal; + engine = new ProofScriptEngine(script, initiallySelectedGoal); } @Override - protected Object doInBackground() throws Exception { + protected @Nullable Object doInBackground() throws Exception { try { - engine = new ProofScriptEngine(script, initialLocation, initiallySelectedGoal); engine.setCommandMonitor(observer); engine.execute(mediator.getUI(), mediator.getSelectedProof()); } catch (InterruptedException ex) { @@ -97,17 +90,8 @@ protected Object doInBackground() throws Exception { } private void makeDialog() { - URI uri = initialLocation.getFileURI().orElse(null); - - if (monitor != null) { - logArea.setText("Running script from URL '" + uri + "':\n"); - return; - } - - JDialog dlg = - new JDialog(MainWindow.getInstance(), "Running Script ...", ModalityType.MODELESS); - Container cp = dlg.getContentPane(); - logArea = new JTextArea(); + URI uri = script.getStartLocation().getFileURI().orElse(null); + Container cp = monitor.getContentPane(); logArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 12)); logArea.setEditable(false); logArea.setText("Running script from URL '" + uri + "':\n"); @@ -119,10 +103,8 @@ private void makeDialog() { panel.add(cancelButton); cp.add(panel, BorderLayout.SOUTH); - dlg.setSize(750, 400); - dlg.setLocationRelativeTo(MainWindow.getInstance()); - - this.monitor = dlg; + monitor.setSize(750, 400); + monitor.setLocationRelativeTo(MainWindow.getInstance()); } @Override @@ -130,8 +112,8 @@ protected void process(List chunks) { Document doc = logArea.getDocument(); for (ProofScriptEngine.Message info : chunks) { var message = new StringBuilder("\n---\n"); - if (info instanceof ProofScriptEngine.EchoMessage echo) { - message.append(echo.message()); + if (info instanceof ProofScriptEngine.EchoMessage(String msg)) { + message.append(msg); } else { var exec = (ProofScriptEngine.ExecuteInfo) info; if (exec.command().startsWith("'echo ")) { @@ -169,9 +151,7 @@ public void init() { */ @Override public void done() { - if (monitor != null) { - monitor.setVisible(false); - } + monitor.setVisible(false); try { get(); @@ -186,10 +166,7 @@ public void done() { final Proof proof = initiallySelectedGoal != null ? initiallySelectedGoal.proof() : mediator.getSelectedProof(); - mediator.finishAutoMode(proof, true, true, - () -> { - selectGoalOrNode(); - }); + mediator.finishAutoMode(proof, true, true, this::selectGoalOrNode); } private void selectGoalOrNode() { @@ -208,21 +185,6 @@ private void selectGoalOrNode() { selectionModel.defaultSelection(); } - private static void runWithDeadline(Runnable runnable, int milliseconds) { - final ExecutorService executor = Executors.newFixedThreadPool(1); - final Future future = executor.submit(runnable); - executor.shutdown(); - try { - future.get(1000, TimeUnit.MILLISECONDS); - } catch (InterruptedException | ExecutionException | TimeoutException e) { - /* - * NOTE (DS, 2019-02-08): There are some problems in starting the automode... We will - * just don't do anything here and hope that everything works fine (which it did for my - * tests). Any Java-multithreading experts around? ;) - */ - } - } - @Override public void interruptionPerformed() { // just notify the thread that the button has been pressed diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java index 9845e401589..fabdbf0724a 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/WindowUserInterfaceControl.java @@ -23,7 +23,7 @@ import de.uka.ilkd.key.gui.notification.events.NotificationEvent; import de.uka.ilkd.key.macros.ProofMacro; import de.uka.ilkd.key.macros.ProofMacroFinishedInfo; -import de.uka.ilkd.key.nparser.ProofScriptEntry; +import de.uka.ilkd.key.nparser.KeyAst; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.ProofAggregate; @@ -221,12 +221,14 @@ private void taskFinishedInternal(TaskFinishedInfo info) { } else { KeYMediator mediator = mainWindow.getMediator(); mediator.getNotationInfo().refresh(mediator.getServices()); - ProofScriptEntry scriptAndLoc = problemLoader.getProofScript(); - if (scriptAndLoc != null) { - ProofScriptWorker psw = new ProofScriptWorker(mainWindow.getMediator(), - scriptAndLoc.script(), scriptAndLoc.location()); - psw.init(); - psw.execute(); + if (problemLoader.hasProofScript()) { + KeyAst.ProofScript scriptAndLoc = problemLoader.getProofScript(); + if (scriptAndLoc != null) { + ProofScriptWorker psw = + new ProofScriptWorker(mainWindow.getMediator(), scriptAndLoc); + psw.init(); + psw.execute(); + } } else if (macroChosen()) { applyMacro(); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptFromFileAction.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptFromFileAction.java index c9287ec7252..bbd2fe1705d 100755 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptFromFileAction.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptFromFileAction.java @@ -12,6 +12,7 @@ import de.uka.ilkd.key.gui.KeYFileChooser; import de.uka.ilkd.key.gui.MainWindow; import de.uka.ilkd.key.gui.ProofScriptWorker; +import de.uka.ilkd.key.nparser.ParsingFacade; import de.uka.ilkd.key.proof.Proof; import org.slf4j.Logger; @@ -68,7 +69,8 @@ public void actionPerformed(ActionEvent e) { if (res == JFileChooser.APPROVE_OPTION) { File selectedFile = fc.getSelectedFile(); lastDirectory = selectedFile.getParentFile(); - ProofScriptWorker psw = new ProofScriptWorker(mediator, selectedFile); + var script = ParsingFacade.parseScript(selectedFile.toPath()); + ProofScriptWorker psw = new ProofScriptWorker(mediator, script); psw.init(); psw.execute(); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptInputAction.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptInputAction.java index 3eb39a51170..d8833a767fc 100755 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptInputAction.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/actions/ProofScriptInputAction.java @@ -3,9 +3,11 @@ * SPDX-License-Identifier: GPL-2.0-only */ package de.uka.ilkd.key.gui.actions; +import java.awt.*; import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.event.ActionEvent; +import javax.swing.*; import javax.swing.AbstractAction; import javax.swing.JButton; import javax.swing.JDialog; @@ -14,8 +16,7 @@ import de.uka.ilkd.key.core.KeYMediator; import de.uka.ilkd.key.gui.MainWindow; import de.uka.ilkd.key.gui.ProofScriptWorker; -import de.uka.ilkd.key.java.Position; -import de.uka.ilkd.key.parser.Location; +import de.uka.ilkd.key.nparser.ParsingFacade; /** * The Class ProofScriptInputAction. @@ -26,7 +27,9 @@ public class ProofScriptInputAction extends AbstractAction { private static final long serialVersionUID = -1193756128644859298L; - /** The mediator. */ + /** + * The mediator. + */ private final KeYMediator mediator; /** @@ -56,10 +59,9 @@ private Window(MainWindow mainWindow, KeYMediator mediator) { JButton okButton = new JButton("OK"); okButton.addActionListener(event -> { - ProofScriptWorker psw = new ProofScriptWorker(mediator, textArea.getText(), - new Location(null, Position.newOneBased(1, 1)), - mediator.getSelectedGoal()); - + var script = ParsingFacade.parseScript(textArea.getText()); + ProofScriptWorker psw = new ProofScriptWorker( + mediator, script, mediator.getSelectedGoal()); dispose(); psw.init(); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/ui/ConsoleUserInterfaceControl.java b/key.ui/src/main/java/de/uka/ilkd/key/ui/ConsoleUserInterfaceControl.java index 6313e78e7df..16788e2a83b 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/ui/ConsoleUserInterfaceControl.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/ui/ConsoleUserInterfaceControl.java @@ -3,6 +3,7 @@ * SPDX-License-Identifier: GPL-2.0-only */ package de.uka.ilkd.key.ui; + import java.io.*; import java.nio.charset.StandardCharsets; import java.util.List; @@ -19,8 +20,6 @@ import de.uka.ilkd.key.macros.ProofMacro; import de.uka.ilkd.key.macros.ProofMacroFinishedInfo; import de.uka.ilkd.key.macros.SkipMacro; -import de.uka.ilkd.key.macros.scripts.ProofScriptEngine; -import de.uka.ilkd.key.nparser.ProofScriptEntry; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.proof.ProofAggregate; @@ -38,6 +37,7 @@ import de.uka.ilkd.key.prover.TaskStartedInfo.TaskKind; import de.uka.ilkd.key.prover.impl.DefaultTaskStartedInfo; import de.uka.ilkd.key.rule.IBuiltInRuleApp; +import de.uka.ilkd.key.scripts.ProofScriptEngine; import de.uka.ilkd.key.speclang.PositionedString; import de.uka.ilkd.key.util.MiscTools; @@ -161,10 +161,10 @@ public void taskFinished(TaskFinishedInfo info) { ProblemLoader problemLoader = (ProblemLoader) info.getSource(); if (problemLoader.hasProofScript()) { try { - ProofScriptEntry script = problemLoader.getProofScript(); + var script = problemLoader.getProofScript(); if (script != null) { ProofScriptEngine pse = - new ProofScriptEngine(script.script(), script.location()); + new ProofScriptEngine(script); this.taskStarted( new DefaultTaskStartedInfo(TaskKind.Macro, "Script started", 0)); pse.execute(this, proof); diff --git a/key.util/src/main/java/org/key_project/util/java/StringUtil.java b/key.util/src/main/java/org/key_project/util/java/StringUtil.java index 710c322e5d6..f2fc311b5d4 100644 --- a/key.util/src/main/java/org/key_project/util/java/StringUtil.java +++ b/key.util/src/main/java/org/key_project/util/java/StringUtil.java @@ -490,4 +490,15 @@ public static int count(String text, int beginIndex, int endIndex, char x) { return (int) text.chars().skip(beginIndex).limit(endIndex - beginIndex) .filter(ch -> ch == x).count(); } + + /** + * + * @param text + * @param line + * @param charPositionInLine + * @return + */ + public static String move(@NonNull String text, int line, int charPositionInLine) { + return repeat("\n", line) + repeat(" ", charPositionInLine) + text; + } }