From cf5535cc24bd189f39f6b302280cd2c36e5020d4 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 3 Apr 2023 18:35:15 +0200 Subject: [PATCH 01/24] added new configuration language --- .../key/settings/TestGenerationSettings.java | 148 ++++---- key.core/src/main/antlr4/Config.g4 | 40 --- key.core/src/main/antlr4/KeYLexer.g4 | 4 +- key.core/src/main/antlr4/KeYParser.g4 | 24 +- .../key/nparser/ConfigurationBuilder.java | 109 ++++++ .../java/de/uka/ilkd/key/nparser/KeyAst.java | 30 +- .../uka/ilkd/key/nparser/ParsingFacade.java | 27 ++ .../settings/AbstractPropertiesSettings.java | 70 +++- .../uka/ilkd/key/settings/ChoiceSettings.java | 35 +- .../uka/ilkd/key/settings/Configuration.java | 323 ++++++++++++++++++ .../ilkd/key/settings/GeneralSettings.java | 66 +++- .../key/settings/LemmaGeneratorSettings.java | 30 +- .../settings/NewSMTTranslationSettings.java | 34 +- .../settings/ProofDependentSMTSettings.java | 108 ++++-- .../settings/ProofIndependentSMTSettings.java | 276 +++++++-------- .../settings/ProofIndependentSettings.java | 92 +++-- .../de/uka/ilkd/key/settings/Settings.java | 14 + .../ilkd/key/settings/StrategySettings.java | 97 ++++-- .../ilkd/key/settings/TermLabelSettings.java | 41 ++- .../uka/ilkd/key/settings/ViewSettings.java | 62 ++-- .../ilkd/key/strategy/StrategyProperties.java | 172 ++++++---- .../ilkd/key/gui/colors/ColorSettings.java | 68 +++- .../gui/extension/impl/ExtensionSettings.java | 6 +- .../gui/keyshortcuts/KeyStrokeSettings.java | 128 ++++--- .../key_project/slicing/SlicingSettings.java | 21 +- 25 files changed, 1405 insertions(+), 620 deletions(-) delete mode 100644 key.core/src/main/antlr4/Config.g4 create mode 100644 key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java create mode 100644 key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java diff --git a/key.core.testgen/src/main/java/de/uka/ilkd/key/settings/TestGenerationSettings.java b/key.core.testgen/src/main/java/de/uka/ilkd/key/settings/TestGenerationSettings.java index 014ed1541b9..dadd6412ead 100644 --- a/key.core.testgen/src/main/java/de/uka/ilkd/key/settings/TestGenerationSettings.java +++ b/key.core.testgen/src/main/java/de/uka/ilkd/key/settings/TestGenerationSettings.java @@ -1,9 +1,9 @@ package de.uka.ilkd.key.settings; -import java.io.File; -import java.util.Properties; import javax.annotation.Nonnull; import javax.annotation.Nullable; +import java.io.File; +import java.util.Properties; public class TestGenerationSettings extends AbstractSettings { // region Default Values for option fields @@ -11,7 +11,7 @@ public class TestGenerationSettings extends AbstractSettings { private static final int DEFAULT_MAXUNWINDS = 3; private static final int DEFAULT_CONCURRENTPROCESSES = 1; private static final String DEFAULT_OUTPUTPATH = - System.getProperty("user.home") + File.separator + "testFiles"; + System.getProperty("user.home") + File.separator + "testFiles"; private static final boolean DEFAULT_REMOVEDUPLICATES = true; private static final boolean DEFAULT_USERFL = false; private static final boolean DEFAULT_USEJUNIT = false; @@ -22,19 +22,19 @@ public class TestGenerationSettings extends AbstractSettings { // endregion // region property names - private static final String PROP_APPLY_SYMBOLIC_EXECUTION = - "[TestGenSettings]applySymbolicExecution"; - private static final String PROP_MAX_UWINDS = "[TestGenSettings]maxUnwinds"; - private static final String PROP_OUTPUT_PATH = "[TestGenSettings]OutputPath"; - private static final String PROP_REMOVE_DUPLICATES = "[TestGenSettings]RemoveDuplicates"; - private static final String PROP_USE_RFL = "[TestGenSettings]UseRFL"; - private static final String PROP_USE_JUNIT = "[TestGenSettings]UseJUnit"; - private static final String PROP_CONCURRENT_PROCESSES = "[TestGenSettings]ConcurrentProcesses"; - private static final String PROP_INVARIANT_FOR_ALL = "[TestGenSettings]InvariantForAll"; - private static final String PROP_OPENJML_PATH = "[TestGenSettings]OpenJMLPath"; - private static final String PROP_OBJENESIS_PATH = "[TestGenSettings]ObjenesisPath"; + private static final String PROP_APPLY_SYMBOLIC_EXECUTION = "applySymbolicExecution"; + private static final String PROP_MAX_UWINDS = "maxUnwinds"; + private static final String PROP_OUTPUT_PATH = "OutputPath"; + private static final String PROP_REMOVE_DUPLICATES = "RemoveDuplicates"; + private static final String PROP_USE_RFL = "UseRFL"; + private static final String PROP_USE_JUNIT = "UseJUnit"; + private static final String PROP_CONCURRENT_PROCESSES = "ConcurrentProcesses"; + private static final String PROP_INVARIANT_FOR_ALL = "InvariantForAll"; + private static final String PROP_OPENJML_PATH = "OpenJMLPath"; + private static final String PROP_OBJENESIS_PATH = "ObjenesisPath"; private static final String PROP_INCLUDE_POST_CONDITION = - "[TestGenSettings]IncludePostCondition"; + "IncludePostCondition"; + private static final String CATEGORY = "TestGenSettings"; // endregion // Option fields @@ -52,14 +52,14 @@ public class TestGenerationSettings extends AbstractSettings { public TestGenerationSettings() { - applySymbolicExecution = TestGenerationSettings.DEFAULT_APPLYSYMBOLICEX; - maxUnwinds = TestGenerationSettings.DEFAULT_MAXUNWINDS; - outputPath = TestGenerationSettings.DEFAULT_OUTPUTPATH; - removeDuplicates = TestGenerationSettings.DEFAULT_REMOVEDUPLICATES; - useRFL = TestGenerationSettings.DEFAULT_USERFL; - useJunit = TestGenerationSettings.DEFAULT_USEJUNIT; - concurrentProcesses = TestGenerationSettings.DEFAULT_CONCURRENTPROCESSES; - invariantForAll = TestGenerationSettings.DEFAULT_INVARIANTFORALL; + applySymbolicExecution = DEFAULT_APPLYSYMBOLICEX; + maxUnwinds = DEFAULT_MAXUNWINDS; + outputPath = DEFAULT_OUTPUTPATH; + removeDuplicates = DEFAULT_REMOVEDUPLICATES; + useRFL = DEFAULT_USERFL; + useJunit = DEFAULT_USEJUNIT; + concurrentProcesses = DEFAULT_CONCURRENTPROCESSES; + invariantForAll = DEFAULT_INVARIANTFORALL; openjmlPath = DEFAULT_OPENJMLPATH; objenesisPath = DEFAULT_OBJENESISPATH; includePostCondition = DEFAULT_INCLUDEPOSTCONDITION; @@ -124,39 +124,23 @@ public boolean includePostCondition() { @Override public void readSettings(Properties props) { + var prefix = "[" + CATEGORY + "]"; setApplySymbolicExecution(SettingsConverter.read(props, - TestGenerationSettings.PROP_APPLY_SYMBOLIC_EXECUTION, - TestGenerationSettings.DEFAULT_APPLYSYMBOLICEX)); - setMaxUnwinds(SettingsConverter.read(props, - TestGenerationSettings.PROP_MAX_UWINDS, - TestGenerationSettings.DEFAULT_MAXUNWINDS)); - setOutputPath(SettingsConverter.read(props, - TestGenerationSettings.PROP_OUTPUT_PATH, - TestGenerationSettings.DEFAULT_OUTPUTPATH)); + prefix + PROP_APPLY_SYMBOLIC_EXECUTION, DEFAULT_APPLYSYMBOLICEX)); + setMaxUnwinds(SettingsConverter.read(props, prefix + PROP_MAX_UWINDS, DEFAULT_MAXUNWINDS)); + setOutputPath(SettingsConverter.read(props, prefix + PROP_OUTPUT_PATH, DEFAULT_OUTPUTPATH)); setRemoveDuplicates(SettingsConverter.read(props, - TestGenerationSettings.PROP_REMOVE_DUPLICATES, - TestGenerationSettings.DEFAULT_REMOVEDUPLICATES)); - setRFL(SettingsConverter.read(props, - TestGenerationSettings.PROP_USE_RFL, - TestGenerationSettings.DEFAULT_USERFL)); - setUseJunit(SettingsConverter.read(props, - TestGenerationSettings.PROP_USE_JUNIT, - TestGenerationSettings.DEFAULT_USEJUNIT)); + prefix + PROP_REMOVE_DUPLICATES, DEFAULT_REMOVEDUPLICATES)); + setRFL(SettingsConverter.read(props, prefix + PROP_USE_RFL, DEFAULT_USERFL)); + setUseJunit(SettingsConverter.read(props, prefix + PROP_USE_JUNIT, DEFAULT_USEJUNIT)); setConcurrentProcesses(SettingsConverter.read(props, - TestGenerationSettings.PROP_CONCURRENT_PROCESSES, - TestGenerationSettings.DEFAULT_CONCURRENTPROCESSES)); + prefix + PROP_CONCURRENT_PROCESSES, DEFAULT_CONCURRENTPROCESSES)); setInvariantForAll(SettingsConverter.read(props, - TestGenerationSettings.PROP_INVARIANT_FOR_ALL, - TestGenerationSettings.DEFAULT_INVARIANTFORALL)); - setOpenjmlPath(SettingsConverter.read(props, - TestGenerationSettings.PROP_OPENJML_PATH, - TestGenerationSettings.DEFAULT_OPENJMLPATH)); - setObjenesisPath(SettingsConverter.read(props, - TestGenerationSettings.PROP_OBJENESIS_PATH, - TestGenerationSettings.DEFAULT_OBJENESISPATH)); + prefix + PROP_INVARIANT_FOR_ALL, DEFAULT_INVARIANTFORALL)); + setOpenjmlPath(SettingsConverter.read(props, prefix + PROP_OPENJML_PATH, DEFAULT_OPENJMLPATH)); + setObjenesisPath(SettingsConverter.read(props, PROP_OBJENESIS_PATH, DEFAULT_OBJENESISPATH)); setIncludePostCondition(SettingsConverter.read(props, - TestGenerationSettings.PROP_INCLUDE_POST_CONDITION, - TestGenerationSettings.DEFAULT_INCLUDEPOSTCONDITION)); + PROP_INCLUDE_POST_CONDITION, DEFAULT_INCLUDEPOSTCONDITION)); } public boolean removeDuplicates() { @@ -248,22 +232,52 @@ public boolean useJunit() { @Override public void writeSettings(Properties props) { - SettingsConverter.store(props, TestGenerationSettings.PROP_APPLY_SYMBOLIC_EXECUTION, - applySymbolicExecution); - SettingsConverter.store(props, TestGenerationSettings.PROP_CONCURRENT_PROCESSES, - concurrentProcesses); - SettingsConverter.store(props, TestGenerationSettings.PROP_INVARIANT_FOR_ALL, - invariantForAll); - SettingsConverter.store(props, TestGenerationSettings.PROP_MAX_UWINDS, maxUnwinds); - SettingsConverter.store(props, TestGenerationSettings.PROP_OUTPUT_PATH, outputPath); - SettingsConverter.store(props, TestGenerationSettings.PROP_REMOVE_DUPLICATES, - removeDuplicates); - SettingsConverter.store(props, TestGenerationSettings.PROP_USE_RFL, useRFL); - SettingsConverter.store(props, TestGenerationSettings.PROP_USE_JUNIT, useJunit); - SettingsConverter.store(props, TestGenerationSettings.PROP_OPENJML_PATH, openjmlPath); - SettingsConverter.store(props, TestGenerationSettings.PROP_OBJENESIS_PATH, objenesisPath); - SettingsConverter.store(props, TestGenerationSettings.PROP_INCLUDE_POST_CONDITION, - includePostCondition); + var prefix = "[" + CATEGORY + "]"; + SettingsConverter.store(props, prefix + PROP_APPLY_SYMBOLIC_EXECUTION, applySymbolicExecution); + SettingsConverter.store(props, prefix + PROP_CONCURRENT_PROCESSES, concurrentProcesses); + SettingsConverter.store(props, prefix + PROP_INVARIANT_FOR_ALL, invariantForAll); + SettingsConverter.store(props, prefix + PROP_MAX_UWINDS, maxUnwinds); + SettingsConverter.store(props, prefix + PROP_OUTPUT_PATH, outputPath); + SettingsConverter.store(props, prefix + PROP_REMOVE_DUPLICATES, removeDuplicates); + SettingsConverter.store(props, prefix + PROP_USE_RFL, useRFL); + SettingsConverter.store(props, prefix + PROP_USE_JUNIT, useJunit); + SettingsConverter.store(props, prefix + PROP_OPENJML_PATH, openjmlPath); + SettingsConverter.store(props, prefix + PROP_OBJENESIS_PATH, objenesisPath); + SettingsConverter.store(props, prefix + PROP_INCLUDE_POST_CONDITION, includePostCondition); + } + + @Override + public void readSettings(Configuration props) { + var cat = props.getSection(CATEGORY); + if (cat == null) return; + setApplySymbolicExecution(cat.getBool(PROP_APPLY_SYMBOLIC_EXECUTION, DEFAULT_APPLYSYMBOLICEX)); + setMaxUnwinds(cat.getInt(PROP_MAX_UWINDS, DEFAULT_MAXUNWINDS)); + setOutputPath(cat.getString(PROP_OUTPUT_PATH, DEFAULT_OUTPUTPATH)); + setRemoveDuplicates(cat.getBool(PROP_REMOVE_DUPLICATES, DEFAULT_REMOVEDUPLICATES)); + setRFL(cat.getBool(PROP_USE_RFL, DEFAULT_USERFL)); + setUseJunit(cat.getBool(PROP_USE_JUNIT, DEFAULT_USEJUNIT)); + setConcurrentProcesses(cat.getInt(PROP_CONCURRENT_PROCESSES, DEFAULT_CONCURRENTPROCESSES)); + setInvariantForAll(cat.getBool(PROP_INVARIANT_FOR_ALL, DEFAULT_INVARIANTFORALL)); + setOpenjmlPath(cat.getString(PROP_OPENJML_PATH, DEFAULT_OPENJMLPATH)); + setObjenesisPath(cat.getString(PROP_OBJENESIS_PATH, DEFAULT_OBJENESISPATH)); + setIncludePostCondition(cat.getBool(PROP_INCLUDE_POST_CONDITION, DEFAULT_INCLUDEPOSTCONDITION)); + } + + @Override + public void writeSettings(Configuration props) { + var cat = props.getOrCreateSection(CATEGORY); + + cat.set(PROP_APPLY_SYMBOLIC_EXECUTION, applySymbolicExecution); + cat.set(PROP_CONCURRENT_PROCESSES, concurrentProcesses); + cat.set(PROP_INVARIANT_FOR_ALL, invariantForAll); + cat.set(PROP_MAX_UWINDS, maxUnwinds); + cat.set(PROP_OUTPUT_PATH, outputPath); + cat.set(PROP_REMOVE_DUPLICATES, removeDuplicates); + cat.set(PROP_USE_RFL, useRFL); + cat.set(PROP_USE_JUNIT, useJunit); + cat.set(PROP_OPENJML_PATH, openjmlPath); + cat.set(PROP_OBJENESIS_PATH, objenesisPath); + cat.set(PROP_INCLUDE_POST_CONDITION, includePostCondition); } public void set(TestGenerationSettings settings) { diff --git a/key.core/src/main/antlr4/Config.g4 b/key.core/src/main/antlr4/Config.g4 deleted file mode 100644 index fd107fa56e1..00000000000 --- a/key.core/src/main/antlr4/Config.g4 +++ /dev/null @@ -1,40 +0,0 @@ -grammar Config; - -/* -[SMT_SOLVER] -Z3 = { - name = z3, - path = "$HOME/bin/z3", - flags = [ "-T", 25, "-smt2" ] -} -*/ - -file: (section? kv)*; -section: LBRACKET SYMBOL RBRACKET; -kv: (SYMBOL|STRING) EQUAL value; -value: - SYMBOL #symbol - | STRING #string - | NUMBER #num - | FLOATING #fp - | BOOLEAN #bool - | LBRACE - (kv (COMMA kv)*)? - RBRACE #table - | LBRACKET (value (COMMA value)*)? RBRACKET #list; - - -COMMENT: '#' ~('\n'|'\r')* -> channel(HIDDEN); -ML_COMMENT: '/*' (ML_COMMENT|.)*? '*/'->channel(HIDDEN); -WS: ('\n'|'\r'|' '|'\f'|'\t')+ -> channel(HIDDEN); -COMMA:','; -BOOLEAN: 'true'|'false'|'FALSE'|'TRUE'; -FLOATING: [+-]? [0-9]* '.' [0-9]+; -NUMBER: [+-]? [0-9]+; -STRING: '"' ~( '"' )* '"'; -RBRACE:'}'; -LBRACE:'{'; -LBRACKET: '['; -RBRACKET: ']'; -EQUAL: '='; -SYMBOL: [_a-zA-Z] [a-zA-Z_]*; diff --git a/key.core/src/main/antlr4/KeYLexer.g4 b/key.core/src/main/antlr4/KeYLexer.g4 index 7625122760c..0c2f8551f00 100644 --- a/key.core/src/main/antlr4/KeYLexer.g4 +++ b/key.core/src/main/antlr4/KeYLexer.g4 @@ -415,8 +415,6 @@ SL_COMMENT DOC_COMMENT: '/*!' -> more, pushMode(docComment); ML_COMMENT: '/*' -> more, pushMode(COMMENT); - - BIN_LITERAL: '0' 'b' ('0' | '1' | '_')+ ('l'|'L')?; HEX_LITERAL: '0' 'x' (DIGIT | 'a'..'f' | 'A'..'F' | '_')+ ('l'|'L')?; @@ -457,7 +455,7 @@ DOUBLE_LITERAL: ; REAL_LITERAL: - RATIONAL_LITERAL ('r' | 'R') + RATIONAL_LITERAL ('r' | 'R')? ; diff --git a/key.core/src/main/antlr4/KeYParser.g4 b/key.core/src/main/antlr4/KeYParser.g4 index a1c35e56f72..eb6c3e429dc 100644 --- a/key.core/src/main/antlr4/KeYParser.g4 +++ b/key.core/src/main/antlr4/KeYParser.g4 @@ -801,7 +801,7 @@ profile: PROFILE name=string_value SEMI; preferences : - KEYSETTINGS LBRACE (s=string_value)? RBRACE + KEYSETTINGS LBRACE (s=string_value | c=cfile )? RBRACE ; proofScript @@ -811,3 +811,25 @@ proofScript // PROOF proof: PROOF EOF; + +// Config +cfile: (csection? ckv)*; +csection: LBRACKET IDENT RBRACKET; +ckv: doc=DOC_COMMENT? ckey EQUALS cvalue; +ckey: (any* | STRING_LITERAL); +any: INT_LITERAL | IDENT | BIN_LITERAL | HEX_LITERAL | FLOAT_LITERAL | DOUBLE_LITERAL + | TRUE | FALSE | DOT; +cvalue: + IDENT #csymbol + | STRING_LITERAL #cstring + | BIN_LITERAL #cintb + | HEX_LITERAL #cinth + | MINUS? INT_LITERAL #cintd + | FLOAT_LITERAL #cfpf + | DOUBLE_LITERAL #cfpd + | REAL_LITERAL #cfpr + | (TRUE|FALSE) #cbool + | LBRACE + (ckv (COMMA ckv)*)? + RBRACE #table + | LBRACKET (cvalue (COMMA cvalue)*)? RBRACKET #list; diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java new file mode 100644 index 00000000000..e919b10c377 --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -0,0 +1,109 @@ +package de.uka.ilkd.key.nparser; + +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.util.LinkedHashMap; + +import java.util.ArrayList; + +/** + * @author Alexander Weigl + * @version 1 (03.04.23) + * @see KeyAst.ConfigurationFile#asConfiguration() + */ +class ConfigurationBuilder extends KeYParserBaseVisitor { + private Configuration root; + private Configuration section; + + public Configuration getConfiguration() { + return root; + } + + @Override + public Object visitCfile(KeYParser.CfileContext ctx) { + section = root = new Configuration(); + return null; + } + + @Override + public Object visitCsection(KeYParser.CsectionContext ctx) { + var name = ctx.IDENT().getText(); + section = root.getSection(name, true); + return null; + } + + @Override + public Object visitCkv(KeYParser.CkvContext ctx) { + var name = ctx.ckey().getText(); + var val = ctx.cvalue().accept(this); + section.set(name, val); + return null; + } + + @Override + public Object visitCsymbol(KeYParser.CsymbolContext ctx) { + return ctx.IDENT().getText(); + } + + @Override + public Object visitCstring(KeYParser.CstringContext ctx) { + final var text = ctx.getText(); + return text.substring(1, text.length() - 1) + .replace("\\\"", "\"") + .replace("\\\\", "\\"); + } + + @Override + public Object visitCintb(KeYParser.CintbContext ctx) { + return Integer.parseInt(ctx.getText(), 2); + } + + @Override + public Object visitCinth(KeYParser.CinthContext ctx) { + return Integer.parseInt(ctx.getText(), 16); + } + + @Override + public Object visitCintd(KeYParser.CintdContext ctx) { + return Integer.parseInt(ctx.getText(), 10); + } + + @Override + public Object visitCfpf(KeYParser.CfpfContext ctx) { + return Double.parseDouble(ctx.getText()); + } + + @Override + public Object visitCfpd(KeYParser.CfpdContext ctx) { + return Double.parseDouble(ctx.getText()); + } + + @Override + public Object visitCfpr(KeYParser.CfprContext ctx) { + return Double.parseDouble(ctx.getText()); + } + + @Override + public Object visitCbool(KeYParser.CboolContext ctx) { + return Boolean.parseBoolean(ctx.getText()); + } + + @Override + public Object visitTable(KeYParser.TableContext ctx) { + var oldSection = section; + var table = section = new Configuration(new LinkedHashMap<>()); + for (KeYParser.CkvContext context : ctx.ckv()) { + context.accept(this); + } + section = oldSection; + return table; + } + + @Override + public Object visitList(KeYParser.ListContext ctx) { + var seq = new ArrayList<>(ctx.children.size()); + for (KeYParser.CvalueContext context : ctx.cvalue()) { + seq.add(context.accept(this)); + } + return seq; + } +} 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 2bdf35d0d8b..5f781566e25 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 @@ -1,24 +1,23 @@ package de.uka.ilkd.key.nparser; -import java.net.URL; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - import de.uka.ilkd.key.nparser.builder.BuilderHelpers; import de.uka.ilkd.key.nparser.builder.ChoiceFinder; import de.uka.ilkd.key.nparser.builder.FindProblemInformation; import de.uka.ilkd.key.nparser.builder.IncludeFinder; import de.uka.ilkd.key.proof.init.Includes; +import de.uka.ilkd.key.settings.Configuration; import de.uka.ilkd.key.settings.ProofSettings; import de.uka.ilkd.key.util.Triple; - -import org.key_project.util.java.StringUtil; - import org.antlr.v4.runtime.CharStream; import org.antlr.v4.runtime.ParserRuleContext; import org.antlr.v4.runtime.Token; import org.antlr.v4.runtime.misc.Interval; import org.antlr.v4.runtime.tree.ParseTreeVisitor; +import org.key_project.util.java.StringUtil; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.net.URL; /** * This is a monad around the parse tree. We use this class to hide the @@ -57,7 +56,7 @@ public static class File extends KeyAst { ProofSettings settings = new ProofSettings(ProofSettings.DEFAULT_SETTINGS); if (ctx.preferences() != null) { String text = - StringUtil.trim(ctx.preferences().s.getText(), '"').replace("\\\\:", ":"); + StringUtil.trim(ctx.preferences().s.getText(), '"').replace("\\\\:", ":"); settings.loadSettingsFromString(text); } return settings; @@ -68,7 +67,7 @@ public static class File extends KeyAst { KeYParser.ProofScriptContext pctx = ctx.problem().proofScript(); String text = pctx.ps.getText(); return new Triple<>(StringUtil.trim(text, '"'), pctx.ps.getLine(), - pctx.ps.getCharPositionInLine()); + pctx.ps.getCharPositionInLine()); } return null; } @@ -123,6 +122,19 @@ public String getProblemHeader() { } } + public static class ConfigurationFile extends KeyAst { + ConfigurationFile(KeYParser.CfileContext ctx) { + super(ctx); + } + + public Configuration asConfiguration() { + final var cfg = new ConfigurationBuilder(); + ctx.accept(cfg); + return cfg.getConfiguration(); + } + } + + public static class Term extends KeyAst { Term(KeYParser.TermContext ctx) { super(ctx); 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 243db641dca..6d4fd0d3578 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 @@ -16,6 +16,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 org.antlr.v4.runtime.*; import org.antlr.v4.runtime.tree.TerminalNode; import org.slf4j.Logger; @@ -174,4 +175,30 @@ public static String getValueDocumentation(@Nullable TerminalNode docComment) { String value = docComment.getText(); return value.substring(3, value.length() - 2);// remove leading "/*!" and trailing "*/" } + + + //region configuration + public static KeyAst.ConfigurationFile parseConfigurationFile(Path file) throws IOException { + return parseConfigurationFile(CharStreams.fromPath(file)); + } + + public static KeyAst.ConfigurationFile parseConfigurationFile(File file) throws IOException { + return parseConfigurationFile(file.toPath()); + } + + public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) { + KeYParser p = createParser(stream); + var ctx = p.cfile(); + p.getErrorReporter().throwException(); + return new KeyAst.ConfigurationFile(ctx); + } + + public static Configuration readConfigurationFile(Path file) throws IOException { + return parseConfigurationFile(CharStreams.fromPath(file)).asConfiguration(); + } + + public static Configuration readConfigurationFile(File file) throws IOException { + return readConfigurationFile(file.toPath()); + } + //endregion } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractPropertiesSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractPropertiesSettings.java index 3443a6e0fd0..e912c23957f 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractPropertiesSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractPropertiesSettings.java @@ -1,11 +1,11 @@ package de.uka.ilkd.key.settings; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; /** * A base class for own settings based on properties. @@ -13,6 +13,7 @@ * @author weigl */ public abstract class AbstractPropertiesSettings extends AbstractSettings { + private static final String SET_DELIMITER = ","; private static final Function parseInt = Integer::parseInt; private static final Function parseFloat = Float::parseFloat; @@ -23,13 +24,24 @@ public abstract class AbstractPropertiesSettings extends AbstractSettings { * Properties stored in this settings object. * Updated by each {@link PropertyEntry} when a new non-null value is set. */ - protected Properties properties = new Properties(); + protected Map properties = new TreeMap<>(); + + /** + * category of this settings w/o brackets, e.g, "View" for "[View]". + * This will prefix to every property entry. + */ + protected final String category; + /** * */ protected List> propertyEntries = new LinkedList<>(); + public AbstractPropertiesSettings(String category) { + this.category = category; + } + private static Set parseStringSet(String o) { Set set = new TreeSet<>(); for (String entry : o.split(SET_DELIMITER)) { @@ -76,15 +88,37 @@ public void readSettings(Properties props) { propertyEntries.forEach(it -> { String value = props.getProperty(it.getKey()); if (value != null) { - properties.setProperty(it.getKey(), value); + it.parseFrom(value); } }); } @Override public void writeSettings(Properties props) { - propertyEntries.forEach(PropertyEntry::update); - props.putAll(properties); + for (PropertyEntry entry : propertyEntries) { + props.setProperty("[" + category + "]" + entry.getKey(), entry.value()); + } + } + + + @Override + public void readSettings(Configuration props) { + var cat = props.getSection(category); + if (cat == null) return; + propertyEntries.forEach(it -> { + final var value = cat.get(it.getKey()); + if (value != null) { + properties.put(it.getKey(), value); + } + }); + } + + @Override + public void writeSettings(Configuration props) { + var cat = props.getOrCreateSection(category); + propertyEntries.forEach(it -> { + cat.set(it.getKey(), it.get()); + }); } protected PropertyEntry createDoubleProperty(String key, double defValue) { @@ -119,8 +153,8 @@ protected PropertyEntry createBooleanProperty(String key, boolean defVa protected PropertyEntry> createStringSetProperty(String key, String defValue) { PropertyEntry> pe = new DefaultPropertyEntry<>(key, parseStringSet(defValue), - AbstractPropertiesSettings::parseStringSet, - AbstractPropertiesSettings::stringSetToString); + AbstractPropertiesSettings::parseStringSet, + AbstractPropertiesSettings::stringSetToString); propertyEntries.add(pe); return pe; } @@ -128,15 +162,15 @@ protected PropertyEntry> createStringSetProperty(String key, String /** * Creates a string list property. * - * @param key the key value of this property inside {@link Properties} instance + * @param key the key value of this property inside {@link Properties} instance * @param defValue a default value * @return returns a {@link PropertyEntry} */ protected PropertyEntry> createStringListProperty(@Nonnull String key, - @Nullable String defValue) { + @Nullable String defValue) { PropertyEntry> pe = new DefaultPropertyEntry<>(key, parseStringList(defValue), - AbstractPropertiesSettings::parseStringList, - AbstractPropertiesSettings::stringListToString); + AbstractPropertiesSettings::parseStringList, + AbstractPropertiesSettings::stringListToString); propertyEntries.add(pe); return pe; } @@ -170,7 +204,7 @@ private DefaultPropertyEntry(String key, T defaultValue, Function con } private DefaultPropertyEntry(String key, T defaultValue, Function convert, - Function toString) { + Function toString) { this.key = key; this.defaultValue = defaultValue; this.convert = convert; @@ -192,28 +226,28 @@ public void set(T value) { T old = get(); // only store non-null values if (value != null) { - properties.setProperty(key, toString.apply(value)); + properties.put(key, value); firePropertyChange(key, old, value); } } @Override public T get() { - String v = properties.getProperty(key); + var v = properties.getOrDefault(key, defaultValue); if (v == null) { return defaultValue; } else { - return convert.apply(v); + return (T) v; } } @Override public String value() { - String v = properties.getProperty(key); + var v = get(); if (v == null) { return toString.apply(defaultValue); } else { - return v; + return toString.apply(v); } } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index e0195d7b6a2..d43fbdf094e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -1,22 +1,22 @@ package de.uka.ilkd.key.settings; -import java.util.*; -import java.util.stream.Collectors; - import de.uka.ilkd.key.logic.Choice; import de.uka.ilkd.key.logic.Name; import de.uka.ilkd.key.logic.Namespace; - import org.key_project.util.collection.DefaultImmutableSet; import org.key_project.util.collection.ImmutableList; import org.key_project.util.collection.ImmutableSLList; import org.key_project.util.collection.ImmutableSet; +import java.util.*; +import java.util.stream.Collectors; + /** * */ public class ChoiceSettings extends AbstractSettings { - private static final String KEY_DEFAULT_CHOICES = "[Choice]DefaultChoices"; + public static final String CATEGORY = "Choice"; + private static final String KEY_DEFAULT_CHOICES = "DefaultChoices"; private static final String PROP_CHOICE_DEFAULT = "category2Default"; private static final String PROP_CHOICE_CATEGORIES = "category2Choices"; @@ -133,7 +133,7 @@ public void updateChoices(Namespace choiceNS, boolean remove) { * object in a way that it represents the stored settings */ public void readSettings(Properties props) { - String choiceSequence = props.getProperty(KEY_DEFAULT_CHOICES); + String choiceSequence = props.getProperty("[" + CATEGORY + "]" + KEY_DEFAULT_CHOICES); // set choices if (choiceSequence != null) { StringTokenizer st = new StringTokenizer(choiceSequence, ","); @@ -153,16 +153,31 @@ public void readSettings(Properties props) { * given Properties object. Only entries of * the form < key > = < value > (,< * value >)* are allowed. - * - ** @param props the Properties object where to write the - * settings as (key, value) pair + *

+ * * @param props the Properties object where to write the + * settings as (key, value) pair */ @Override public void writeSettings(Properties props) { var choiceSequence = category2Default.entrySet().stream() .map(entry -> entry.getKey() + "-" + entry.getValue()) .collect(Collectors.joining(" , ")); - props.setProperty(KEY_DEFAULT_CHOICES, choiceSequence); + props.setProperty("[" + CATEGORY + "]" + KEY_DEFAULT_CHOICES, choiceSequence); + } + + @Override + public void readSettings(Configuration props) { + var category = props.getSection(CATEGORY); + for (Map.Entry entry : category.getEntries()) { + assert entry.getValue() instanceof String; + category2Default.put(entry.getKey(), entry.getValue().toString()); + } + } + + @Override + public void writeSettings(Configuration props) { + var category = props.getOrCreateSection(CATEGORY); + category2Default.forEach(category::set); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java new file mode 100644 index 00000000000..037d303892e --- /dev/null +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -0,0 +1,323 @@ +package de.uka.ilkd.key.settings; + +import de.uka.ilkd.key.nparser.ParsingFacade; +import de.uka.ilkd.key.util.Position; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.Writer; +import java.util.*; + +/** + * @author Alexander Weigl + * @version 1 (03.04.23) + */ +public class Configuration { + private final Map data; + private final Map meta = new HashMap<>(); + + public Configuration() { + this(new TreeMap<>()); + } + + public Configuration(Map data) { + this.data = data; + } + + public static Configuration load(File file) throws IOException { + return ParsingFacade.readConfigurationFile(file); + } + + public boolean exists(String name) { + return data.containsKey(name); + } + + public boolean exists(String name, Class clazz) { + return data.containsKey(name) && clazz.isAssignableFrom(data.get(name).getClass()); + } + + public T get(String name, Class clazz) { + if (exists(name, clazz)) return (T) data.get(name); + else return null; + } + + @Nonnull + public T get(String name, @Nonnull T defaultValue) { + if (exists(name, defaultValue.getClass())) return (T) data.get(name); + else return defaultValue; + } + + @Nullable + public Object get(String name) { + return data.get(name); + } + + public int getInt(String name) { + return get(name, Integer.class); + } + + public int getInt(String name, int defaultValue) { + return get(name, defaultValue); + } + + public long getLong(String name) { + return get(name, Integer.class); + } + + public long getLong(String name, long defaultValue) { + return getInt(name, (int) defaultValue); + } + + + public boolean getBool(String name) { + return get(name, Boolean.class); + } + + public boolean getBool(String name, boolean defaultValue) { + return get(name, defaultValue); + } + + public double getDouble(String name) { + return get(name, Double.class); + } + + public String getString(String name) { + return get(name, String.class); + } + + public String getString(String name, String defaultValue) { + return get(name, defaultValue); + } + + public Configuration getTable(String name) { + return get(name, Configuration.class); + } + + public List getList(String name) { + return get(name, List.class); + } + + public List getStringList(String name) { + var seq = get(name, List.class); + if (!seq.stream().allMatch(it -> it instanceof String)) throw new AssertionError(); + return seq; + } + + @Nonnull + public String[] getStringArray(String name, @Nonnull String[] defaultValue) { + if (exists(name)) { + return getStringList(name).toArray(new String[0]); + } else return defaultValue; + } + + + @Nullable + public ConfigurationMeta getMeta(String name) { + return meta.get(name); + } + + @Nonnull + private ConfigurationMeta getOrCreateMeta(String name) { + return Objects.requireNonNull(meta.putIfAbsent(name, new ConfigurationMeta())); + } + + + public Configuration getSection(String name) { + return get(name, Configuration.class); + } + + public Configuration getOrCreateSection(String name) { + return getSection(name, true); + } + + public Configuration getSection(String name, boolean createIfNotExists) { + if (!exists(name) && createIfNotExists) { + set(name, new Configuration()); + } + return getSection(name); + } + + public Object set(String name, Object obj) { + return data.put(name, obj); + } + + public Set> getEntries() { + return data.entrySet(); + } + + public > T getEnum(String name, T defaultValue) { + var idx = getString(name); + try { + return Enum.valueOf((Class) defaultValue.getClass(), idx); + } catch (IllegalArgumentException | NullPointerException e) { + return defaultValue; + } + } + + public void save(Writer writer, String comment) { + new ConfigurationWriter(writer).printComment(comment).printConfiguration(this); + } + + + public static class ConfigurationMeta { + private Position position; + + private String documentation; + + public Position getPosition() { + return position; + } + + public void setPosition(Position position) { + this.position = position; + } + + public String getDocumentation() { + return documentation; + } + + public void setDocumentation(String documentation) { + this.documentation = documentation; + } + } + + private static class ConfigurationWriter { + private final PrintWriter out; + private int indent; + private int equalSignPos; + + public ConfigurationWriter(Writer writer) { + this.out = new PrintWriter(writer); + } + + public ConfigurationWriter printIndent() { + for (int i = 0; i < indent; i++) { + out.format(" "); + } + return this; + } + + public ConfigurationWriter printComment(String comment) { + if (comment.contains("\n")) { + out.format("/* %s */\n", comment); + } else { + out.format("// %s\n", comment); + } + return this; + } + + public ConfigurationWriter printConfiguration(Configuration c) { + c.data.forEach((k, v) -> { + if (v != null) + printKeyValue(k, v).newline().reset(); + }); + return this; + } + + private ConfigurationWriter reset() { + equalSignPos = 0; + return this; + } + + private ConfigurationWriter printKeyValue(String key, Object value) { + return printKey(key).printValue(value); + } + + private ConfigurationWriter newline() { + out.println(); + return this; + } + + private ConfigurationWriter printValue(Object value) { + if (value instanceof String) { + out.format("\"%s\"", value); + } else if (value instanceof Long || value instanceof Integer + || value instanceof Double || value instanceof Float + || value instanceof Short || value instanceof Byte + || value instanceof Boolean) { + out.write(value.toString()); + } else if (value instanceof Collection) { + printSeq((Collection) value); + } else if (value instanceof Map) { + printMap((Map) value); + } else if (value instanceof Configuration) { + printMap(((Configuration) value).data); + } else if (value instanceof Enum) { + printValue(value.toString()); + } else if (value == null) { + printValue("null"); + } else { + throw new IllegalArgumentException("Unexpected object: " + value); + } + return this; + } + + private ConfigurationWriter printMap(Map value) { + var old = equalSignPos; + var own = equalSignPos += 2; + out.format("{ "); + for (Iterator> iterator = value.entrySet().iterator(); iterator.hasNext(); ) { + Map.Entry entry = iterator.next(); + String k = entry.getKey(); + Object v = entry.getValue(); + printKeyValue(k, v); + if (iterator.hasNext()) { + print(",").newline(); + equalSignPos = own; + fillSpaces(); + } + } + out.format(" }"); + equalSignPos = old; + return this; + } + + private void fillSpaces() { + for (int i = 0; i < equalSignPos; i++) { + print(" "); + } + } + + private ConfigurationWriter print(String s) { + out.print(s); + return this; + } + + private ConfigurationWriter printSeq(Collection value) { + var old = equalSignPos; + equalSignPos += 2; + out.format("[ "); + for (Iterator iterator = value.iterator(); iterator.hasNext(); ) { + Object o = iterator.next(); + printValue(o); + if (iterator.hasNext()) { + if (value.size() <= 5) { + print(", "); + } else { + print(","); + newline(); + fillSpaces(); + } + } + } + out.format(" ]"); + equalSignPos = old; + return this; + } + + private ConfigurationWriter printKey(String key) { + if (key.contains(" ") || key.contains("(") || key.contains(")")) { + printValue(key); + equalSignPos += key.length() + 5; + } else { + out.write(key); + equalSignPos += key.length() + 3; + } + out.format(" = "); + return this; + } + } +} diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/GeneralSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/GeneralSettings.java index 1fb154723f4..b7398c4f3e9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/GeneralSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/GeneralSettings.java @@ -24,17 +24,18 @@ public class GeneralSettings extends AbstractSettings { */ public static boolean disableSpecs = false; + private static final String CATEGORY = "General"; - private static final String TACLET_FILTER = "[General]StupidMode"; - private static final String DND_DIRECTION_SENSITIVE_KEY = "[General]DnDDirectionSensitive"; - private static final String USE_JML_KEY = "[General]UseJML"; - private static final String RIGHT_CLICK_MACROS_KEY = "[General]RightClickMacros"; - private static final String AUTO_SAVE = "[General]AutoSavePeriod"; + private static final String TACLET_FILTER = "StupidMode"; + private static final String DND_DIRECTION_SENSITIVE_KEY = "DnDDirectionSensitive"; + private static final String USE_JML_KEY = "UseJML"; + private static final String RIGHT_CLICK_MACROS_KEY = "RightClickMacros"; + private static final String AUTO_SAVE = "AutoSavePeriod"; /** * The key for storing the ensureSourceConsistency flag in settings */ - private static final String ENSURE_SOURCE_CONSISTENCY = "[General]EnsureSourceConsistency"; + private static final String ENSURE_SOURCE_CONSISTENCY = "EnsureSourceConsistency"; /** * minimize interaction is on by default @@ -144,27 +145,28 @@ public void setEnsureSourceConsistency(boolean b) { * object in a way that it represents the stored settings */ public void readSettings(Properties props) { - String val = props.getProperty(TACLET_FILTER); + var prefix = "[" + CATEGORY + "]"; + String val = props.getProperty(prefix + TACLET_FILTER); if (val != null) { setTacletFilter(Boolean.parseBoolean(val)); } - val = props.getProperty(DND_DIRECTION_SENSITIVE_KEY); + val = props.getProperty(prefix + DND_DIRECTION_SENSITIVE_KEY); if (val != null) { dndDirectionSensitive = Boolean.parseBoolean(val); } - val = props.getProperty(RIGHT_CLICK_MACROS_KEY); + val = props.getProperty(prefix + RIGHT_CLICK_MACROS_KEY); if (val != null) { setRightClickMacros(Boolean.parseBoolean(val)); } - val = props.getProperty(USE_JML_KEY); + val = props.getProperty(prefix + USE_JML_KEY); if (val != null) { setUseJML(Boolean.parseBoolean(val)); } - val = props.getProperty(AUTO_SAVE); + val = props.getProperty(prefix + AUTO_SAVE); if (val != null) { try { setAutoSave(Integer.parseInt(val)); @@ -175,7 +177,7 @@ public void readSettings(Properties props) { } } - val = props.getProperty(ENSURE_SOURCE_CONSISTENCY); + val = props.getProperty(prefix + ENSURE_SOURCE_CONSISTENCY); if (val != null) { setEnsureSourceConsistency(Boolean.parseBoolean(val)); } @@ -190,11 +192,39 @@ public void readSettings(Properties props) { */ @Override public void writeSettings(Properties props) { - props.setProperty(TACLET_FILTER, "" + tacletFilter); - props.setProperty(DND_DIRECTION_SENSITIVE_KEY, "" + dndDirectionSensitive); - props.setProperty(RIGHT_CLICK_MACROS_KEY, "" + rightClickMacros); - props.setProperty(USE_JML_KEY, "" + useJML); - props.setProperty(AUTO_SAVE, "" + autoSave); - props.setProperty(ENSURE_SOURCE_CONSISTENCY, "" + ensureSourceConsistency); + var prefix = "[" + CATEGORY + "]"; + props.setProperty(prefix+TACLET_FILTER, "" + tacletFilter); + props.setProperty(prefix+DND_DIRECTION_SENSITIVE_KEY, "" + dndDirectionSensitive); + props.setProperty(prefix+RIGHT_CLICK_MACROS_KEY, "" + rightClickMacros); + props.setProperty(prefix+USE_JML_KEY, "" + useJML); + props.setProperty(prefix+AUTO_SAVE, "" + autoSave); + props.setProperty(prefix+ENSURE_SOURCE_CONSISTENCY, "" + ensureSourceConsistency); + } + + @Override + public void readSettings(Configuration props) { + setTacletFilter(props.getBool(TACLET_FILTER)); + setDnDDirectionSensitivity(props.getBool(DND_DIRECTION_SENSITIVE_KEY)); + setRightClickMacros(props.getBool(RIGHT_CLICK_MACROS_KEY)); + setUseJML(props.getBool(USE_JML_KEY)); + try { + var autoSave = props.getInt(AUTO_SAVE); + setAutoSave(autoSave); + if (autoSave < 0) + setAutoSave(0); + } catch (NumberFormatException e) { + setAutoSave(0); + } + setEnsureSourceConsistency(props.getBool(ENSURE_SOURCE_CONSISTENCY)); + } + + @Override + public void writeSettings(Configuration props) { + props.set(TACLET_FILTER, tacletFilter); + props.set(DND_DIRECTION_SENSITIVE_KEY, dndDirectionSensitive); + props.set(RIGHT_CLICK_MACROS_KEY, rightClickMacros); + props.set(USE_JML_KEY, useJML); + props.set(AUTO_SAVE, autoSave); + props.set(ENSURE_SOURCE_CONSISTENCY, ensureSourceConsistency); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/LemmaGeneratorSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/LemmaGeneratorSettings.java index da11a755873..ced16ceac53 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/LemmaGeneratorSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/LemmaGeneratorSettings.java @@ -3,10 +3,11 @@ import java.util.Properties; public class LemmaGeneratorSettings extends AbstractSettings { + public static final String CATEGORY = "LemmaGenerator"; private static final String SHOW_DIALOG_ADDING_AXIOMS = - "[LemmaGenerator]showDialogWhenAddingAxioms"; + "showDialogWhenAddingAxioms"; private static final String SHOW_DIALOG_USING_AXIOMS = - "[LemmaGenerator]showDialogWhenUsingTacletsAsAxioms"; + "showDialogWhenUsingTacletsAsAxioms"; private boolean showDialogAddingAxioms = true; private boolean showDialogUsingAxioms = true; @@ -33,13 +34,30 @@ public void setShowDialogUsingAxioms(boolean value) { @Override public void readSettings(Properties props) { - setShowDialogAddingAxioms(SettingsConverter.read(props, SHOW_DIALOG_ADDING_AXIOMS, true)); - setShowDialogUsingAxioms(SettingsConverter.read(props, SHOW_DIALOG_USING_AXIOMS, true)); + setShowDialogAddingAxioms(SettingsConverter.read(props, + "[" + CATEGORY + "]" + SHOW_DIALOG_ADDING_AXIOMS, true)); + setShowDialogUsingAxioms(SettingsConverter.read(props, + "[" + CATEGORY + "]" + SHOW_DIALOG_USING_AXIOMS, true)); } @Override public void writeSettings(Properties props) { - SettingsConverter.store(props, SHOW_DIALOG_ADDING_AXIOMS, showDialogAddingAxioms); - SettingsConverter.store(props, SHOW_DIALOG_USING_AXIOMS, showDialogUsingAxioms); + SettingsConverter.store(props, "[" + CATEGORY + "]" + SHOW_DIALOG_ADDING_AXIOMS, showDialogAddingAxioms); + SettingsConverter.store(props, "[" + CATEGORY + "]" + SHOW_DIALOG_USING_AXIOMS, showDialogUsingAxioms); + } + + @Override + public void readSettings(Configuration props) { + var cat = props.getSection(CATEGORY); + if (cat == null) return; + setShowDialogAddingAxioms(cat.getBool(SHOW_DIALOG_ADDING_AXIOMS, true)); + setShowDialogUsingAxioms(cat.getBool(SHOW_DIALOG_USING_AXIOMS, true)); + } + + @Override + public void writeSettings(Configuration props) { + var cat = props.getOrCreateSection(CATEGORY); + cat.set(SHOW_DIALOG_ADDING_AXIOMS, showDialogAddingAxioms); + cat.set(SHOW_DIALOG_USING_AXIOMS, showDialogUsingAxioms); } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/NewSMTTranslationSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/NewSMTTranslationSettings.java index 4d4d7735e33..d45a4a29174 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/NewSMTTranslationSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/NewSMTTranslationSettings.java @@ -1,23 +1,18 @@ package de.uka.ilkd.key.settings; - -import java.util.Collections; -import java.util.LinkedHashMap; -import java.util.Map; +import java.util.*; import java.util.Map.Entry; -import java.util.Objects; -import java.util.Properties; /** * A collection of settings for the new (= 2021) SMT translation. - * + *

* Unlike the other settings, these settings do not have a fixed set of keys but are driven by * arbitrary keys. - * + *

* Hence, all that this class here does, is to essentially delegate methods to the underlying hash * map. - * + *

* The list of available settings can be retrieved from * {@link de.uka.ilkd.key.smt.newsmt2.SMTHandlerServices#getSMTProperties()}. * @@ -77,6 +72,25 @@ public void writeSettings(Properties props) { } } + @Override + public void readSettings(Configuration props) { + var newSmt = props.getSection("NewSMT"); + if (newSmt == null) return; + for (var entry : newSmt.getEntries()) { + final var value = entry.getValue(); + assert value instanceof String; + map.put(entry.getKey(), value.toString()); + } + } + + @Override + public void writeSettings(Configuration props) { + var newSmt = props.getOrCreateSection("NewSMT"); + for (Entry en : map.entrySet()) { + newSmt.set(en.getKey(), en.getValue()); + } + } + /** * Retreive an immutable view onto the underlying hash map @@ -100,7 +114,7 @@ public String get(String key) { /** * Set a key-value-pair. All listeners are informed after the internal hashmap has been updated. * - * @param key the non-null key to set + * @param key the non-null key to set * @param value the non-null value to set * @return the value that was in the map prior to the call (see {@link Map#put(Object, Object)}. */ diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java index 9599b2da244..eb21454948a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java @@ -1,23 +1,24 @@ package de.uka.ilkd.key.settings; -import java.util.Properties; - import de.uka.ilkd.key.taclettranslation.assumptions.SupportedTaclets; +import java.util.Properties; + public class ProofDependentSMTSettings extends AbstractSettings { + public static final String CATEGORY = "SMTSettings"; public static final String EXPLICIT_TYPE_HIERARCHY = "[SMTSettings]explicitTypeHierarchy"; public static final String INSTANTIATE_NULL_PREDICATES = - "[SMTSettings]instantiateHierarchyAssumptions"; + "[SMTSettings]instantiateHierarchyAssumptions"; public static final String MAX_GENERIC_SORTS = "[SMTSettings]maxGenericSorts"; public static final String TACLET_SELECTION = "[SMTSettings]SelectedTaclets"; public static final String USE_BUILT_IN_UNIQUENESS = "[SMTSettings]UseBuiltUniqueness"; public static final String USE_UNINTERPRETED_MULTIPLICATION = - "[SMTSettings]useUninterpretedMultiplication"; + "[SMTSettings]useUninterpretedMultiplication"; public static final String USE_CONSTANTS_FOR_BIGSMALL_INTEGERS = - "[SMTSettings]useConstantsForBigOrSmallIntegers"; + "[SMTSettings]useConstantsForBigOrSmallIntegers"; public static final String INTEGERS_MAXIMUM = "[SMTSettings]integersMaximum"; public static final String INTEGERS_MINIMUM = "[SMTSettings]integersMinimum"; public static final String INVARIANT_FORALL = "[SMTSettings]invariantForall"; @@ -32,8 +33,8 @@ public class ProofDependentSMTSettings extends AbstractSettings { private boolean useConstantsForIntegers = true; private boolean invariantForall = false; private int maxGenericSorts = 2; - private long maxInteger = 2147483645; - private long minInteger = -2147483645; + private int maxInteger = 2147483645; + private int minInteger = -2147483645; private boolean useLegacyTranslation = false; @@ -49,7 +50,7 @@ private ProofDependentSMTSettings(ProofDependentSMTSettings data) { public void copy(ProofDependentSMTSettings data) { setSupportedTaclets( - new SupportedTaclets(data.supportedTaclets.getNamesOfSelectedTaclets())); + new SupportedTaclets(data.supportedTaclets.getNamesOfSelectedTaclets())); setUseExplicitTypeHierarchy(data.useExplicitTypeHierarchy); setUseNullInstantiation(data.useNullInstantiation); setMaxGenericSorts(data.maxGenericSorts); @@ -77,40 +78,77 @@ public ProofDependentSMTSettings clone() { @Override public void readSettings(Properties props) { + var prefix = "[" + CATEGORY + "]"; setUseExplicitTypeHierarchy( - SettingsConverter.read(props, EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy)); + SettingsConverter.read(props, prefix + EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy)); setUseNullInstantiation( - SettingsConverter.read(props, INSTANTIATE_NULL_PREDICATES, useNullInstantiation)); + SettingsConverter.read(props, prefix + INSTANTIATE_NULL_PREDICATES, useNullInstantiation)); setUseBuiltInUniqueness( - SettingsConverter.read(props, USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness)); - setMaxGenericSorts(SettingsConverter.read(props, MAX_GENERIC_SORTS, maxGenericSorts)); + SettingsConverter.read(props, prefix + USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness)); + setMaxGenericSorts(SettingsConverter.read(props, prefix + MAX_GENERIC_SORTS, maxGenericSorts)); setUseUIMultiplication( - SettingsConverter.read(props, USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication)); + SettingsConverter.read(props, prefix + USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication)); setUseConstantsForIntegers( - SettingsConverter.read(props, USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, - useConstantsForIntegers)); - - setMaxInteger(SettingsConverter.read(props, INTEGERS_MAXIMUM, maxInteger)); - setMinInteger(SettingsConverter.read(props, INTEGERS_MINIMUM, minInteger)); - setInvariantForall(SettingsConverter.read(props, INVARIANT_FORALL, invariantForall)); - supportedTaclets.selectTaclets(SettingsConverter.read(props, TACLET_SELECTION, - supportedTaclets.getNamesOfSelectedTaclets())); + SettingsConverter.read(props, prefix + USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, + useConstantsForIntegers)); + + setMaxInteger(SettingsConverter.read(props, prefix + INTEGERS_MAXIMUM, maxInteger)); + setMinInteger(SettingsConverter.read(props, prefix + INTEGERS_MINIMUM, minInteger)); + setInvariantForall(SettingsConverter.read(props, prefix + INVARIANT_FORALL, invariantForall)); + supportedTaclets.selectTaclets(SettingsConverter.read(props, prefix + TACLET_SELECTION, + supportedTaclets.getNamesOfSelectedTaclets())); } @Override public void writeSettings(Properties props) { - SettingsConverter.store(props, EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy); - SettingsConverter.store(props, INSTANTIATE_NULL_PREDICATES, useNullInstantiation); - SettingsConverter.store(props, MAX_GENERIC_SORTS, maxGenericSorts); - SettingsConverter.store(props, TACLET_SELECTION, - supportedTaclets.getNamesOfSelectedTaclets()); - SettingsConverter.store(props, USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness); - SettingsConverter.store(props, USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication); - SettingsConverter.store(props, USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, - useConstantsForIntegers); - SettingsConverter.store(props, INTEGERS_MAXIMUM, maxInteger); - SettingsConverter.store(props, INTEGERS_MINIMUM, minInteger); - SettingsConverter.store(props, INVARIANT_FORALL, invariantForall); + var prefix = "[" + CATEGORY + "]"; + SettingsConverter.store(props, prefix + EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy); + SettingsConverter.store(props, prefix + INSTANTIATE_NULL_PREDICATES, useNullInstantiation); + SettingsConverter.store(props, prefix + MAX_GENERIC_SORTS, maxGenericSorts); + SettingsConverter.store(props, prefix + TACLET_SELECTION, + supportedTaclets.getNamesOfSelectedTaclets()); + SettingsConverter.store(props, prefix + USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness); + SettingsConverter.store(props, prefix + USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication); + SettingsConverter.store(props, prefix + USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, + useConstantsForIntegers); + SettingsConverter.store(props, prefix + INTEGERS_MAXIMUM, maxInteger); + SettingsConverter.store(props, prefix + INTEGERS_MINIMUM, minInteger); + SettingsConverter.store(props, prefix + INVARIANT_FORALL, invariantForall); + } + + @Override + public void readSettings(Configuration props) { + props = props.getSection(CATEGORY); + + if (props == null) return; + + setUseExplicitTypeHierarchy(props.getBool(EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy)); + setUseNullInstantiation(props.getBool(INSTANTIATE_NULL_PREDICATES, useNullInstantiation)); + setUseBuiltInUniqueness(props.getBool(USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness)); + setMaxGenericSorts(props.getInt(MAX_GENERIC_SORTS, maxGenericSorts)); + setUseUIMultiplication(props.getBool(USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication)); + setUseConstantsForIntegers(props.getBool(USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, useConstantsForIntegers)); + setMaxInteger(props.getInt(INTEGERS_MAXIMUM, maxInteger)); + setMinInteger(props.getInt(INTEGERS_MINIMUM, minInteger)); + setInvariantForall(props.getBool(INVARIANT_FORALL, invariantForall)); + supportedTaclets.selectTaclets( + props.getStringArray(TACLET_SELECTION, supportedTaclets.getNamesOfSelectedTaclets())); + + } + + @Override + public void writeSettings(Configuration props) { + props = props.getOrCreateSection(CATEGORY); + props.set(EXPLICIT_TYPE_HIERARCHY, useExplicitTypeHierarchy); + props.set(INSTANTIATE_NULL_PREDICATES, useNullInstantiation); + props.set(MAX_GENERIC_SORTS, maxGenericSorts); + props.set(TACLET_SELECTION, supportedTaclets.getNamesOfSelectedTaclets()); + props.set(USE_BUILT_IN_UNIQUENESS, useBuiltInUniqueness); + props.set(USE_UNINTERPRETED_MULTIPLICATION, useUIMultiplication); + props.set(USE_CONSTANTS_FOR_BIGSMALL_INTEGERS, useConstantsForIntegers); + props.set(INTEGERS_MAXIMUM, maxInteger); + props.set(INTEGERS_MINIMUM, minInteger); + props.set(INVARIANT_FORALL, invariantForall); } public boolean isUseExplicitTypeHierarchy() { @@ -189,7 +227,7 @@ public long getMaxInteger() { public void setMaxInteger(long maxInteger) { var old = this.maxInteger; - this.maxInteger = maxInteger; + this.maxInteger = (int) maxInteger; firePropertyChange(INTEGERS_MAXIMUM, old, maxInteger); } @@ -199,7 +237,7 @@ public long getMinInteger() { public void setMinInteger(long minInteger) { var old = this.minInteger; - this.minInteger = minInteger; + this.minInteger = (int) minInteger; firePropertyChange(INTEGERS_MINIMUM, old, minInteger); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java index 6b87625e0c9..b78da917d93 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java @@ -1,49 +1,50 @@ package de.uka.ilkd.key.settings; -import java.util.*; -import java.util.stream.Collectors; - import de.uka.ilkd.key.smt.SolverTypeCollection; import de.uka.ilkd.key.smt.solvertypes.SolverType; import de.uka.ilkd.key.smt.solvertypes.SolverTypes; -public final class ProofIndependentSMTSettings - extends AbstractSettings { +import java.util.Collection; +import java.util.LinkedList; +import java.util.Optional; +import java.util.Properties; +import java.util.stream.Collectors; - public static final String ACTIVE_SOLVER = "[SMTSettings]ActiveSolver"; - public static final String KEY_TIMEOUT = "[SMTSettings]SolverTimeout"; - public static final String PATH_FOR_SMT_TRANSLATION = "[SMTSettings]pathForSMTTranslation"; - public static final String PATH_FOR_TACLET_TRANSLATION = - "[SMTSettings]pathForTacletTranslation"; - public static final String SHOW_SMT_RES_DIA = "[SMTSettings]showSMTResDialog"; - public static final String PROGRESS_DIALOG_MODE = "[SMTSettings]modeOfProgressDialog"; - public static final String MAX_CONCURRENT_PROCESSES = "[SMTSettings]maxConcurrentProcesses"; +public final class ProofIndependentSMTSettings extends AbstractSettings { + private static final String CATEGORY = "SMTSettings"; + public static final String ACTIVE_SOLVER = "ActiveSolver"; + public static final String KEY_TIMEOUT = "SolverTimeout"; + public static final String PATH_FOR_SMT_TRANSLATION = "pathForSMTTranslation"; + public static final String PATH_FOR_TACLET_TRANSLATION = "pathForTacletTranslation"; + public static final String SHOW_SMT_RES_DIA = "showSMTResDialog"; + public static final String PROGRESS_DIALOG_MODE = "modeOfProgressDialog"; + public static final String MAX_CONCURRENT_PROCESSES = "maxConcurrentProcesses"; /* * The following properties are used to set the bit sizes for bounded counter example * generation. */ - public static final String INT_BOUND = "[SMTSettings]intBound"; - public static final String HEAP_BOUND = "[SMTSettings]heapBound"; - public static final String FIELD_BOUND = "[SMTSettings]fieldBound"; - public static final String OBJECT_BOUND = "[SMTSettings]objectBound"; - public static final String LOCSET_BOUND = "[SMTSettings]locsetBound"; + public static final String INT_BOUND = "intBound"; + public static final String HEAP_BOUND = "heapBound"; + public static final String FIELD_BOUND = "fieldBound"; + public static final String OBJECT_BOUND = "objectBound"; + public static final String LOCSET_BOUND = "locsetBound"; - public static final String SOLVER_PARAMETERS = "[SMTSettings]solverParametersV1"; - public static final String SOLVER_COMMAND = "[SMTSettings]solverCommand"; - public static final String PROP_TIMEOUT = "[SMTSettings]timeout"; - public static final String SOLVER_CHECK_FOR_SUPPORT = "[SMTSettings]checkForSupport"; + public static final String SOLVER_PARAMETERS = "solverParametersV1"; + public static final String SOLVER_COMMAND = "solverCommand"; + public static final String PROP_TIMEOUT = "timeout"; + public static final String SOLVER_CHECK_FOR_SUPPORT = "checkForSupport"; private static final ProofIndependentSMTSettings DEFAULT_DATA = - new ProofIndependentSMTSettings(); + new ProofIndependentSMTSettings(); private static final int DEFAULT_BIT_LENGTH_FOR_CE_GENERATION = 3; public static final String PROP_SOLVER_UNION = "activeSolverUnion"; public static final String PROP_SHOW_RESULT_AFTER_EXECUTION = - "PROP_SHOW_RESULT_AFTER_EXECUTION"; + "PROP_SHOW_RESULT_AFTER_EXECUTION"; public static final String PROP_STORE_SMT_TRANSLATION_FILE = "PROP_STORE_SMT_TRANSLATION_FILE"; public static final String PROP_STORE_TACLET_TRANSLATION_FILE = - "PROP_STORE_TACLET_TRANSLATION_FILE"; + "PROP_STORE_TACLET_TRANSLATION_FILE"; private final Collection solverTypes = new LinkedList<>(); private boolean showResultsAfterExecution = false; @@ -129,7 +130,7 @@ public void setStoreTacletTranslationToFile(boolean storeTacletTranslationToFile var old = this.storeTacletTranslationToFile; this.storeTacletTranslationToFile = storeTacletTranslationToFile; firePropertyChange(PROP_STORE_TACLET_TRANSLATION_FILE, old, - this.storeTacletTranslationToFile); + this.storeTacletTranslationToFile); } @@ -257,8 +258,6 @@ public enum ProgressMode { USER, CLOSE, CLOSE_FIRST } - private final Map dataOfSolvers = new LinkedHashMap<>(); - public int getMaxConcurrentProcesses() { return maxConcurrentProcesses; } @@ -333,55 +332,113 @@ public ProofIndependentSMTSettings clone() { } public void readSettings(Properties props) { - timeout = SettingsConverter.read(props, KEY_TIMEOUT, timeout); + var prefix = "[" + CATEGORY + "]"; + + timeout = SettingsConverter.read(props, prefix + KEY_TIMEOUT, timeout); showResultsAfterExecution = - SettingsConverter.read(props, SHOW_SMT_RES_DIA, showResultsAfterExecution); + SettingsConverter.read(props, prefix + SHOW_SMT_RES_DIA, showResultsAfterExecution); pathForSMTTranslation = - SettingsConverter.read(props, PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); + SettingsConverter.read(props, prefix + PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); pathForTacletTranslation = - SettingsConverter.read(props, PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); - modeOfProgressDialog = SettingsConverter.read(props, PROGRESS_DIALOG_MODE, - modeOfProgressDialog, ProgressMode.values()); + SettingsConverter.read(props, prefix + PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); + modeOfProgressDialog = SettingsConverter.read(props, prefix + PROGRESS_DIALOG_MODE, + modeOfProgressDialog, ProgressMode.values()); maxConcurrentProcesses = - SettingsConverter.read(props, MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses); - checkForSupport = SettingsConverter.read(props, SOLVER_CHECK_FOR_SUPPORT, checkForSupport); - intBound = SettingsConverter.read(props, INT_BOUND, intBound); - heapBound = SettingsConverter.read(props, HEAP_BOUND, heapBound); - seqBound = SettingsConverter.read(props, FIELD_BOUND, seqBound); - locsetBound = SettingsConverter.read(props, LOCSET_BOUND, locsetBound); - objectBound = SettingsConverter.read(props, OBJECT_BOUND, objectBound); + SettingsConverter.read(props, prefix + MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses); + checkForSupport = SettingsConverter.read(props, prefix + SOLVER_CHECK_FOR_SUPPORT, checkForSupport); + intBound = SettingsConverter.read(props, prefix + INT_BOUND, intBound); + heapBound = SettingsConverter.read(props, prefix + HEAP_BOUND, heapBound); + seqBound = SettingsConverter.read(props, prefix + FIELD_BOUND, seqBound); + locsetBound = SettingsConverter.read(props, prefix + LOCSET_BOUND, locsetBound); + objectBound = SettingsConverter.read(props, prefix + OBJECT_BOUND, objectBound); for (SolverType type : solverTypes) { - type.setSolverTimeout(SettingsConverter.read(props, PROP_TIMEOUT + type.getName(), - type.getDefaultSolverTimeout())); + type.setSolverTimeout(SettingsConverter.read(props, prefix + PROP_TIMEOUT + type.getName(), + type.getDefaultSolverTimeout())); type.setSolverParameters(SettingsConverter.read(props, - SOLVER_PARAMETERS + type.getName(), type.getDefaultSolverParameters())); - type.setSolverCommand(SettingsConverter.read(props, SOLVER_COMMAND + type.getName(), - type.getDefaultSolverCommand())); + prefix + SOLVER_PARAMETERS + type.getName(), type.getDefaultSolverParameters())); + type.setSolverCommand(SettingsConverter.read(props, prefix + SOLVER_COMMAND + type.getName(), + type.getDefaultSolverCommand())); } } public void writeSettings(Properties props) { - SettingsConverter.store(props, KEY_TIMEOUT, timeout); - SettingsConverter.store(props, SHOW_SMT_RES_DIA, showResultsAfterExecution); - SettingsConverter.store(props, PROGRESS_DIALOG_MODE, modeOfProgressDialog); - SettingsConverter.store(props, PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); - SettingsConverter.store(props, PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); - SettingsConverter.store(props, ACTIVE_SOLVER, activeSolver); - SettingsConverter.store(props, MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses); - SettingsConverter.store(props, SOLVER_CHECK_FOR_SUPPORT, checkForSupport); - SettingsConverter.store(props, INT_BOUND, intBound); - SettingsConverter.store(props, HEAP_BOUND, heapBound); - SettingsConverter.store(props, OBJECT_BOUND, objectBound); - SettingsConverter.store(props, FIELD_BOUND, seqBound); - SettingsConverter.store(props, LOCSET_BOUND, locsetBound); + var prefix = "[" + CATEGORY + "]"; + SettingsConverter.store(props, prefix + KEY_TIMEOUT, timeout); + SettingsConverter.store(props, prefix + SHOW_SMT_RES_DIA, showResultsAfterExecution); + SettingsConverter.store(props, prefix + PROGRESS_DIALOG_MODE, modeOfProgressDialog); + SettingsConverter.store(props, prefix + PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); + SettingsConverter.store(props, prefix + PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); + SettingsConverter.store(props, prefix + ACTIVE_SOLVER, activeSolver); + SettingsConverter.store(props, prefix + MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses); + SettingsConverter.store(props, prefix + SOLVER_CHECK_FOR_SUPPORT, checkForSupport); + SettingsConverter.store(props, prefix + INT_BOUND, intBound); + SettingsConverter.store(props, prefix + HEAP_BOUND, heapBound); + SettingsConverter.store(props, prefix + OBJECT_BOUND, objectBound); + SettingsConverter.store(props, prefix + FIELD_BOUND, seqBound); + SettingsConverter.store(props, prefix + LOCSET_BOUND, locsetBound); for (SolverType type : solverTypes) { - SettingsConverter.store(props, PROP_TIMEOUT + type.getName(), type.getSolverTimeout()); - SettingsConverter.store(props, SOLVER_PARAMETERS + type.getName(), - type.getSolverParameters()); - SettingsConverter.store(props, SOLVER_COMMAND + type.getName(), - type.getSolverCommand()); + SettingsConverter.store(props, prefix + PROP_TIMEOUT + type.getName(), type.getSolverTimeout()); + SettingsConverter.store(props, prefix + SOLVER_PARAMETERS + type.getName(), + type.getSolverParameters()); + SettingsConverter.store(props, prefix + SOLVER_COMMAND + type.getName(), + type.getSolverCommand()); + } + } + + @Override + public void readSettings(Configuration props) { + var cat = props.getSection(CATEGORY); + if (cat == null) return; + + setTimeout(cat.getLong(KEY_TIMEOUT, timeout)); + setShowResultsAfterExecution(cat.getBool(SHOW_SMT_RES_DIA, showResultsAfterExecution)); + setPathForSMTTranslation(cat.getString(PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation)); + setPathForTacletTranslation(cat.getString(PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation)); + setModeOfProgressDialog(cat.getEnum(PROGRESS_DIALOG_MODE, modeOfProgressDialog)); + setMaxConcurrentProcesses(cat.getInt(MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses)); + setCheckForSupport(cat.getBool(SOLVER_CHECK_FOR_SUPPORT, checkForSupport)); + setIntBound(cat.getLong(INT_BOUND, intBound)); + setHeapBound(cat.getLong(HEAP_BOUND, heapBound)); + setSeqBound(cat.getLong(FIELD_BOUND, seqBound)); + setLocsetBound(cat.getLong(LOCSET_BOUND, locsetBound)); + setObjectBound(cat.getLong(OBJECT_BOUND, objectBound)); + + for (SolverType type : solverTypes) { + var solver = cat.getTable(type.getName()); + if (solver == null) return; + + type.setSolverParameters(props.getString(SOLVER_PARAMETERS, type.getDefaultSolverParameters())); + type.setSolverTimeout(solver.getLong(PROP_TIMEOUT, type.getDefaultSolverTimeout())); + type.setSolverCommand(solver.getString(SOLVER_COMMAND, type.getDefaultSolverCommand())); + } + } + + @Override + public void writeSettings(Configuration props) { + var cat = props.getOrCreateSection(CATEGORY); + + cat.set(KEY_TIMEOUT, timeout); + cat.set(SHOW_SMT_RES_DIA, showResultsAfterExecution); + cat.set(PROGRESS_DIALOG_MODE, modeOfProgressDialog); + cat.set(PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); + cat.set(PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); + cat.set(ACTIVE_SOLVER, activeSolver); + cat.set(MAX_CONCURRENT_PROCESSES, maxConcurrentProcesses); + cat.set(SOLVER_CHECK_FOR_SUPPORT, checkForSupport); + cat.set(INT_BOUND, intBound); + cat.set(HEAP_BOUND, heapBound); + cat.set(OBJECT_BOUND, objectBound); + cat.set(FIELD_BOUND, seqBound); + cat.set(LOCSET_BOUND, locsetBound); + + for (SolverType type : solverTypes) { + var solver = new Configuration(); + solver.set(SOLVER_PARAMETERS, type.getSolverParameters()); + solver.set(SOLVER_COMMAND, type.getSolverCommand()); + solver.set(PROP_TIMEOUT, type.getSolverTimeout()); + cat.set(type.getName(), solver); } } @@ -434,95 +491,4 @@ public Collection getSolverUnions(boolean experimental) { return res; } - public static class SolverData extends AbstractSettings { - private String solverParameters = ""; - private String solverCommand = ""; - private long timeout = -1; - private final SolverType type; - - public SolverData(SolverType type) { - this(type, type.getDefaultSolverCommand(), type.getDefaultSolverParameters()); - } - - private SolverData(SolverType type, String command, String parameters) { - this(type, command, parameters, -1); - } - - public SolverData(SolverType type, String command, String parameters, long timeout) { - this.type = type; - setSolverCommand(command); - setSolverParameters(parameters); - setTimeout(timeout); - } - - @Override - public void readSettings(Properties props) { - setSolverParameters(SettingsConverter.read(props, - SOLVER_PARAMETERS + getType().getName(), getSolverParameters())); - setTimeout( - SettingsConverter.read(props, PROP_TIMEOUT + getType().getName(), getTimeout())); - setSolverCommand(SettingsConverter.read(props, - SOLVER_COMMAND + getType().getName(), getSolverCommand())); - getType().setSolverParameters(getSolverParameters()); - getType().setSolverCommand(getSolverCommand()); - - } - - @Override - public void writeSettings(Properties props) { - SettingsConverter.store(props, SOLVER_PARAMETERS + getType().getName(), - getSolverParameters()); - SettingsConverter.store(props, SOLVER_COMMAND + getType().getName(), - getSolverCommand()); - SettingsConverter.store(props, PROP_TIMEOUT + getType().getName(), getTimeout()); - getType().setSolverParameters(getSolverParameters()); - getType().setSolverCommand(getSolverCommand()); - } - - - public SolverData clone() { - return new SolverData(getType(), getSolverCommand(), getSolverParameters(), - getTimeout()); - } - - public String toString() { - return getType().getName(); - } - - public String getSolverParameters() { - return solverParameters; - } - - public void setSolverParameters(String solverParameters) { - var old = this.solverParameters; - this.solverParameters = solverParameters; - firePropertyChange(SOLVER_PARAMETERS, old, this.solverParameters); - - } - - public String getSolverCommand() { - return solverCommand; - } - - public void setSolverCommand(String solverCommand) { - var old = this.solverCommand; - this.solverCommand = solverCommand; - firePropertyChange(SOLVER_COMMAND, old, this.solverCommand); - - } - - public SolverType getType() { - return type; - } - - public long getTimeout() { - return timeout; - } - - public void setTimeout(long timeout) { - var old = this.timeout; - this.timeout = timeout; - firePropertyChange(KEY_TIMEOUT, old, this.timeout); - } - } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java index 5c5d0bbcdd1..c3640d97340 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java @@ -1,20 +1,16 @@ package de.uka.ilkd.key.settings; +import de.uka.ilkd.key.pp.NotationInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.beans.PropertyChangeListener; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; +import java.io.*; import java.util.Date; import java.util.LinkedList; import java.util.List; import java.util.Properties; -import de.uka.ilkd.key.pp.NotationInfo; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Top of the proof independent settings. @@ -26,29 +22,43 @@ public class ProofIndependentSettings { private static final Logger LOGGER = LoggerFactory.getLogger(ProofIndependentSettings.class); - public static final ProofIndependentSettings DEFAULT_INSTANCE = - new ProofIndependentSettings(PathConfig.getProofIndependentSettings()); + public static final ProofIndependentSettings DEFAULT_INSTANCE; + + static { + var file = new File(PathConfig.getProofIndependentSettings().replace(".props", ".toml")); + if (file.exists()) { + DEFAULT_INSTANCE = new ProofIndependentSettings(file); + } else { + var old = new File(PathConfig.getProofIndependentSettings()); + DEFAULT_INSTANCE = new ProofIndependentSettings(old); + } + } private final ProofIndependentSMTSettings smtSettings = - ProofIndependentSMTSettings.getDefaultSettingsData(); + ProofIndependentSMTSettings.getDefaultSettingsData(); private final LemmaGeneratorSettings lemmaGeneratorSettings = new LemmaGeneratorSettings(); private final GeneralSettings generalSettings = new GeneralSettings(); private final ViewSettings viewSettings = new ViewSettings(); private final TermLabelSettings termLabelSettings = new TermLabelSettings(); - private final String filename; + private File filename; private final List settings = new LinkedList<>(); private final PropertyChangeListener settingsListener = e -> saveSettings(); private Properties lastReadedProperties; + private Configuration lastReadedConfiguration; - private ProofIndependentSettings(String filename) { + private ProofIndependentSettings() { addSettings(smtSettings); addSettings(lemmaGeneratorSettings); addSettings(generalSettings); addSettings(viewSettings); + } + + private ProofIndependentSettings(File filename) { + this(); this.filename = filename; loadSettings(); } @@ -65,13 +75,12 @@ public void addSettings(Settings settings) { private void loadSettings() { try { - File testFile = new File(filename); - if (testFile.exists()) { + if (filename.exists()) { if (Boolean.getBoolean(PathConfig.DISREGARD_SETTINGS_PROPERTY)) { LOGGER.warn("The settings in {} are *not* read due to flag '{}'", filename, - PathConfig.DISREGARD_SETTINGS_PROPERTY); + PathConfig.DISREGARD_SETTINGS_PROPERTY); } else { - load(testFile); + load(filename); } } } catch (IOException e) { @@ -80,29 +89,46 @@ private void loadSettings() { } private void load(File file) throws IOException { - try (FileInputStream in = new FileInputStream(file)) { - Properties properties = new Properties(); - properties.load(in); - for (Settings settings : settings) { - settings.readSettings(properties); + if (!file.getName().endsWith(".toml")) { + try (FileInputStream in = new FileInputStream(file)) { + Properties properties = new Properties(); + properties.load(in); + for (Settings settings : settings) { + settings.readSettings(properties); + } + lastReadedProperties = properties; } - lastReadedProperties = properties; + } else { + this.lastReadedConfiguration = Configuration.load(file); } } public void saveSettings() { - Properties result = new Properties(); - for (Settings settings : settings) { - settings.writeSettings(result); + if (!filename.getName().endsWith(".toml")) { + Properties result = new Properties(); + for (Settings settings : settings) { + settings.writeSettings(result); + } + + if (!filename.exists()) { + filename.getParentFile().mkdirs(); + } + + try (var out = new FileOutputStream(filename)) { + result.store(out, "Proof-Independent-Settings-File. Generated " + new Date()); + } catch (IOException e) { + throw new RuntimeException(e); + } } - File file = new File(filename); - if (!file.exists()) { - file.getParentFile().mkdirs(); + Configuration config = new Configuration(); + for (var settings : settings) settings.writeSettings(config); + if (!filename.exists()) { + filename.getParentFile().mkdirs(); } - try (FileOutputStream out = new FileOutputStream(file)) { - result.store(out, "Proof-Independent-Settings-File. Generated " + new Date()); + try (var out = new BufferedWriter(new FileWriter(filename.toString().replace(".props", ".toml")))) { + config.save(out, "Proof-Independent-Settings-File. Generated " + new Date()); } catch (IOException e) { throw new RuntimeException(e); } @@ -141,7 +167,7 @@ public static boolean isUsePrettyPrinting() { * Defines if pretty printing is enabled or not. * * @param usePrettyPrinting {@code true} pretty printing is enabled, {@code false} pretty - * printing is disabled. + * printing is disabled. */ public static void setUsePrettyPrinting(boolean usePrettyPrinting) { ProofIndependentSettings.DEFAULT_INSTANCE.getViewSettings().setUsePretty(usePrettyPrinting); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java index 988c9042465..fa062db059d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java @@ -22,6 +22,20 @@ public interface Settings { */ void writeSettings(Properties props); + /** + * gets a Properties object and has to perform the necessary steps in order to change this + * object in a way that it represents the stored settings + */ + void readSettings(Configuration props); + + /** + * The settings to store are written to the given Properties object. + * + * @param props the Properties object where to write the settings as (key, value) pair + */ + void writeSettings(Configuration props); + + void addPropertyChangeListener(PropertyChangeListener listener); void removePropertyChangeListener(PropertyChangeListener listener); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java index 5a6b2ea5abc..bc156379049 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java @@ -1,8 +1,5 @@ package de.uka.ilkd.key.settings; -import java.util.Objects; -import java.util.Properties; - import de.uka.ilkd.key.logic.Name; import de.uka.ilkd.key.proof.Goal; import de.uka.ilkd.key.prover.GoalChooser; @@ -11,17 +8,21 @@ import de.uka.ilkd.key.prover.impl.ApplyStrategy; import de.uka.ilkd.key.strategy.JavaCardDLStrategyFactory; import de.uka.ilkd.key.strategy.StrategyProperties; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Objects; +import java.util.Properties; + public class StrategySettings extends AbstractSettings { public static final Logger LOGGER = LoggerFactory.getLogger(StrategySettings.class); - public static final String STRATEGY_KEY = "[Strategy]ActiveStrategy"; - public static final String STEPS_KEY = "[Strategy]MaximumNumberOfAutomaticApplications"; - public static final String TIMEOUT_KEY = "[Strategy]Timeout"; + public static final String CATEGORY = "Strategy"; + + public static final String STRATEGY_KEY = "ActiveStrategy"; + public static final String STEPS_KEY = "MaximumNumberOfAutomaticApplications"; + public static final String TIMEOUT_KEY = "Timeout"; private static final String PROP_STRATEGY_PROPERTIES = "strategyProperties"; @@ -30,7 +31,7 @@ public class StrategySettings extends AbstractSettings { /** * maximal number of automatic rule applications before an interaction is required */ - private int maxSteps = -1; + private int maxSteps = 10000; /** * maximal time in ms after which automatic rule application is aborted @@ -98,9 +99,9 @@ public void setStrategy(Name name) { * @see de.uka.ilkd.key.gui.Settings#readSettings(java.util.Properties) */ public void readSettings(Properties props) { - String numString = props.getProperty(STEPS_KEY); - String strategyString = props.getProperty(STRATEGY_KEY); - String timeoutString = props.getProperty(TIMEOUT_KEY); + String numString = props.getProperty("["+CATEGORY+"]"+STEPS_KEY); + String strategyString = props.getProperty("["+CATEGORY+"]"+STRATEGY_KEY); + String timeoutString = props.getProperty("["+CATEGORY+"]"+TIMEOUT_KEY); long localTimeout = -1; int numSteps = 10000; @@ -110,9 +111,9 @@ public void readSettings(Properties props) { numSteps = Integer.parseInt(numString); } catch (NumberFormatException e) { LOGGER.debug("StrategySettings: failure while converting the string " - + "with the allowed steps of heuristics applications to int." - + "Use default value 1000 instead." - + "\nThe String that has been tried to convert was {}", numString); + + "with the allowed steps of heuristics applications to int." + + "Use default value 1000 instead." + + "\nThe String that has been tried to convert was {}", numString); } } @@ -121,8 +122,8 @@ public void readSettings(Properties props) { localTimeout = Long.parseLong(timeoutString); } catch (NumberFormatException e) { LOGGER.debug("StrategySettings: failure while converting the string " - + "with rule application timeout. " - + "\nThe String that has been tried to convert was {}", timeoutString); + + "with rule application timeout. " + + "\nThe String that has been tried to convert was {}", timeoutString); } } @@ -164,10 +165,58 @@ public void writeSettings(Properties props) { if (maxSteps < 0) { setMaxSteps(10000); } - props.setProperty(STRATEGY_KEY, getStrategy().toString()); - props.setProperty(STEPS_KEY, String.valueOf(getMaxSteps())); + props.setProperty("["+CATEGORY+"]"+STRATEGY_KEY, getStrategy().toString()); + props.setProperty("["+CATEGORY+"]"+STEPS_KEY, String.valueOf(getMaxSteps())); + props.setProperty("["+CATEGORY+"]"+TIMEOUT_KEY, String.valueOf(getTimeout())); + strategyProperties.write(props); + } + + @Override + public void readSettings(Configuration props) { + props = props.getSection(CATEGORY); + if (props == null) { + return; + } + + try { + setMaxSteps(props.getInt(STEPS_KEY)); + } catch (NumberFormatException e) { + LOGGER.debug("StrategySettings: failure while converting the string " + + "with the allowed steps of heuristics applications to int." + + "Use default value 1000 instead." + + "\nThe String that has been tried to convert was {}", props.get(STEPS_KEY)); + } + + try { + setTimeout(props.getInt(TIMEOUT_KEY)); + } catch (NumberFormatException e) { + LOGGER.debug("StrategySettings: failure while converting the string " + + "with rule application timeout. " + + "\nThe String that has been tried to convert was {}", props.get(TIMEOUT_KEY)); + } + + // set active strategy + var strategy = props.getString(STRATEGY_KEY); + if (strategy != null) { + activeStrategy = new Name(strategy); + } + + setStrategyProperties(StrategyProperties.read(props)); + } + + @Override + public void writeSettings(Configuration props) { + if (getStrategy() == null) { + setStrategy(JavaCardDLStrategyFactory.NAME); + } + if (maxSteps < 0) { + setMaxSteps(10000); + } + + props.set(STRATEGY_KEY, getStrategy().toString()); + props.set(STEPS_KEY, getMaxSteps()); + props.set(TIMEOUT_KEY, getTimeout()); - props.setProperty(TIMEOUT_KEY, String.valueOf(getTimeout())); strategyProperties.write(props); } @@ -225,7 +274,7 @@ public void setTimeout(long timeout) { */ public StopCondition getApplyStrategyStopCondition() { return Objects.requireNonNullElseGet(customApplyStrategyStopCondition, - AppliedRuleStopCondition::new); + AppliedRuleStopCondition::new); } /** @@ -233,7 +282,7 @@ public StopCondition getApplyStrategyStopCondition() { * determine after each applied rule if more rules should be applied or not. * * @return The customized {@link StopCondition} or {@code null} if the default one should be - * used. + * used. */ public StopCondition getCustomApplyStrategyStopCondition() { return customApplyStrategyStopCondition; @@ -244,7 +293,7 @@ public StopCondition getCustomApplyStrategyStopCondition() { * after each applied rule if more rules should be applied or not. * * @param customApplyStrategyStopCondition The customized {@link StopCondition} to use or - * {@code null} to use the default one. + * {@code null} to use the default one. */ public void setCustomApplyStrategyStopCondition( StopCondition customApplyStrategyStopCondition) { @@ -257,7 +306,7 @@ public void setCustomApplyStrategyStopCondition( * the {@link ApplyStrategy}, which is defined by the user interface, is used. * * @return The customized {@link GoalChooser} to use or {@code null} to use the default one of - * the {@link ApplyStrategy}. + * the {@link ApplyStrategy}. */ public GoalChooser getCustomApplyStrategyGoalChooser() { return customApplyStrategyGoalChooser; @@ -269,7 +318,7 @@ public GoalChooser getCustomApplyStrategyGoalChooser() { * {@link ApplyStrategy}, which is defined by the user interface, is used. * * @param customGoalChooser The customized {@link GoalChooser} to use or {@code null} to use the - * default one of the {@link ApplyStrategy}. + * default one of the {@link ApplyStrategy}. */ public void setCustomApplyStrategyGoalChooser(GoalChooser customGoalChooser) { this.customApplyStrategyGoalChooser = customGoalChooser; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/TermLabelSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/TermLabelSettings.java index 64316f73e40..dd077f1d80a 100755 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/TermLabelSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/TermLabelSettings.java @@ -1,13 +1,12 @@ package de.uka.ilkd.key.settings; -import java.util.Properties; - import de.uka.ilkd.key.logic.label.OriginTermLabel; import de.uka.ilkd.key.logic.label.TermLabel; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Properties; + /** * Proof-dependent settings for {@link TermLabel}s. * @@ -16,36 +15,50 @@ public class TermLabelSettings extends AbstractSettings { private static final Logger LOGGER = LoggerFactory.getLogger(TermLabelSettings.class); - /** - * Property key for {@link #getUseOriginLabels()} - */ - public static final String USE_ORIGIN_LABELS = "[Labels]UseOriginLabels"; + public static final String USE_ORIGIN_LABELS = "UseOriginLabels"; + + public static final String CATEGORY = "Labels"; - /** - * @see {@link #getUseOriginLabels()} - */ private boolean useOriginLabels = true; @Override public void readSettings(Properties props) { - String str = props.getProperty(USE_ORIGIN_LABELS); + String str = props.getProperty("[" + CATEGORY + "]" + USE_ORIGIN_LABELS); if (str != null && (str.equals("true") || str.equals("false"))) { setUseOriginLabels(Boolean.parseBoolean(str)); } else { LOGGER.debug("TermLabelSettings: Failure while reading the setting \"UseOriginLabels\"." - + "Using the default value: true." + "The string read was: {}", str); + + "Using the default value: true." + "The string read was: {}", str); setUseOriginLabels(true); } } @Override public void writeSettings(Properties props) { - props.setProperty(USE_ORIGIN_LABELS, Boolean.toString(useOriginLabels)); + props.setProperty("[" + CATEGORY + "]" + USE_ORIGIN_LABELS, Boolean.toString(useOriginLabels)); + } + + @Override + public void readSettings(Configuration props) { + var category = props.getSection(CATEGORY); + if (category == null) return; + try { + setUseOriginLabels(category.getBool(USE_ORIGIN_LABELS)); + } catch (Exception e) { + LOGGER.debug("TermLabelSettings: Failure while reading the setting \"UseOriginLabels\"." + + "Using the default value: true." + "The string read was: {}", category.get(USE_ORIGIN_LABELS), e); + setUseOriginLabels(true); + } + } + + @Override + public void writeSettings(Configuration props) { + var category = props.getOrCreateSection(CATEGORY); + category.set(USE_ORIGIN_LABELS, useOriginLabels); } /** - * * @return {@code true} iff {@link OriginTermLabel}s should be used. */ public boolean getUseOriginLabels() { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java index bd19f7413fb..9158d9e636b 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java @@ -14,7 +14,7 @@ */ public class ViewSettings extends AbstractPropertiesSettings { - private static final String CLUTTER_RULES = "[View]clutterRules"; + private static final String CLUTTER_RULES = "clutterRules"; private static final String CLUTTER_RULES_DEFAULT = "cut_direct_r,cut_direct_l," + "case_distinction_r,case_distinction_l,local_cut,commute_and_2,commute_or_2," @@ -24,7 +24,7 @@ public class ViewSettings extends AbstractPropertiesSettings { + "add_greatereq,geq_add_one,leq_add_one,polySimp_addOrder,polySimp_expand,add_lesseq," + "divide_equation,equal_add_one,add_eq"; - private static final String CLUTTER_RULESSETS = "[View]clutterRuleSets"; + private static final String CLUTTER_RULESSETS = "clutterRuleSets"; private static final String CLUTTER_RULESETS_DEFAULT = "notHumanReadable,obsolete," + "pullOutQuantifierAll,inEqSimp_commute,inEqSimp_expand,pullOutQuantifierEx," @@ -34,112 +34,112 @@ public class ViewSettings extends AbstractPropertiesSettings { /** * default max number of displayed tooltip lines is 40 */ - private static final String MAX_TOOLTIP_LINES_KEY = "[View]MaxTooltipLines"; + private static final String MAX_TOOLTIP_LINES_KEY = "MaxTooltipLines"; /** * Show the Load examples dialog window on startup by default */ - private static final String SHOW_LOAD_EXAMPLES_DIALOG = "[View]ShowLoadExamplesDialog"; + private static final String SHOW_LOAD_EXAMPLES_DIALOG = "ShowLoadExamplesDialog"; /** * do not print the find, varcond and heuristics part of taclets in the TacletMenu by default */ - private static final String SHOW_WHOLE_TACLET = "[View]ShowWholeTaclet"; + private static final String SHOW_WHOLE_TACLET = "ShowWholeTaclet"; /** * default font size */ - private static final String FONT_INDEX = "[View]FontIndex"; + private static final String FONT_INDEX = "FontIndex"; /** * do not hide intermediate proofsteps by default */ - private static final String HIDE_INTERMEDIATE_PROOFSTEPS = "[View]HideIntermediateProofsteps"; + private static final String HIDE_INTERMEDIATE_PROOFSTEPS = "HideIntermediateProofsteps"; - private static final String HIDE_AUTOMODE_PROOFSTEPS = "[View]HideAutomodeProofsteps"; + private static final String HIDE_AUTOMODE_PROOFSTEPS = "HideAutomodeProofsteps"; /** * do not hide closed subtrees by default */ - private static final String HIDE_CLOSED_SUBTREES = "[View]HideClosedSubtrees"; + private static final String HIDE_CLOSED_SUBTREES = "HideClosedSubtrees"; /** * Which look and feel to use. */ - private static final String LOOK_AND_FEEL = "[View]LookAndFeel"; + private static final String LOOK_AND_FEEL = "LookAndFeel"; - private static final String SHOW_JAVA_WARNING = "[View]ShowJavaWarning"; + private static final String SHOW_JAVA_WARNING = "ShowJavaWarning"; /** * Pretty Syntax is true by default, use Unicode symbols not */ - private static final String PRETTY_SYNTAX = "[View]PrettySyntax"; + private static final String PRETTY_SYNTAX = "PrettySyntax"; /** * */ - private static final String USE_UNICODE = "[View]UseUnicodeSymbols"; + private static final String USE_UNICODE = "UseUnicodeSymbols"; /** * */ - private static final String SYNTAX_HIGHLIGHTING = "[View]SyntaxHighlighting"; + private static final String SYNTAX_HIGHLIGHTING = "SyntaxHighlighting"; /** * */ - private static final String HIDE_PACKAGE_PREFIX = "[View]HidePackagePrefix"; + private static final String HIDE_PACKAGE_PREFIX = "HidePackagePrefix"; /** * confirm exiting by default */ - private static final String CONFIRM_EXIT = "[View]ConfirmExit"; + private static final String CONFIRM_EXIT = "ConfirmExit"; /** * Heatmap options property */ - private static final String HEATMAP_OPTIONS = "[View]HeatmapOptions"; + private static final String HEATMAP_OPTIONS = "HeatmapOptions"; - private static final String FONT_SIZE_FACTOR = "[View]uiFontSizeFactor"; + private static final String FONT_SIZE_FACTOR = "uiFontSizeFactor"; - private static final String SEQUENT_VIEW_TOOLTIP = "[View]SequentViewTooltips"; + private static final String SEQUENT_VIEW_TOOLTIP = "SequentViewTooltips"; /** this setting enables/disables tool tips in the source view */ - private static final String SOURCE_VIEW_TOOLTIP = "[View]SourceViewTooltips"; + private static final String SOURCE_VIEW_TOOLTIP = "SourceViewTooltips"; - private static final String HIGHLIGHT_ORIGIN = "[View]HighlightOrigin"; + private static final String HIGHLIGHT_ORIGIN = "HighlightOrigin"; /** * */ - private static final String NOTIFY_LOAD_BEHAVIOUR = "[View]notifyLoadBehaviour"; + private static final String NOTIFY_LOAD_BEHAVIOUR = "notifyLoadBehaviour"; /** * */ - private static final String SHOW_UNINSTANTIATED_TACLET = "[View]showUninstantiatedTaclet"; + private static final String SHOW_UNINSTANTIATED_TACLET = "showUninstantiatedTaclet"; /** * Show heatmap for sequent formulas (true) or terms (false) */ - private static final String HEATMAP_SHOW = "[View][Heatmap]enabled"; + private static final String HEATMAP_SHOW = "[Heatmap]enabled"; /** * */ - private static final String HEATMAP_SF = "[View][Heatmap]sf"; + private static final String HEATMAP_SF = "[Heatmap]sf"; /** * */ - private static final String HEATMAP_NEWEST = "[View][Heatmap]newest"; + private static final String HEATMAP_NEWEST = "[Heatmap]newest"; /** * */ - private static final String HEATMAP_MAXAGE = "[View][Heatmap]maxAge"; + private static final String HEATMAP_MAXAGE = "[Heatmap]maxAge"; - private static final String HIDE_INTERACTIVE_GOALS = "[View]hideInteractiveGoals"; + private static final String HIDE_INTERACTIVE_GOALS = "hideInteractiveGoals"; /** * A list of bookmark of favourite folders of the user. Can be manipulated with * {@link de.uka.ilkd.key.gui.KeYFileChooserBookmarkPanel}. */ - private static final String USER_FOLDER_BOOKMARKS = "[View]folderBookmarks"; + private static final String USER_FOLDER_BOOKMARKS = "folderBookmarks"; /** * Show Taclet uninstantiated in tooltip -- for learning @@ -203,6 +203,10 @@ public class ViewSettings extends AbstractPropertiesSettings { private PropertyEntry> folderBookmarks = createStringListProperty(USER_FOLDER_BOOKMARKS, System.getProperty("user.home")); + public ViewSettings() { + super("View"); + } + /** * Clutter rules are rules with less priority in the taclet menu */ diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java index a28f3153101..573f72928c5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java @@ -1,12 +1,13 @@ package de.uka.ilkd.key.strategy; +import de.uka.ilkd.key.settings.Configuration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.util.Map; import java.util.Properties; import java.util.Set; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - public final class StrategyProperties extends Properties { public static final String INF_FLOW_CHECK_PROPERTY = "INF_FLOW_CHECK_PROPERTY"; @@ -26,7 +27,7 @@ public final class StrategyProperties extends Properties { public static final String LOOP_OPTIONS_KEY = "LOOP_OPTIONS_KEY"; public static final String LOOP_EXPAND = "LOOP_EXPAND"; public static final String LOOP_EXPAND_BOUNDED = "LOOP_EXPAND_BOUNDED"; // Used for test - // generation chrisg + // generation chrisg public static final String LOOP_INVARIANT = "LOOP_INVARIANT"; public static final String LOOP_SCOPE_INVARIANT = "LOOP_SCOPE_INVARIANT"; public static final String LOOP_SCOPE_INV_TACLET = "LOOP_SCOPE_INV_TACLET"; @@ -75,7 +76,7 @@ public final class StrategyProperties extends Properties { public static final String QUANTIFIERS_NONE = "QUANTIFIERS_NONE"; public static final String QUANTIFIERS_NON_SPLITTING = "QUANTIFIERS_NON_SPLITTING"; public static final String QUANTIFIERS_NON_SPLITTING_WITH_PROGS = - "QUANTIFIERS_NON_SPLITTING_WITH_PROGS"; + "QUANTIFIERS_NON_SPLITTING_WITH_PROGS"; public static final String QUANTIFIERS_INSTANTIATE = "QUANTIFIERS_INSTANTIATE"; public static final String VBT_PHASE = "VBT_PHASE"; // Used for verification-based testing @@ -106,14 +107,14 @@ public final class StrategyProperties extends Properties { * {@code} SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY = - "SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY"; + "SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY"; /** * Value of key {@link #SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY} in * {@link StrategyProperties} to disable alias checks in a {@code SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER = - "SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER"; + "SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER"; /** * Value of key {@link #SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY} in @@ -121,14 +122,14 @@ public final class StrategyProperties extends Properties { * {@code SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY = - "SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY"; + "SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY"; /** * Key used in {@link StrategyProperties} to avoid branches caused by modalities not part of * main execution branch in a {@code SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY = - "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY"; + "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY"; /** * Value of key {@link #SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY} in @@ -136,7 +137,7 @@ public final class StrategyProperties extends Properties { * execution in a {@code SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF = - "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF"; + "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF"; /** * Value of key {@link #SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY} in @@ -144,42 +145,41 @@ public final class StrategyProperties extends Properties { * by using site proofs in a {@code SymbolicExecutionStrategy}. */ public static final String SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF = - "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF"; + "SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF"; - private static final long serialVersionUID = -4647245742912258421L; + private static final String CATEGORY = "StrategyProperty"; /** * Section key for storage file to identify strategy settings */ - private static final String STRATEGY_PROPERTY = "[StrategyProperty]"; + private static final String STRATEGY_PROPERTY = "[" + CATEGORY + "]"; private static final String USER_TACLETS_OPTIONS_KEY_BASE = "USER_TACLETS_OPTIONS_KEY"; // String identities. - private static final String[] STRING_POOL = { INF_FLOW_CHECK_PROPERTY, INF_FLOW_CHECK_TRUE, - INF_FLOW_CHECK_FALSE, STOPMODE_OPTIONS_KEY, STOPMODE_DEFAULT, STOPMODE_NONCLOSE, - SPLITTING_OPTIONS_KEY, SPLITTING_NORMAL, SPLITTING_OFF, SPLITTING_DELAYED, LOOP_OPTIONS_KEY, - LOOP_EXPAND, LOOP_EXPAND_BOUNDED, LOOP_INVARIANT, LOOP_SCOPE_INVARIANT, - LOOP_SCOPE_INV_TACLET, LOOP_SCOPE_EXPAND, LOOP_NONE, BLOCK_OPTIONS_KEY, - BLOCK_CONTRACT_INTERNAL, BLOCK_CONTRACT_EXTERNAL, BLOCK_EXPAND, BLOCK_NONE, - METHOD_OPTIONS_KEY, METHOD_EXPAND, METHOD_CONTRACT, METHOD_NONE, MPS_OPTIONS_KEY, MPS_MERGE, - MPS_SKIP, MPS_NONE, DEP_OPTIONS_KEY, DEP_ON, DEP_OFF, QUERY_OPTIONS_KEY, QUERY_ON, - QUERY_RESTRICTED, QUERY_OFF, QUERYAXIOM_OPTIONS_KEY, QUERYAXIOM_ON, QUERYAXIOM_OFF, - NON_LIN_ARITH_OPTIONS_KEY, NON_LIN_ARITH_NONE, NON_LIN_ARITH_DEF_OPS, - NON_LIN_ARITH_COMPLETION, OSS_OPTIONS_KEY, OSS_ON, OSS_OFF, QUANTIFIERS_OPTIONS_KEY, - QUANTIFIERS_NONE, QUANTIFIERS_NON_SPLITTING, QUANTIFIERS_NON_SPLITTING_WITH_PROGS, - QUANTIFIERS_INSTANTIATE, VBT_PHASE, VBT_SYM_EX, VBT_QUAN_INST, VBT_MODEL_GEN, - CLASS_AXIOM_OFF, CLASS_AXIOM_DELAYED, CLASS_AXIOM_FREE, AUTO_INDUCTION_OPTIONS_KEY, - AUTO_INDUCTION_OFF, AUTO_INDUCTION_RESTRICTED, AUTO_INDUCTION_ON, AUTO_INDUCTION_LEMMA_ON, - USER_TACLETS_OPTIONS_KEY_BASE, USER_TACLETS_OFF, USER_TACLETS_LOW, USER_TACLETS_HIGH, - userTacletsOptionsKey(1), userTacletsOptionsKey(2), userTacletsOptionsKey(3), - SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY, - SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER, - SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, - SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF, - SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF }; - + private static final String[] STRING_POOL = {INF_FLOW_CHECK_PROPERTY, INF_FLOW_CHECK_TRUE, + INF_FLOW_CHECK_FALSE, STOPMODE_OPTIONS_KEY, STOPMODE_DEFAULT, STOPMODE_NONCLOSE, + SPLITTING_OPTIONS_KEY, SPLITTING_NORMAL, SPLITTING_OFF, SPLITTING_DELAYED, LOOP_OPTIONS_KEY, + LOOP_EXPAND, LOOP_EXPAND_BOUNDED, LOOP_INVARIANT, LOOP_SCOPE_INVARIANT, + LOOP_SCOPE_INV_TACLET, LOOP_SCOPE_EXPAND, LOOP_NONE, BLOCK_OPTIONS_KEY, + BLOCK_CONTRACT_INTERNAL, BLOCK_CONTRACT_EXTERNAL, BLOCK_EXPAND, BLOCK_NONE, + METHOD_OPTIONS_KEY, METHOD_EXPAND, METHOD_CONTRACT, METHOD_NONE, MPS_OPTIONS_KEY, MPS_MERGE, + MPS_SKIP, MPS_NONE, DEP_OPTIONS_KEY, DEP_ON, DEP_OFF, QUERY_OPTIONS_KEY, QUERY_ON, + QUERY_RESTRICTED, QUERY_OFF, QUERYAXIOM_OPTIONS_KEY, QUERYAXIOM_ON, QUERYAXIOM_OFF, + NON_LIN_ARITH_OPTIONS_KEY, NON_LIN_ARITH_NONE, NON_LIN_ARITH_DEF_OPS, + NON_LIN_ARITH_COMPLETION, OSS_OPTIONS_KEY, OSS_ON, OSS_OFF, QUANTIFIERS_OPTIONS_KEY, + QUANTIFIERS_NONE, QUANTIFIERS_NON_SPLITTING, QUANTIFIERS_NON_SPLITTING_WITH_PROGS, + QUANTIFIERS_INSTANTIATE, VBT_PHASE, VBT_SYM_EX, VBT_QUAN_INST, VBT_MODEL_GEN, + CLASS_AXIOM_OFF, CLASS_AXIOM_DELAYED, CLASS_AXIOM_FREE, AUTO_INDUCTION_OPTIONS_KEY, + AUTO_INDUCTION_OFF, AUTO_INDUCTION_RESTRICTED, AUTO_INDUCTION_ON, AUTO_INDUCTION_LEMMA_ON, + USER_TACLETS_OPTIONS_KEY_BASE, USER_TACLETS_OFF, USER_TACLETS_LOW, USER_TACLETS_HIGH, + userTacletsOptionsKey(1), userTacletsOptionsKey(2), userTacletsOptionsKey(3), + SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY, + SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER, + SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, + SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF, + SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF}; private static final Properties DEFAULT_MAP = new Properties(); private static final Logger LOGGER = LoggerFactory.getLogger(StrategyProperties.class); @@ -205,9 +205,9 @@ public final class StrategyProperties extends Properties { DEFAULT_MAP.setProperty(CLASS_AXIOM_OPTIONS_KEY, CLASS_AXIOM_FREE); DEFAULT_MAP.setProperty(AUTO_INDUCTION_OPTIONS_KEY, AUTO_INDUCTION_OFF); // chrisg DEFAULT_MAP.setProperty(SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, - SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER); + SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER); DEFAULT_MAP.setProperty(SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, - SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF); + SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF); } public StrategyProperties() { @@ -263,9 +263,9 @@ public static StrategyProperties read(Properties p) { sp.put(CLASS_AXIOM_OPTIONS_KEY, readSingleOption(p, CLASS_AXIOM_OPTIONS_KEY)); sp.put(AUTO_INDUCTION_OPTIONS_KEY, readSingleOption(p, AUTO_INDUCTION_OPTIONS_KEY)); sp.put(SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, - readSingleOption(p, SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY)); + readSingleOption(p, SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY)); sp.put(SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, - readSingleOption(p, SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY)); + readSingleOption(p, SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY)); return sp; } @@ -273,58 +273,58 @@ public static StrategyProperties read(Properties p) { /** * Sets the default settings for symbolic execution on the given {@link StrategyProperties}. * - * @param sp The {@link StrategyProperties} to modify. + * @param sp The {@link StrategyProperties} to modify. * @param quantifierInstantiationWithSplitting Instantiate quantifiers? - * @param methodTreatmentContract Use method contracts or inline method bodies otherwise? - * @param loopTreatmentInvariant Use loop invariants or unrole loops otherwise? - * @param blockTreatmentContract Block contracts or expand otherwise? - * @param nonExecutionBranchHidingSideProofs {@code true} hide non-execution branch labels by - * side proofs, {@code false} do not hide execution branch labels. - * @param aliasChecks Do alias checks? + * @param methodTreatmentContract Use method contracts or inline method bodies otherwise? + * @param loopTreatmentInvariant Use loop invariants or unrole loops otherwise? + * @param blockTreatmentContract Block contracts or expand otherwise? + * @param nonExecutionBranchHidingSideProofs {@code true} hide non-execution branch labels by + * side proofs, {@code false} do not hide execution branch labels. + * @param aliasChecks Do alias checks? */ public static void setDefaultStrategyProperties(StrategyProperties sp, - boolean quantifierInstantiationWithSplitting, boolean methodTreatmentContract, - boolean loopTreatmentInvariant, boolean blockTreatmentContract, - boolean nonExecutionBranchHidingSideProofs, boolean aliasChecks) { + boolean quantifierInstantiationWithSplitting, boolean methodTreatmentContract, + boolean loopTreatmentInvariant, boolean blockTreatmentContract, + boolean nonExecutionBranchHidingSideProofs, boolean aliasChecks) { // TODO (DS, 2017-05-11): Would be great to also use the loop scope // invariant for the SED. For this, one would // however have to change the SED's // implementation and to update the tests. sp.setProperty(StrategyProperties.LOOP_OPTIONS_KEY, - loopTreatmentInvariant ? StrategyProperties.LOOP_INVARIANT - : StrategyProperties.LOOP_EXPAND); + loopTreatmentInvariant ? StrategyProperties.LOOP_INVARIANT + : StrategyProperties.LOOP_EXPAND); sp.setProperty(StrategyProperties.BLOCK_OPTIONS_KEY, - blockTreatmentContract ? StrategyProperties.BLOCK_CONTRACT_INTERNAL - : StrategyProperties.BLOCK_EXPAND); + blockTreatmentContract ? StrategyProperties.BLOCK_CONTRACT_INTERNAL + : StrategyProperties.BLOCK_EXPAND); sp.setProperty(StrategyProperties.METHOD_OPTIONS_KEY, - methodTreatmentContract ? StrategyProperties.METHOD_CONTRACT - : StrategyProperties.METHOD_EXPAND); + methodTreatmentContract ? StrategyProperties.METHOD_CONTRACT + : StrategyProperties.METHOD_EXPAND); sp.setProperty(StrategyProperties.OSS_OPTIONS_KEY, StrategyProperties.OSS_ON); sp.setProperty(StrategyProperties.MPS_OPTIONS_KEY, StrategyProperties.MPS_MERGE); sp.setProperty(StrategyProperties.QUERY_OPTIONS_KEY, StrategyProperties.QUERY_RESTRICTED); sp.setProperty(StrategyProperties.NON_LIN_ARITH_OPTIONS_KEY, - StrategyProperties.NON_LIN_ARITH_DEF_OPS); + StrategyProperties.NON_LIN_ARITH_DEF_OPS); sp.setProperty(StrategyProperties.AUTO_INDUCTION_OPTIONS_KEY, - StrategyProperties.AUTO_INDUCTION_OFF); + StrategyProperties.AUTO_INDUCTION_OFF); sp.setProperty(StrategyProperties.DEP_OPTIONS_KEY, StrategyProperties.DEP_OFF); sp.setProperty(StrategyProperties.QUERYAXIOM_OPTIONS_KEY, StrategyProperties.QUERYAXIOM_ON); sp.setProperty(StrategyProperties.SPLITTING_OPTIONS_KEY, - StrategyProperties.SPLITTING_DELAYED); + StrategyProperties.SPLITTING_DELAYED); sp.setProperty(StrategyProperties.STOPMODE_OPTIONS_KEY, - StrategyProperties.STOPMODE_DEFAULT); + StrategyProperties.STOPMODE_DEFAULT); sp.setProperty(StrategyProperties.CLASS_AXIOM_OPTIONS_KEY, - StrategyProperties.CLASS_AXIOM_FREE); + StrategyProperties.CLASS_AXIOM_FREE); sp.setProperty(StrategyProperties.QUANTIFIERS_OPTIONS_KEY, - quantifierInstantiationWithSplitting ? StrategyProperties.QUANTIFIERS_INSTANTIATE - : StrategyProperties.QUANTIFIERS_NON_SPLITTING_WITH_PROGS); + quantifierInstantiationWithSplitting ? StrategyProperties.QUANTIFIERS_INSTANTIATE + : StrategyProperties.QUANTIFIERS_NON_SPLITTING_WITH_PROGS); sp.setProperty(StrategyProperties.SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, - aliasChecks ? StrategyProperties.SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY - : StrategyProperties.SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER); + aliasChecks ? StrategyProperties.SYMBOLIC_EXECUTION_ALIAS_CHECK_IMMEDIATELY + : StrategyProperties.SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER); sp.setProperty( - StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, - nonExecutionBranchHidingSideProofs - ? StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF - : StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF); + StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, + nonExecutionBranchHidingSideProofs + ? StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_SIDE_PROOF + : StrategyProperties.SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF); } @@ -346,7 +346,7 @@ private static Object readSingleOption(Properties p, String key) { /** * @param in A keyword from the strategy properties. It must be registered in - * stringPool. + * stringPool. * @return Returns the same string but possibly with a different but unique object identity. */ private final static String getUniqueString(String in) { @@ -361,12 +361,32 @@ private final static String getUniqueString(String in) { // the string pool in StrategyProperties. LOGGER.error("The string \"{}\" is not registered in the" - + " string pool of StrategyProperties. Probably you are loading" - + " properties stored with a different KeY version. This setting" - + " is ignored, default value is taken!", in); + + " string pool of StrategyProperties. Probably you are loading" + + " properties stored with a different KeY version. This setting" + + " is ignored, default value is taken!", in); return null; } + public static StrategyProperties read(Configuration category) { + StrategyProperties sp = new StrategyProperties(); + for (Map.Entry entry : DEFAULT_MAP.entrySet()) { + final var def = entry.getValue(); + final var obj = category.get(entry.getKey().toString()); + if (obj != null && def.getClass() == obj.getClass()) { + sp.put(entry.getKey(), obj); + } + } + return sp; + } + + public void write(Configuration category) { + for (Map.Entry entry : entrySet()) { + final var def = entry.getValue(); + final var obj = category.get(entry.getKey().toString()); + category.set(entry.getKey().toString(), obj); + } + } + public String getProperty(String key) { String val = super.getProperty(key); @@ -401,10 +421,10 @@ public void write(Properties p) { p.put(STRATEGY_PROPERTY + SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY, aliasCheckValue); } Object avoidBranchingValue = - get(SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY); + get(SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY); if (avoidBranchingValue != null) { p.put(STRATEGY_PROPERTY + SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY, - avoidBranchingValue); + avoidBranchingValue); } } @@ -428,4 +448,6 @@ public boolean isDefault() { } return result; } + + } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java index 3fc2674da17..5b88809942a 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java @@ -1,22 +1,23 @@ package de.uka.ilkd.key.gui.colors; +import de.uka.ilkd.key.gui.settings.SettingsManager; +import de.uka.ilkd.key.settings.AbstractPropertiesSettings; +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.settings.PathConfig; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.awt.*; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; +import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.Properties; import java.util.stream.Stream; -import de.uka.ilkd.key.gui.settings.SettingsManager; -import de.uka.ilkd.key.settings.AbstractPropertiesSettings; -import de.uka.ilkd.key.settings.PathConfig; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * Configurable colors for KeY. *

@@ -28,18 +29,37 @@ public class ColorSettings extends AbstractPropertiesSettings { public static final String SETTINGS_FILENAME = "colors.properties"; public static final File SETTINGS_FILE = - new File(PathConfig.getKeyConfigDir(), SETTINGS_FILENAME); + new File(PathConfig.getKeyConfigDir(), SETTINGS_FILENAME); + + public static final File SETTINGS_FILE_NEW = + new File(PathConfig.getKeyConfigDir(), "colors.toml"); private static final Logger LOGGER = LoggerFactory.getLogger(ColorSettings.class); private static ColorSettings INSTANCE; private ColorSettings(Properties settings) { + super(""); readSettings(settings); Runtime.getRuntime().addShutdownHook(new Thread(this::save)); } + public ColorSettings(Configuration load) { + super(""); + readSettings(load); + Runtime.getRuntime().addShutdownHook(new Thread(this::save)); + } + public static ColorSettings getInstance() { - if (INSTANCE == null) - INSTANCE = new ColorSettings(SettingsManager.loadProperties(SETTINGS_FILE)); + if (INSTANCE == null) { + if (SETTINGS_FILE.exists()) { + try { + LOGGER.info("Use new configuration format at {}", SETTINGS_FILE_NEW); + return INSTANCE = new ColorSettings(Configuration.load(SETTINGS_FILE_NEW)); + } catch (IOException e) { + LOGGER.error("Could not read {}", SETTINGS_FILE_NEW, e); + } + } + return INSTANCE = new ColorSettings(SettingsManager.loadProperties(SETTINGS_FILE)); + } return INSTANCE; } @@ -58,7 +78,7 @@ public static String toHex(Color c) { public static Color fromHex(String s) { long i = Long.decode(s); return new Color((int) ((i >> 16) & 0xFF), (int) ((i >> 8) & 0xFF), (int) (i & 0xFF), - (int) ((i >> 24) & 0xFF)); + (int) ((i >> 24) & 0xFF)); } public static Color invert(Color c) { @@ -73,7 +93,19 @@ public static Color invert(Color c) { public void save() { LOGGER.info("Save color settings to: " + SETTINGS_FILE.getAbsolutePath()); try (Writer writer = new FileWriter(SETTINGS_FILE)) { - properties.store(writer, "KeY's Colors"); + Properties props = new Properties(); + for (Map.Entry entry : properties.entrySet()) { + props.setProperty(entry.getKey(), entry.getValue().toString()); + } + props.store(writer, "KeY's Colors"); + writer.flush(); + } catch (IOException ex) { + ex.printStackTrace(); + } + + try (Writer writer = new FileWriter(SETTINGS_FILE_NEW)) { + var config = new Configuration(properties); + config.save(writer, "KeY's Colors"); writer.flush(); } catch (IOException ex) { ex.printStackTrace(); @@ -82,7 +114,7 @@ public void save() { private ColorProperty createColorProperty(String key, String description, Color defaultValue) { Optional item = - getProperties().filter(it -> it.getKey().equals(key)).findFirst(); + getProperties().filter(it -> it.getKey().equals(key)).findFirst(); if (item.isPresent()) { return item.get(); } @@ -117,7 +149,7 @@ public String value() { if (currentValue != null) return toHex(currentValue); - String v = properties.getProperty(key); + String v = properties.get(key).toString(); try { return v; @@ -131,7 +163,7 @@ public void parseFrom(String v) { final var old = value(); if (!Objects.equals(old, v)) { currentValue = fromHex(v); - properties.setProperty(getKey(), v); + properties.put(getKey(), v); firePropertyChange(getKey(), old, currentValue); } } @@ -146,7 +178,7 @@ public void set(Color value) { if (currentValue != value) { var old = currentValue; currentValue = value; - properties.setProperty(getKey(), toHex(value)); + properties.put(getKey(), toHex(value)); firePropertyChange(getKey(), old, value); } } @@ -156,7 +188,7 @@ public Color get() { if (currentValue != null) return currentValue; - String v = properties.getProperty(key); + String v = (String) properties.get(key); try { return currentValue = fromHex(v); @@ -173,6 +205,6 @@ public String getDescription() { @Override public void readSettings(Properties props) { - this.properties.putAll(props); + props.forEach((k, v) -> this.properties.put(k.toString(), v)); } } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/extension/impl/ExtensionSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/extension/impl/ExtensionSettings.java index dd1dcd9b34f..ab0fb46334f 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/extension/impl/ExtensionSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/extension/impl/ExtensionSettings.java @@ -7,10 +7,14 @@ import de.uka.ilkd.key.settings.AbstractPropertiesSettings; public class ExtensionSettings extends AbstractPropertiesSettings { - public final static String KEY_DISABLED = "[Extensions]disabled"; + public final static String KEY_DISABLED = "disabled"; private final PropertyEntry> forbiddenClasses = createStringSetProperty(KEY_DISABLED, ""); + public ExtensionSettings() { + super("Extensions"); + } + public Collection getForbiddenClasses() { return forbiddenClasses.get(); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java index 2b037464839..c027b3ed1d7 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java @@ -1,23 +1,25 @@ package de.uka.ilkd.key.gui.keyshortcuts; -import java.awt.event.KeyEvent; -import java.io.File; -import java.io.FileWriter; -import java.io.IOException; -import java.io.Writer; -import java.util.Properties; -import javax.swing.*; - import de.uka.ilkd.key.gui.actions.*; import de.uka.ilkd.key.gui.help.HelpFacade; import de.uka.ilkd.key.gui.settings.SettingsManager; import de.uka.ilkd.key.macros.*; import de.uka.ilkd.key.settings.AbstractPropertiesSettings; +import de.uka.ilkd.key.settings.Configuration; import de.uka.ilkd.key.settings.PathConfig; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.swing.*; +import java.awt.event.KeyEvent; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.Writer; +import java.util.Map; +import java.util.Properties; +import java.util.TreeMap; + /** * A settings for storing and retrieving {@link KeyStroke}s. * @@ -34,10 +36,12 @@ public class KeyStrokeSettings extends AbstractPropertiesSettings { * path of the properties file */ public static final File SETTINGS_FILE = - new File(PathConfig.getKeyConfigDir(), KeyStrokeSettings.SETTINGS_FILENAME); + new File(PathConfig.getKeyConfigDir(), SETTINGS_FILENAME); + private static final File SETTINGS_FILE_NEW = new File(PathConfig.getKeyConfigDir(), "keystrokes.toml"); private static final Logger LOGGER = LoggerFactory.getLogger(KeyStrokeSettings.class); + /** * singleton instance */ @@ -46,57 +50,57 @@ public class KeyStrokeSettings extends AbstractPropertiesSettings { /** * default {@link KeyStroke}s */ - private static Properties DEFAULT_KEYSTROKES = new Properties(); + private static Map DEFAULT_KEYSTROKES = new TreeMap<>(); static { if (KeyStrokeManager.FKEY_MACRO_SCHEME) { // use F keys for macros, CTRL+SHIFT+letter for other actions defineDefault(FullAutoPilotProofMacro.class, KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); defineDefault(AutoPilotPrepareProofMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0)); defineDefault(PropositionalExpansionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0)); defineDefault(FullPropositionalExpansionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0)); defineDefault(TryCloseMacro.class, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); defineDefault(FinishSymbolicExecutionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)); defineDefault(OneStepProofMacro.class, KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0)); defineDefault(HeapSimplificationMacro.class, KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0)); defineDefault(UpdateSimplificationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0)); defineDefault(IntegerSimplificationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0)); defineDefault(QuickSaveAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(QuickLoadAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyStrokeManager.MULTI_KEY_MASK)); } else { // use CTRL+SHIFT+letter for macros, F keys for other actions defineDefault(FullAutoPilotProofMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_V, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(AutoPilotPrepareProofMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_D, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_D, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(PropositionalExpansionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_A, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(FullPropositionalExpansionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_S, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(TryCloseMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(FinishSymbolicExecutionMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(OneStepProofMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(HeapSimplificationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_H, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_H, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(UpdateSimplificationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_L, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_L, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(IntegerSimplificationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_I, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_I, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(SMTPreparationMacro.class, - KeyStroke.getKeyStroke(KeyEvent.VK_Y, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_Y, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(KeYProjectHomepageAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); + KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); defineDefault(QuickSaveAction.class, KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0)); defineDefault(QuickLoadAction.class, KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0)); } @@ -104,39 +108,48 @@ public class KeyStrokeSettings extends AbstractPropertiesSettings { // default mappings defineDefault(HelpFacade.ACTION_OPEN_HELP.getClass(), KeyStroke.getKeyStroke("F1")); defineDefault(OpenExampleAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(EditMostRecentFileAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_E, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(PrettyPrintToggleAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_P, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(UnicodeToggleAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_U, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(IncreaseFontSizeAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_PLUS, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(DecreaseFontSizeAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyStrokeManager.MULTI_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyStrokeManager.MULTI_KEY_MASK)); defineDefault(PruneProofAction.class, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)); defineDefault(GoalBackAction.class, - KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyStrokeManager.SHORTCUT_KEY_MASK)); + KeyStroke.getKeyStroke(KeyEvent.VK_Z, KeyStrokeManager.SHORTCUT_KEY_MASK)); } private KeyStrokeSettings(Properties init) { + super(""); // no category, separate file this.properties.putAll(DEFAULT_KEYSTROKES); init.forEach((key, value) -> { if (value != null && !value.toString().isEmpty()) - this.properties.put(key, value); + this.properties.put(key.toString(), value); }); save(); Runtime.getRuntime().addShutdownHook(new Thread(this::save)); } + public KeyStrokeSettings(Configuration config) { + super(""); + this.properties.putAll(DEFAULT_KEYSTROKES); + readSettings(config); + save(); + Runtime.getRuntime().addShutdownHook(new Thread(this::save)); + } + public static void defineDefault(T any, KeyStroke ks) { defineDefault(any.getClass(), ks); } public static void defineDefault(Class clazz, KeyStroke ks) { - DEFAULT_KEYSTROKES.setProperty(clazz.getName(), ks.toString()); + DEFAULT_KEYSTROKES.put(clazz.getName(), ks.toString()); } static KeyStrokeSettings loadFromConfig() { @@ -144,8 +157,18 @@ static KeyStrokeSettings loadFromConfig() { } public static KeyStrokeSettings getInstance() { - if (INSTANCE == null) - INSTANCE = KeyStrokeSettings.loadFromConfig(); + + if (INSTANCE == null) { + if (SETTINGS_FILE.exists()) { + try { + LOGGER.info("Use new configuration format at {}", SETTINGS_FILE_NEW); + return INSTANCE = new KeyStrokeSettings(Configuration.load(SETTINGS_FILE_NEW)); + } catch (IOException e) { + LOGGER.error("Could not read {}", SETTINGS_FILE_NEW, e); + } + } + return INSTANCE = KeyStrokeSettings.loadFromConfig(); + } return INSTANCE; } @@ -154,20 +177,20 @@ public static KeyStrokeSettings getInstance() { */ @Override public void readSettings(Properties props) { - properties.putAll(props); + props.forEach((k, v) -> this.properties.put(k.toString(), v)); } void setKeyStroke(String key, KeyStroke stroke, boolean override) { var old = getKeyStroke(key, null); if (override || (old == null)) { - properties.setProperty(key, stroke != null ? stroke.toString() : ""); + properties.put(key, stroke != null ? stroke.toString() : ""); firePropertyChange(key, old, stroke); } } KeyStroke getKeyStroke(String key, KeyStroke defaultValue) { try { - KeyStroke ks = KeyStroke.getKeyStroke(properties.getProperty(key)); + KeyStroke ks = KeyStroke.getKeyStroke(properties.get(key).toString()); if (ks != null) return ks; } catch (Exception ignored) { @@ -179,7 +202,20 @@ public void save() { LOGGER.info("Save keyboard shortcuts to: {}", SETTINGS_FILE.getAbsolutePath()); SETTINGS_FILE.getParentFile().mkdirs(); try (Writer writer = new FileWriter(SETTINGS_FILE)) { - properties.store(writer, "KeY's KeyStrokes"); + Properties props = new Properties(); + for (Map.Entry entry : properties.entrySet()) { + props.setProperty(entry.getKey(), entry.getValue().toString()); + } + props.store(writer, "KeY's KeyStrokes"); + writer.flush(); + } catch (IOException ex) { + ex.printStackTrace(); + } + + + try (Writer writer = new FileWriter(SETTINGS_FILE_NEW)) { + var config = new Configuration(properties); + config.save(writer, "KeY's Colors"); writer.flush(); } catch (IOException ex) { ex.printStackTrace(); diff --git a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java index 225c259282d..0b35bb729d3 100644 --- a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java +++ b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java @@ -1,36 +1,37 @@ package org.key_project.slicing; -import java.util.Map; -import java.util.WeakHashMap; - import de.uka.ilkd.key.proof.Proof; import de.uka.ilkd.key.settings.AbstractPropertiesSettings; +import java.util.Map; +import java.util.WeakHashMap; + /** * Settings for the proof slicing extension. * * @author Arne Keller */ public class SlicingSettings extends AbstractPropertiesSettings { + public static final String CATEGORY = "ProofSlicing"; /** * Config key for {@link #aggressiveDeduplicate}. */ - private static final String KEY_AGGRESSIVE_DEDUPLICATE = "[ProofSlicing]aggressiveDeduplicate"; + private static final String KEY_AGGRESSIVE_DEDUPLICATE = "aggressiveDeduplicate"; /** * Config key for {@link #dotExecutable}. */ - private static final String KEY_DOT_EXECUTABLE = "[ProofSlicing]dotExecutable"; + private static final String KEY_DOT_EXECUTABLE = "dotExecutable"; /** * Aggressive rule deduplication config key. */ private final PropertyEntry aggressiveDeduplicate = - createBooleanProperty(KEY_AGGRESSIVE_DEDUPLICATE, true); + createBooleanProperty(KEY_AGGRESSIVE_DEDUPLICATE, true); /** * Path to dot executable config key. */ private final PropertyEntry dotExecutable = - createStringProperty(KEY_DOT_EXECUTABLE, null); + createStringProperty(KEY_DOT_EXECUTABLE, null); /** * Override map for aggressive deduplication config. @@ -39,6 +40,10 @@ public class SlicingSettings extends AbstractPropertiesSettings { */ private final Map aggressiveDeduplicateOverride = new WeakHashMap<>(); + public SlicingSettings() { + super(CATEGORY); + } + /** * @param proof proof * @return whether aggressive deduplication is turned on for this proof @@ -54,7 +59,7 @@ public boolean getAggressiveDeduplicate(Proof proof) { /** * Disable aggressive de-duplication for a particular proof. * - * @param proof proof to disable aggresive de-duplication for + * @param proof proof to disable aggressive de-duplication for */ public void deactivateAggressiveDeduplicate(Proof proof) { aggressiveDeduplicateOverride.put(proof, false); From bb0300e37bbd45bdea82090eb08ae5fdad40edca Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 3 Apr 2023 19:14:52 +0200 Subject: [PATCH 02/24] some bug fixes in the configuration --- .../uka/ilkd/key/settings/Configuration.java | 20 ++++++++++++++++--- .../uka/ilkd/key/settings/ViewSettings.java | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index 037d303892e..5c232703014 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -210,13 +210,27 @@ public ConfigurationWriter printComment(String comment) { } public ConfigurationWriter printConfiguration(Configuration c) { + return printConfiguration(c, true); + } + + public ConfigurationWriter printConfiguration(Configuration c, boolean section) { c.data.forEach((k, v) -> { - if (v != null) - printKeyValue(k, v).newline().reset(); + if (v != null) { + if (section && v instanceof Configuration) + printSection(k, (Configuration) v); + else + printKeyValue(k, v).newline().reset(); + } }); return this; } + private void printSection(String k, Configuration v) { + reset(); + out.format("\n[%s]\n", k); + printConfiguration(v, false); + } + private ConfigurationWriter reset() { equalSignPos = 0; return this; @@ -309,7 +323,7 @@ private ConfigurationWriter printSeq(Collection value) { } private ConfigurationWriter printKey(String key) { - if (key.contains(" ") || key.contains("(") || key.contains(")")) { + if (key.contains(" ") || key.contains("(") || key.contains(")") || key.contains("[s")) { printValue(key); equalSignPos += key.length() + 5; } else { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java index 9158d9e636b..dfebbcec57d 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java @@ -119,15 +119,15 @@ public class ViewSettings extends AbstractPropertiesSettings { /** * Show heatmap for sequent formulas (true) or terms (false) */ - private static final String HEATMAP_SHOW = "[Heatmap]enabled"; + private static final String HEATMAP_SHOW = "Heatmap_enabled"; /** * */ - private static final String HEATMAP_SF = "[Heatmap]sf"; + private static final String HEATMAP_SF = "Heatmap_sf"; /** * */ - private static final String HEATMAP_NEWEST = "[Heatmap]newest"; + private static final String HEATMAP_NEWEST = "Heatmap_newest"; /** * */ From 275e0bd7ad5b9f44e603fe0e07286e080a4bd865 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Wed, 5 Apr 2023 13:23:39 +0200 Subject: [PATCH 03/24] Change syntax to JSON-compatible format. --- key.core/src/main/antlr4/KeYParser.g4 | 15 ++- .../key/nparser/ConfigurationBuilder.java | 7 -- .../key/nparser/builder/TacletPBuilder.java | 4 +- .../uka/ilkd/key/proof/init/InitConfig.java | 5 +- .../uka/ilkd/key/settings/Configuration.java | 65 +++------- .../settings/ProofIndependentSettings.java | 4 +- .../de/uka/ilkd/key/util/SideProofUtil.java | 3 +- .../ilkd/key/gui/colors/ColorSettings.java | 2 +- .../gui/keyshortcuts/KeyStrokeSettings.java | 3 +- .../gui/smt/settings/TranslationOptions.java | 115 +++++++++--------- 10 files changed, 87 insertions(+), 136 deletions(-) diff --git a/key.core/src/main/antlr4/KeYParser.g4 b/key.core/src/main/antlr4/KeYParser.g4 index eb6c3e429dc..1921afe6d3e 100644 --- a/key.core/src/main/antlr4/KeYParser.g4 +++ b/key.core/src/main/antlr4/KeYParser.g4 @@ -801,7 +801,8 @@ profile: PROFILE name=string_value SEMI; preferences : - KEYSETTINGS LBRACE (s=string_value | c=cfile )? RBRACE + KEYSETTINGS (LBRACE s=string_value? RBRACE + | c=cvalue ) // LBRACE, RBRACE included in cvalue#table ; proofScript @@ -813,12 +814,10 @@ proofScript proof: PROOF EOF; // Config -cfile: (csection? ckv)*; -csection: LBRACKET IDENT RBRACKET; -ckv: doc=DOC_COMMENT? ckey EQUALS cvalue; -ckey: (any* | STRING_LITERAL); -any: INT_LITERAL | IDENT | BIN_LITERAL | HEX_LITERAL | FLOAT_LITERAL | DOUBLE_LITERAL - | TRUE | FALSE | DOT; +cfile: cvalue*; +//csection: LBRACKET IDENT RBRACKET; +ckv: doc=DOC_COMMENT? ckey ':' cvalue; +ckey: IDENT | STRING_LITERAL; cvalue: IDENT #csymbol | STRING_LITERAL #cstring @@ -830,6 +829,6 @@ cvalue: | REAL_LITERAL #cfpr | (TRUE|FALSE) #cbool | LBRACE - (ckv (COMMA ckv)*)? + (ckv (COMMA ckv)*)? COMMA? RBRACE #table | LBRACKET (cvalue (COMMA cvalue)*)? RBRACKET #list; diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index e919b10c377..d67c84db3b1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -24,13 +24,6 @@ public Object visitCfile(KeYParser.CfileContext ctx) { return null; } - @Override - public Object visitCsection(KeYParser.CsectionContext ctx) { - var name = ctx.IDENT().getText(); - section = root.getSection(name, true); - return null; - } - @Override public Object visitCkv(KeYParser.CkvContext ctx) { var name = ctx.ckey().getText(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/TacletPBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/TacletPBuilder.java index b54eee5a0a8..2275be52867 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/TacletPBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/builder/TacletPBuilder.java @@ -44,7 +44,7 @@ public class TacletPBuilder extends ExpressionBuilder { private final Deque> currentTBuilder = new ArrayDeque<>(8); - private HashMap> taclet2Builder = new HashMap<>(); + private Map> taclet2Builder = new HashMap<>(); private boolean axiomMode; @@ -65,7 +65,7 @@ public TacletPBuilder(Services services, NamespaceSet nss) { } public TacletPBuilder(Services services, NamespaceSet namespaces, - HashMap> taclet2Builder) { + Map> taclet2Builder) { this(services, namespaces); this.taclet2Builder = taclet2Builder; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java b/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java index 32c84270d05..b522c10374c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/init/InitConfig.java @@ -50,7 +50,7 @@ public class InitConfig { * maps categories to their default choice (both represented as Strings), which is used if no * other choice is specified in the problemfile */ - private HashMap category2DefaultChoice = new LinkedHashMap<>(); + private Map category2DefaultChoice = new LinkedHashMap<>(); /** * maps taclets to their TacletBuilders. This information is needed when a taclet contains @@ -171,8 +171,7 @@ public HashMap> getTaclet2Builder() { * specified choice the default choice contained in category2DefaultChoice is added. */ public void setActivatedChoices(ImmutableSet activatedChoices) { - category2DefaultChoice = - ProofSettings.DEFAULT_SETTINGS.getChoiceSettings().getDefaultChoices(); + category2DefaultChoice = ProofSettings.DEFAULT_SETTINGS.getChoiceSettings().getDefaultChoices(); HashMap c2DC = new HashMap<>(category2DefaultChoice); for (final Choice c : activatedChoices) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index 5c232703014..0a20bda0ecb 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -158,7 +158,7 @@ public > T getEnum(String name, T defaultValue) { } public void save(Writer writer, String comment) { - new ConfigurationWriter(writer).printComment(comment).printConfiguration(this); + new ConfigurationWriter(writer).printComment(comment).printMap(this.data); } @@ -187,7 +187,6 @@ public void setDocumentation(String documentation) { private static class ConfigurationWriter { private final PrintWriter out; private int indent; - private int equalSignPos; public ConfigurationWriter(Writer writer) { this.out = new PrintWriter(writer); @@ -209,33 +208,6 @@ public ConfigurationWriter printComment(String comment) { return this; } - public ConfigurationWriter printConfiguration(Configuration c) { - return printConfiguration(c, true); - } - - public ConfigurationWriter printConfiguration(Configuration c, boolean section) { - c.data.forEach((k, v) -> { - if (v != null) { - if (section && v instanceof Configuration) - printSection(k, (Configuration) v); - else - printKeyValue(k, v).newline().reset(); - } - }); - return this; - } - - private void printSection(String k, Configuration v) { - reset(); - out.format("\n[%s]\n", k); - printConfiguration(v, false); - } - - private ConfigurationWriter reset() { - equalSignPos = 0; - return this; - } - private ConfigurationWriter printKeyValue(String key, Object value) { return printKey(key).printValue(value); } @@ -270,9 +242,9 @@ private ConfigurationWriter printValue(Object value) { } private ConfigurationWriter printMap(Map value) { - var old = equalSignPos; - var own = equalSignPos += 2; out.format("{ "); + indent += 4; + newline().printIndent(); for (Iterator> iterator = value.entrySet().iterator(); iterator.hasNext(); ) { Map.Entry entry = iterator.next(); String k = entry.getKey(); @@ -280,20 +252,15 @@ private ConfigurationWriter printMap(Map value) { printKeyValue(k, v); if (iterator.hasNext()) { print(",").newline(); - equalSignPos = own; - fillSpaces(); + printIndent(); } } + indent -= 4; + newline().printIndent(); out.format(" }"); - equalSignPos = old; return this; } - private void fillSpaces() { - for (int i = 0; i < equalSignPos; i++) { - print(" "); - } - } private ConfigurationWriter print(String s) { out.print(s); @@ -301,9 +268,10 @@ private ConfigurationWriter print(String s) { } private ConfigurationWriter printSeq(Collection value) { - var old = equalSignPos; - equalSignPos += 2; out.format("[ "); + indent += 4; + newline(); + printIndent(); for (Iterator iterator = value.iterator(); iterator.hasNext(); ) { Object o = iterator.next(); printValue(o); @@ -313,24 +281,19 @@ private ConfigurationWriter printSeq(Collection value) { } else { print(","); newline(); - fillSpaces(); + printIndent(); } } } + indent -= 4; + newline().printIndent(); out.format(" ]"); - equalSignPos = old; return this; } private ConfigurationWriter printKey(String key) { - if (key.contains(" ") || key.contains("(") || key.contains(")") || key.contains("[s")) { - printValue(key); - equalSignPos += key.length() + 5; - } else { - out.write(key); - equalSignPos += key.length() + 3; - } - out.format(" = "); + printValue(key); + out.format(" : "); return this; } } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java index c3640d97340..98536fceae4 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSettings.java @@ -25,7 +25,7 @@ public class ProofIndependentSettings { public static final ProofIndependentSettings DEFAULT_INSTANCE; static { - var file = new File(PathConfig.getProofIndependentSettings().replace(".props", ".toml")); + var file = new File(PathConfig.getProofIndependentSettings().replace(".props", ".json")); if (file.exists()) { DEFAULT_INSTANCE = new ProofIndependentSettings(file); } else { @@ -127,7 +127,7 @@ public void saveSettings() { filename.getParentFile().mkdirs(); } - try (var out = new BufferedWriter(new FileWriter(filename.toString().replace(".props", ".toml")))) { + try (var out = new BufferedWriter(new FileWriter(filename.toString().replace(".props", ".json")))) { config.save(out, "Proof-Independent-Settings-File. Generated " + new Date()); } catch (IOException e) { throw new RuntimeException(e); diff --git a/key.core/src/main/java/de/uka/ilkd/key/util/SideProofUtil.java b/key.core/src/main/java/de/uka/ilkd/key/util/SideProofUtil.java index 677ba20eb79..f7d3b569f57 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/util/SideProofUtil.java +++ b/key.core/src/main/java/de/uka/ilkd/key/util/SideProofUtil.java @@ -62,8 +62,7 @@ public static ProofEnvironment cloneProofEnvironmentWithOwnOneStepSimplifier(fin : null; initConfig.setSettings(clonedSettings); initConfig.setTaclet2Builder( - (HashMap>) sourceInitConfig.getTaclet2Builder() - .clone()); + (HashMap>) sourceInitConfig.getTaclet2Builder().clone()); initConfig.setTaclets(sourceInitConfig.getTaclets()); // Create new ProofEnvironment and initialize it with values from initial one. ProofEnvironment env = new ProofEnvironment(initConfig); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java index b7fd9a3ed07..23c386ec2e8 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java @@ -33,7 +33,7 @@ public class ColorSettings extends AbstractPropertiesSettings { new File(PathConfig.getKeyConfigDir(), SETTINGS_FILENAME); public static final File SETTINGS_FILE_NEW = - new File(PathConfig.getKeyConfigDir(), "colors.toml"); + new File(PathConfig.getKeyConfigDir(), "colors.json"); private static final Logger LOGGER = LoggerFactory.getLogger(ColorSettings.class); private static ColorSettings INSTANCE; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java index c27bacf1006..e465bef3b73 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java @@ -16,6 +16,7 @@ import java.io.FileWriter; import java.io.IOException; import java.io.Writer; +import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.Properties; import java.util.TreeMap; @@ -37,7 +38,7 @@ public class KeyStrokeSettings extends AbstractPropertiesSettings { */ public static final File SETTINGS_FILE = new File(PathConfig.getKeyConfigDir(), SETTINGS_FILENAME); - private static final File SETTINGS_FILE_NEW = new File(PathConfig.getKeyConfigDir(), "keystrokes.toml"); + private static final File SETTINGS_FILE_NEW = new File(PathConfig.getKeyConfigDir(), "keystrokes.json"); private static final Logger LOGGER = LoggerFactory.getLogger(KeyStrokeSettings.class); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java index abcbf025072..d210780098a 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java @@ -1,14 +1,14 @@ package de.uka.ilkd.key.gui.smt.settings; -import java.awt.*; -import javax.swing.*; - import de.uka.ilkd.key.gui.MainWindow; import de.uka.ilkd.key.gui.settings.SettingsManager; import de.uka.ilkd.key.gui.settings.SettingsPanel; import de.uka.ilkd.key.gui.settings.SettingsProvider; import de.uka.ilkd.key.settings.ProofDependentSMTSettings; +import javax.swing.*; +import java.awt.*; + /** * @author Alexander Weigl * @version 1 (08.04.19) @@ -16,51 +16,51 @@ class TranslationOptions extends SettingsPanel implements SettingsProvider { private static final long serialVersionUID = 7299370317491756605L; private static final String infoUseExplicitTypeHierarchy = - "If this option is selected, the transitive inheritance between classes is modeled by " - + "assumptions.\n\n" - + "Example: Let A, B and C be classes such that C extends B and B extends A.\n" - + "If the option is not selected, the following assumptions are added:\n" - + "\\forall x; (type_of_C(x)->type_of_B(x))\n" - + "\\forall x; (type_of_B(x)->type_of_A(x))\n" - + "If the option is selected, the following assumption is additionally added to the assumptions above:\n" - + "\\forall x; (type_of_C(x)->type_of_A(x))\n"; + "If this option is selected, the transitive inheritance between classes is modeled by " + + "assumptions.\n\n" + + "Example: Let A, B and C be classes such that C extends B and B extends A.\n" + + "If the option is not selected, the following assumptions are added:\n" + + "\\forall x; (type_of_C(x)->type_of_B(x))\n" + + "\\forall x; (type_of_B(x)->type_of_A(x))\n" + + "If the option is selected, the following assumption is additionally added to the assumptions above:\n" + + "\\forall x; (type_of_C(x)->type_of_A(x))\n"; private static final String infoUseNullInstantiation = - "At the moment this option has only effect on hierarchy assumptions regarding the null object.\n" - + "Example: Let A and B be classes.\n" - + "If the option is not selected, the type null is treated as a normal class. " - + "Consequently, the following assumptions are added:\n" - + "\\forall x; (type_of_Null(x)->type_of_A(x))\n" - + "\\forall x; (type_of_Null(x)->type_of_B(x))\n" - + "If the option is selected, those assumptions are instantiated with a concrete null object:\n" - + "type_of_A(null)\n" + "type_of_B(null)"; + "At the moment this option has only effect on hierarchy assumptions regarding the null object.\n" + + "Example: Let A and B be classes.\n" + + "If the option is not selected, the type null is treated as a normal class. " + + "Consequently, the following assumptions are added:\n" + + "\\forall x; (type_of_Null(x)->type_of_A(x))\n" + + "\\forall x; (type_of_Null(x)->type_of_B(x))\n" + + "If the option is selected, those assumptions are instantiated with a concrete null object:\n" + + "type_of_A(null)\n" + "type_of_B(null)"; private static final String infoUseBuiltInUniqueness = - "Some solvers support the uniqueness of functions by built-in mechanisms. If this option is selected " - + "those mechanisms are used, otherwise some assumptions are added by using normal FOL.\n" - + "Note: The uniqueness of functions is needed for translating attributes and arrays."; + "Some solvers support the uniqueness of functions by built-in mechanisms. If this option is selected " + + "those mechanisms are used, otherwise some assumptions are added by using normal FOL.\n" + + "Note: The uniqueness of functions is needed for translating attributes and arrays."; private static final String infoUseUIMultiplication = - "Some solvers support only simple multiplications. For example Yices supports only multiplications of type a*b" - + " where a or b must be a number.\n" - + "In order to support more complex multiplications, this option can be activated: If the solver does not support a" - + " certain kind of multiplication, the occurence of this multiplication is translated" - + " into the uninterpreted function mult. Furthermore some" - + " typical assumptions are added:\n" + "\\forall x; mult(x,0)=0\n" - + "\\forall x; mult(0,x)=0\n" + "\\forall x; mult(x,1)=x\n" - + "\\forall x; mult(1,x)=x\n" + "\\forall x; \\forall y; mult(x,y)=mult(y,x)\n" - + "\\forall x; \\forall y; \\forall z; mult(mult(x,y),z)=mult(x,mult(y,z))\n" - + "\\forall x; \\forall y; mult(x,y)=0 -> (x=0|y=0)\n" - + "\\forall x; \\forall y; mult(x,y)=1 -> (x=1&y=1)\n" + "Note:\n" - + "1. If this option is not selected, an exception is thrown in the case that a unsupported multiplication " - + "occurs.\n" - + "2. The translation makes the uninterpreted function mult unique, so that there cannot be any clashes with functions" - + " that are introduced by the user."; + "Some solvers support only simple multiplications. For example Yices supports only multiplications of type a*b" + + " where a or b must be a number.\n" + + "In order to support more complex multiplications, this option can be activated: If the solver does not support a" + + " certain kind of multiplication, the occurence of this multiplication is translated" + + " into the uninterpreted function mult. Furthermore some" + + " typical assumptions are added:\n" + "\\forall x; mult(x,0)=0\n" + + "\\forall x; mult(0,x)=0\n" + "\\forall x; mult(x,1)=x\n" + + "\\forall x; mult(1,x)=x\n" + "\\forall x; \\forall y; mult(x,y)=mult(y,x)\n" + + "\\forall x; \\forall y; \\forall z; mult(mult(x,y),z)=mult(x,mult(y,z))\n" + + "\\forall x; \\forall y; mult(x,y)=0 -> (x=0|y=0)\n" + + "\\forall x; \\forall y; mult(x,y)=1 -> (x=1&y=1)\n" + "Note:\n" + + "1. If this option is not selected, an exception is thrown in the case that a unsupported multiplication " + + "occurs.\n" + + "2. The translation makes the uninterpreted function mult unique, so that there cannot be any clashes with functions" + + " that are introduced by the user."; private static final String infoUseConstantsForIntegers = - "Some solvers support only a certain interval of integers (e.g. Simplify). If this option is activated," - + " numbers that are not supported by the used solver are translated into uninterpreted constants. Furthermore " - + " an asumption is added that states that the introduced constant is greater than the maximum of the supported numbers.\n\n" - + "Example: Assume that a solver supports numbers less or equal 10:\n" - + "The number 11 is translated into the constant c_11 and the assumption" - + " c_11>10 is introduced.\n\n" - + "Note: If this option is not selected, an exception is thrown in the case that a not supported number occurs.\n"; + "Some solvers support only a certain interval of integers (e.g. Simplify). If this option is activated," + + " numbers that are not supported by the used solver are translated into uninterpreted constants. Furthermore " + + " an asumption is added that states that the introduced constant is greater than the maximum of the supported numbers.\n\n" + + "Example: Assume that a solver supports numbers less or equal 10:\n" + + "The number 11 is translated into the constant c_11 and the assumption" + + " c_11>10 is introduced.\n\n" + + "Note: If this option is not selected, an exception is thrown in the case that a not supported number occurs.\n"; private final JCheckBox useExplicitTypeHierachy; private final JCheckBox useNullInstantiation; private final JCheckBox useBuiltInUniqueness; @@ -102,48 +102,45 @@ public void setSmtSettings(ProofDependentSMTSettings settings) { protected JCheckBox createUseExplicitTypeHierachy() { return addCheckBox("Use an explicit type hierarchy.", infoUseExplicitTypeHierarchy, false, - e -> settings.setUseExplicitTypeHierarchy(useExplicitTypeHierachy.isSelected())); + e -> settings.setUseExplicitTypeHierarchy(useExplicitTypeHierachy.isSelected())); } protected JCheckBox createNullInstantiation() { return addCheckBox("Instantiate hierarchy assumptions if possible (recommended).", - infoUseNullInstantiation, false, - e -> settings.setUseNullInstantiation(useNullInstantiation.isSelected())); + infoUseNullInstantiation, false, + e -> settings.setUseNullInstantiation(useNullInstantiation.isSelected())); } protected JCheckBox createBuiltInUniqueness() { return addCheckBox("Use built-in mechanism for uniqueness if possible.", - infoUseBuiltInUniqueness, false, - e -> settings.setUseBuiltInUniqueness(useBuiltInUniqueness.isSelected())); + infoUseBuiltInUniqueness, false, + e -> settings.setUseBuiltInUniqueness(useBuiltInUniqueness.isSelected())); } protected JCheckBox createUIMultiplication() { return addCheckBox("Use uninterpreted multiplication if necessary.", - infoUseUIMultiplication, false, - e -> settings.setUseUIMultiplication(useUIMultiplication.isSelected())); + infoUseUIMultiplication, false, + e -> settings.setUseUIMultiplication(useUIMultiplication.isSelected())); } protected JSpinner createMaxField() { JSpinner max = addNumberField("Maximum", Integer.MIN_VALUE, Integer.MAX_VALUE, 1, "", e -> { - long result = Integer.MAX_VALUE; if (settings != null) { - result = settings.getMaxInteger(); + settings.setMaxInteger(e.longValue()); } - try { + }); + try { max.setValue((long) Integer.MAX_VALUE); max.setForeground(Color.BLACK); } catch (IllegalArgumentException e) { max.setForeground(Color.RED); - } - settings.setMaxInteger(result); - }); - max.setValue(Integer.MAX_VALUE); + } return max; } protected JSpinner createMinField() { return addNumberField("Minimum", Integer.MIN_VALUE, Integer.MAX_VALUE, 1, "", - val -> settings.setMinInteger(val.longValue())); + val -> settings.setMinInteger(val.longValue())); } protected JCheckBox createConstantsForIntegers() { From 26529befa8a61f8faf0bf30fbdf320aee2462077 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Wed, 5 Apr 2023 18:55:27 +0200 Subject: [PATCH 04/24] Proof dependent settings --- key.core/src/main/antlr4/KeYParser.g4 | 4 +- .../key/nparser/ConfigurationBuilder.java | 29 ++--- .../java/de/uka/ilkd/key/nparser/KeyAst.java | 7 +- .../uka/ilkd/key/nparser/ParsingFacade.java | 31 ++--- .../key/proof/io/OutputStreamProofSaver.java | 2 +- .../ilkd/key/settings/AbstractSettings.java | 1 - .../uka/ilkd/key/settings/ChoiceSettings.java | 3 +- .../uka/ilkd/key/settings/Configuration.java | 43 ++++++- .../de/uka/ilkd/key/settings/PathConfig.java | 2 +- .../settings/ProofDependentSMTSettings.java | 22 ++-- .../settings/ProofIndependentSMTSettings.java | 2 +- .../uka/ilkd/key/settings/ProofSettings.java | 106 ++++++++++++------ .../de/uka/ilkd/key/settings/Settings.java | 61 ++++++++-- .../key/settings/default-proof-settings.json | 9 ++ .../java/de/uka/ilkd/key/gui/MainWindow.java | 2 +- .../de/uka/ilkd/key/gui/RecentFileMenu.java | 71 ++++-------- .../ilkd/key/gui/colors/ColorSettings.java | 1 + .../gui/keyshortcuts/KeyStrokeSettings.java | 2 +- .../key/gui/settings/SettingsManager.java | 4 +- 19 files changed, 246 insertions(+), 156 deletions(-) create mode 100644 key.core/src/main/resources/de/uka/ilkd/key/settings/default-proof-settings.json diff --git a/key.core/src/main/antlr4/KeYParser.g4 b/key.core/src/main/antlr4/KeYParser.g4 index 1921afe6d3e..b620af84e67 100644 --- a/key.core/src/main/antlr4/KeYParser.g4 +++ b/key.core/src/main/antlr4/KeYParser.g4 @@ -814,7 +814,7 @@ proofScript proof: PROOF EOF; // Config -cfile: cvalue*; +cfile: cvalue* EOF; //csection: LBRACKET IDENT RBRACKET; ckv: doc=DOC_COMMENT? ckey ':' cvalue; ckey: IDENT | STRING_LITERAL; @@ -831,4 +831,4 @@ cvalue: | LBRACE (ckv (COMMA ckv)*)? COMMA? RBRACE #table - | LBRACKET (cvalue (COMMA cvalue)*)? RBRACKET #list; + | LBRACKET (cvalue (COMMA cvalue)*)? COMMA? RBRACKET #list; diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index d67c84db3b1..65dbbe5bd0e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -4,6 +4,8 @@ import de.uka.ilkd.key.util.LinkedHashMap; import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; /** * @author Alexander Weigl @@ -12,33 +14,24 @@ */ class ConfigurationBuilder extends KeYParserBaseVisitor { private Configuration root; - private Configuration section; public Configuration getConfiguration() { return root; } @Override - public Object visitCfile(KeYParser.CfileContext ctx) { - section = root = new Configuration(); - return null; + public List visitCfile(KeYParser.CfileContext ctx) { + return ctx.cvalue().stream().map(it -> it.accept(this)).collect(Collectors.toList()); } - @Override - public Object visitCkv(KeYParser.CkvContext ctx) { - var name = ctx.ckey().getText(); - var val = ctx.cvalue().accept(this); - section.set(name, val); - return null; - } @Override - public Object visitCsymbol(KeYParser.CsymbolContext ctx) { + public String visitCsymbol(KeYParser.CsymbolContext ctx) { return ctx.IDENT().getText(); } @Override - public Object visitCstring(KeYParser.CstringContext ctx) { + public String visitCstring(KeYParser.CstringContext ctx) { final var text = ctx.getText(); return text.substring(1, text.length() - 1) .replace("\\\"", "\"") @@ -82,13 +75,13 @@ public Object visitCbool(KeYParser.CboolContext ctx) { @Override public Object visitTable(KeYParser.TableContext ctx) { - var oldSection = section; - var table = section = new Configuration(new LinkedHashMap<>()); + final var data = new LinkedHashMap(); for (KeYParser.CkvContext context : ctx.ckv()) { - context.accept(this); + var name = context.ckey().getText(); + var val = context.cvalue().accept(this); + data.put(name, val); } - section = oldSection; - return table; + return new Configuration(data); } @Override 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 f5beaaebe67..075a1aa3bb6 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 @@ -130,8 +130,11 @@ public static class ConfigurationFile extends KeyAst { public Configuration asConfiguration() { final var cfg = new ConfigurationBuilder(); - ctx.accept(cfg); - return cfg.getConfiguration(); + var res = cfg.visitCfile(ctx); + if (res.size() > 0) + return (Configuration) res.get(0); + else + throw new RuntimeException(); } } 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 e34c0e202fd..fc1ecca1e4c 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 @@ -1,5 +1,15 @@ package de.uka.ilkd.key.nparser; +import de.uka.ilkd.key.nparser.builder.ChoiceFinder; +import de.uka.ilkd.key.proof.io.RuleSource; +import de.uka.ilkd.key.settings.Configuration; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.tree.TerminalNode; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; @@ -10,17 +20,6 @@ import java.nio.charset.CodingErrorAction; import java.nio.file.Path; import java.util.*; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; - -import de.uka.ilkd.key.nparser.builder.ChoiceFinder; -import de.uka.ilkd.key.proof.io.RuleSource; - -import de.uka.ilkd.key.settings.Configuration; -import org.antlr.v4.runtime.*; -import org.antlr.v4.runtime.tree.TerminalNode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * This facade provides low-level access to the ANTLR4 Parser and Lexer. @@ -102,9 +101,9 @@ public static KeYLexer createLexer(CharStream stream) { public static KeyAst.File parseFile(URL url) throws IOException { long start = System.currentTimeMillis(); try (BufferedInputStream is = new BufferedInputStream(url.openStream()); - ReadableByteChannel channel = Channels.newChannel(is)) { + ReadableByteChannel channel = Channels.newChannel(is)) { CodePointCharStream stream = CharStreams.fromChannel(channel, Charset.defaultCharset(), - 4096, CodingErrorAction.REPLACE, url.toString(), -1); + 4096, CodingErrorAction.REPLACE, url.toString(), -1); return parseFile(stream); } finally { long stop = System.currentTimeMillis(); @@ -193,8 +192,12 @@ public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) return new KeyAst.ConfigurationFile(ctx); } + public static Configuration readConfigurationFile(CharStream input) throws IOException { + return parseConfigurationFile(input).asConfiguration(); + } + public static Configuration readConfigurationFile(Path file) throws IOException { - return parseConfigurationFile(CharStreams.fromPath(file)).asConfiguration(); + return readConfigurationFile(CharStreams.fromPath(file)); } public static Configuration readConfigurationFile(File file) throws IOException { diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/OutputStreamProofSaver.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/OutputStreamProofSaver.java index eade5a6e010..e0c501b1a99 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/OutputStreamProofSaver.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/OutputStreamProofSaver.java @@ -145,7 +145,7 @@ public String writeProfile(Profile profile) { } public String writeSettings(ProofSettings ps) { - return "\\settings {\n\"" + escapeCharacters(ps.settingsToString()) + "\"\n}\n"; + return String.format("\\settings %s \n", ps.settingsToString()); } public void save(OutputStream out) throws IOException { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractSettings.java index d4cb7bb383d..1e8004e5dea 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/AbstractSettings.java @@ -21,7 +21,6 @@ public void removePropertyChangeListener(PropertyChangeListener listener) { changeSupport.removePropertyChangeListener(listener); } - @Override public PropertyChangeListener[] getPropertyChangeListeners() { return changeSupport.getPropertyChangeListeners(); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index b9714533b01..12350db1301 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -1,7 +1,5 @@ package de.uka.ilkd.key.settings; -import java.util.*; - import de.uka.ilkd.key.logic.Choice; import de.uka.ilkd.key.logic.Name; import de.uka.ilkd.key.logic.Namespace; @@ -170,6 +168,7 @@ public void writeSettings(Properties props) { @Override public void readSettings(Configuration props) { var category = props.getSection(CATEGORY); + if (category == null) return; for (Map.Entry entry : category.getEntries()) { assert entry.getValue() instanceof String; category2Default.put(entry.getKey(), entry.getValue().toString()); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index 0a20bda0ecb..ef9f952c8b2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -2,6 +2,7 @@ import de.uka.ilkd.key.nparser.ParsingFacade; import de.uka.ilkd.key.util.Position; +import org.antlr.v4.runtime.CharStream; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -31,6 +32,10 @@ public static Configuration load(File file) throws IOException { return ParsingFacade.readConfigurationFile(file); } + public static Configuration load(CharStream input) throws IOException { + return ParsingFacade.readConfigurationFile(input); + } + public boolean exists(String name) { return data.containsKey(name); } @@ -102,6 +107,8 @@ public List getList(String name) { public List getStringList(String name) { var seq = get(name, List.class); + if (seq == null) + return Collections.emptyList(); if (!seq.stream().allMatch(it -> it instanceof String)) throw new AssertionError(); return seq; } @@ -144,6 +151,38 @@ public Object set(String name, Object obj) { return data.put(name, obj); } + public Object set(String name, Boolean obj) { + return set(name, (Object) obj); + } + + public Object set(String name, String obj) { + return set(name, (Object) obj); + } + + public Object set(String name, Long obj) { + return set(name, (Object) obj); + } + + public Object set(String name, int obj) { + return set(name, (long) obj); + } + + public Object set(String name, Double obj) { + return set(name, (Object) obj); + } + + public Object set(String name, Configuration obj) { + return set(name, (Object) obj); + } + + public Object set(String name, List obj) { + return set(name, (Object) obj); + } + + public Object set(String name, String[] seq) { + return set(name, (Object) Arrays.asList(seq)); + } + public Set> getEntries() { return data.entrySet(); } @@ -184,7 +223,7 @@ public void setDocumentation(String documentation) { } } - private static class ConfigurationWriter { + public static class ConfigurationWriter { private final PrintWriter out; private int indent; @@ -217,7 +256,7 @@ private ConfigurationWriter newline() { return this; } - private ConfigurationWriter printValue(Object value) { + public ConfigurationWriter printValue(Object value) { if (value instanceof String) { out.format("\"%s\"", value); } else if (value instanceof Long || value instanceof Integer diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/PathConfig.java b/key.core/src/main/java/de/uka/ilkd/key/settings/PathConfig.java index 1bacec69a24..83f92276f81 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/PathConfig.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/PathConfig.java @@ -75,7 +75,7 @@ public static String getKeyConfigDir() { */ public static void setKeyConfigDir(String keyConfigDir) { PathConfig.keyConfigDir = keyConfigDir; - PathConfig.recentFileStorage = getKeyConfigDir() + File.separator + "recentFiles.props"; + PathConfig.recentFileStorage = getKeyConfigDir() + File.separator + "recentFiles.json"; PathConfig.proofIndependentSettings = getKeyConfigDir() + File.separator + "proofIndependentSettings.props"; PathConfig.logDirectory = new File(keyConfigDir, "logs"); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java index eb21454948a..87f6870b27e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofDependentSMTSettings.java @@ -9,21 +9,21 @@ public class ProofDependentSMTSettings extends AbstractSettings { public static final String CATEGORY = "SMTSettings"; - public static final String EXPLICIT_TYPE_HIERARCHY = "[SMTSettings]explicitTypeHierarchy"; + public static final String EXPLICIT_TYPE_HIERARCHY = "explicitTypeHierarchy"; public static final String INSTANTIATE_NULL_PREDICATES = - "[SMTSettings]instantiateHierarchyAssumptions"; - public static final String MAX_GENERIC_SORTS = "[SMTSettings]maxGenericSorts"; - public static final String TACLET_SELECTION = "[SMTSettings]SelectedTaclets"; - public static final String USE_BUILT_IN_UNIQUENESS = "[SMTSettings]UseBuiltUniqueness"; + "instantiateHierarchyAssumptions"; + public static final String MAX_GENERIC_SORTS = "maxGenericSorts"; + public static final String TACLET_SELECTION = "SelectedTaclets"; + public static final String USE_BUILT_IN_UNIQUENESS = "UseBuiltUniqueness"; public static final String USE_UNINTERPRETED_MULTIPLICATION = - "[SMTSettings]useUninterpretedMultiplication"; + "useUninterpretedMultiplication"; public static final String USE_CONSTANTS_FOR_BIGSMALL_INTEGERS = - "[SMTSettings]useConstantsForBigOrSmallIntegers"; - public static final String INTEGERS_MAXIMUM = "[SMTSettings]integersMaximum"; - public static final String INTEGERS_MINIMUM = "[SMTSettings]integersMinimum"; - public static final String INVARIANT_FORALL = "[SMTSettings]invariantForall"; + "useConstantsForBigOrSmallIntegers"; + public static final String INTEGERS_MAXIMUM = "integersMaximum"; + public static final String INTEGERS_MINIMUM = "integersMinimum"; + public static final String INVARIANT_FORALL = "invariantForall"; - public static final String PROP_LEGACY_TRANSLATION = "[SMTSettings]legacyTranslation"; + public static final String PROP_LEGACY_TRANSLATION = "legacyTranslation"; private static final String PROP_SUPPORTED_TACLETS = "supportedTaclets"; private boolean useExplicitTypeHierarchy = false; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java index 0dcc1037390..625c4b3fc7e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofIndependentSMTSettings.java @@ -419,7 +419,7 @@ public void writeSettings(Configuration props) { cat.set(KEY_TIMEOUT, timeout); cat.set(SHOW_SMT_RES_DIA, showResultsAfterExecution); - cat.set(PROGRESS_DIALOG_MODE, modeOfProgressDialog); + cat.set(PROGRESS_DIALOG_MODE, modeOfProgressDialog.toString()); cat.set(PATH_FOR_SMT_TRANSLATION, pathForSMTTranslation); cat.set(PATH_FOR_TACLET_TRANSLATION, pathForTacletTranslation); cat.set(ACTIVE_SOLVER, activeSolver); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java index 66d3a29c790..a2f7f1daed3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java @@ -1,5 +1,10 @@ package de.uka.ilkd.key.settings; +import de.uka.ilkd.key.util.KeYResourceManager; +import org.antlr.v4.runtime.CharStreams; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import java.beans.PropertyChangeListener; import java.io.*; import java.net.URL; @@ -8,11 +13,6 @@ import java.util.List; import java.util.Properties; -import de.uka.ilkd.key.util.KeYResourceManager; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - /** * This class is used to load and save settings for proofs such as which data type models are used * to represent the java types. Which heuristics have to be loaded and so on. The class loads the @@ -31,10 +31,13 @@ public class ProofSettings { private static final Logger LOGGER = LoggerFactory.getLogger(ProofSettings.class); - public static final File PROVER_CONFIG_FILE = - new File(PathConfig.getKeyConfigDir(), "proof-settings.props"); + public static final File PROVER_CONFIG_FILE = new File(PathConfig.getKeyConfigDir(), "proof-settings.props"); + + public static final File PROVER_CONFIG_FILE_NEW = new File(PathConfig.getKeyConfigDir(), "proof-settings.json"); + public static final URL PROVER_CONFIG_FILE_TEMPLATE = KeYResourceManager.getManager() - .getResourceFile(ProofSettings.class, "default-proof-settings.props"); + .getResourceFile(ProofSettings.class, "default-proof-settings.json"); + public static final ProofSettings DEFAULT_SETTINGS = ProofSettings.loadedSettings(); @@ -57,11 +60,12 @@ private static ProofSettings loadedSettings() { private final StrategySettings strategySettings = new StrategySettings(); private final ChoiceSettings choiceSettings = new ChoiceSettings(); private final ProofDependentSMTSettings smtSettings = - ProofDependentSMTSettings.getDefaultSettingsData(); + ProofDependentSMTSettings.getDefaultSettingsData(); private final NewSMTTranslationSettings newSMTSettings = new NewSMTTranslationSettings(); private final TermLabelSettings termLabelSettings = new TermLabelSettings(); private Properties lastLoadedProperties = null; + private Configuration lastLoadedConfiguration = null; /** * create a proof settings object. When you add a new settings object, PLEASE UPDATE THE LIST @@ -100,8 +104,9 @@ public void addSettings(Settings settings) { } /** - * + * @deprecated {@link #getConfiguration} */ + @Deprecated public Properties getProperties() { Properties result = new Properties(); for (Settings s : settings) { @@ -110,15 +115,19 @@ public Properties getProperties() { return result; } + public Configuration getConfiguration() { + var config = new Configuration(); + for (Settings s : settings) { + s.writeSettings(config); + } + return config; + } + /** * Used by saveSettings() and settingsToString() */ public void settingsToStream(Writer out) { - try { - getProperties().store(out, "Proof-Settings-Config-File"); - } catch (IOException e) { - LOGGER.warn("Could not save proof-settings.", e); - } + getConfiguration().save(out, "Proof-Settings-Config-File"); } /** @@ -126,10 +135,10 @@ public void settingsToStream(Writer out) { */ public void saveSettings() { try { - if (!PROVER_CONFIG_FILE.exists()) { + if (!PROVER_CONFIG_FILE_NEW.exists()) { PROVER_CONFIG_FILE.getParentFile().mkdirs(); } - try (Writer out = new FileWriter(PROVER_CONFIG_FILE, StandardCharsets.UTF_8)) { + try (Writer out = new BufferedWriter(new FileWriter(PROVER_CONFIG_FILE_NEW, StandardCharsets.UTF_8))) { settingsToStream(out); } } catch (IOException e) { @@ -143,49 +152,72 @@ public String settingsToString() { return out.getBuffer().toString(); } - /** - * Used by loadSettings() and loadSettingsFromString(...) - */ - public void loadSettingsFromStream(Reader in) { - Properties defaultProps = new Properties(); + public void loadSettingsFromJSONStream(Reader in) throws IOException { + var config = Configuration.load(CharStreams.fromReader(in)); + lastLoadedProperties = null; + lastLoadedConfiguration = config; + for (Settings s : settings) { + s.readSettings(config); + } + } + public void loadDefaultJSONSettings() { if (PROVER_CONFIG_FILE_TEMPLATE == null) { - LOGGER.warn("default proof-settings file could not be found."); + LOGGER.warn("default proof-settings file 'default-proof-settings.json' could not be found."); } else { - try { - defaultProps.load(PROVER_CONFIG_FILE_TEMPLATE.openStream()); + try (var in = new InputStreamReader(PROVER_CONFIG_FILE_TEMPLATE.openStream())) { + loadSettingsFromJSONStream(in); } catch (IOException e) { - LOGGER.warn("Default proof-settings could not be loaded."); + LOGGER.error("Default proof-settings could not be loaded.", e); } } + } - Properties props = new Properties(defaultProps); + /** + * Used by loadSettings() and loadSettingsFromString(...) + * + * @deprecated in favour of {@link #loadSettingsFromJSONStream(Reader)} + */ + @Deprecated + public void loadSettingsFromPropertyStream(Reader in) { + Properties props = new Properties(); try { props.load(in); } catch (IOException e) { - LOGGER.warn("No proof-settings could be loaded, using defaults"); + LOGGER.warn("Error on loading proof-settings.", e); } lastLoadedProperties = props; + lastLoadedConfiguration = null; for (Settings s : settings) { s.readSettings(props); } } /** - * Loads the the former settings from configuration file. + * Loads the former settings from configuration file. */ public void loadSettings() { - try (FileReader in = new FileReader(PROVER_CONFIG_FILE, StandardCharsets.UTF_8)) { - if (Boolean.getBoolean(PathConfig.DISREGARD_SETTINGS_PROPERTY)) { - LOGGER.warn("The settings in {} are *not* read.", PROVER_CONFIG_FILE); - } else { - loadSettingsFromStream(in); + if (Boolean.getBoolean(PathConfig.DISREGARD_SETTINGS_PROPERTY)) { + LOGGER.warn("The settings in {} are *not* read.", PROVER_CONFIG_FILE); + } else { + var isOldFormat = !PROVER_CONFIG_FILE_NEW.exists(); + var fileToUse = isOldFormat ? PROVER_CONFIG_FILE : PROVER_CONFIG_FILE_NEW; + try (var in = new BufferedReader(new FileReader(fileToUse, StandardCharsets.UTF_8))) { + LOGGER.info("Load proof dependent settings from file {}", fileToUse); + if (isOldFormat) { + loadDefaultJSONSettings(); + loadSettingsFromPropertyStream(in); + } else { + loadDefaultJSONSettings(); + loadSettingsFromJSONStream(in); + } + } catch (IOException e) { + LOGGER.warn("No proof-settings could be loaded, using defaults", e); } - } catch (IOException e) { - LOGGER.warn("No proof-settings could be loaded, using defaults", e); } } + /** * Used to load Settings from a .key file */ @@ -194,7 +226,7 @@ public void loadSettingsFromString(String s) { return; } StringReader reader = new StringReader(s); - loadSettingsFromStream(reader); + loadSettingsFromPropertyStream(reader); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java index fa062db059d..b61d1fe6e25 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java @@ -1,6 +1,8 @@ package de.uka.ilkd.key.settings; +import javax.annotation.Nonnull; import java.beans.PropertyChangeListener; +import java.beans.PropertyChangeSupport; import java.util.Properties; /** @@ -12,37 +14,74 @@ public interface Settings { /** * gets a Properties object and has to perform the necessary steps in order to change this * object in a way that it represents the stored settings + * + * @deprecated Deprecated in favour of {@link #readSettings(Properties)} */ + @Deprecated void readSettings(Properties props); /** * The settings to store are written to the given Properties object. * * @param props the Properties object where to write the settings as (key, value) pair + * @deprecated Deprecated in favour of {@link #writeSettings(Configuration)} */ + @Deprecated void writeSettings(Properties props); /** - * gets a Properties object and has to perform the necessary steps in order to change this - * object in a way that it represents the stored settings + * This method transfers the given configuration information into the local states. The setter methods are used + * so {@link java.beans.PropertyChangeEvent} should be triggered accordingly to the new state. + *

+ * + * @param props a non-null references to a configuration object. The state of this object + * shall not be changed by the implementations. */ - void readSettings(Configuration props); + void readSettings(@Nonnull Configuration props); /** - * The settings to store are written to the given Properties object. + * The internal state is stored in the given configuration object. The stored information must be sufficient + * to restore the local state. + *

+ * The internal state shall not be changed by the implementations. * - * @param props the Properties object where to write the settings as (key, value) pair + * @param props a non-null reference to a configration object, which state is modified accordingly to the local + * internal state. */ - void writeSettings(Configuration props); + void writeSettings(@Nonnull Configuration props); - void addPropertyChangeListener(PropertyChangeListener listener); + /** + * Register a new listener which is triggered for changes on properties. + * + * @param listener a non-null reference + * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener) + */ + void addPropertyChangeListener(@Nonnull PropertyChangeListener listener); + /** + * Removes the given listener. + * + * @param listener a non-null reference + * @see java.beans.PropertyChangeSupport#removePropertyChangeListener(PropertyChangeListener) + */ void removePropertyChangeListener(PropertyChangeListener listener); - PropertyChangeListener[] getPropertyChangeListeners(); - - void addPropertyChangeListener(String propertyName, PropertyChangeListener listener); + /** + * Register a new listener which is triggered for changes on the specified property. + * + * @param propertyName the name for identification of the property + * @param listener the listener to be added + * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener) + */ + void addPropertyChangeListener(@Nonnull String propertyName, @Nonnull PropertyChangeListener listener); - void removePropertyChangeListener(String propertyName, PropertyChangeListener listener); + /** + * Removes the given listener from being triggered by changes of the specified property. + * + * @param propertyName the name for identification of the property + * @param listener the listener to be removed + * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener) + */ + void removePropertyChangeListener(@Nonnull String propertyName, @Nonnull PropertyChangeListener listener); } diff --git a/key.core/src/main/resources/de/uka/ilkd/key/settings/default-proof-settings.json b/key.core/src/main/resources/de/uka/ilkd/key/settings/default-proof-settings.json new file mode 100644 index 00000000000..f44dbc5ad4b --- /dev/null +++ b/key.core/src/main/resources/de/uka/ilkd/key/settings/default-proof-settings.json @@ -0,0 +1,9 @@ +// Proof-Settings-Config-File +{ + "Strategy": { + "ActiveStrategy": [ + "Simple", + "JavaCardDL" + ] + } +} \ No newline at end of file diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java index b7fef936e3c..24da64cbc35 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java @@ -968,7 +968,7 @@ private JMenu createOptionsMenu() { JMenu options = new JMenu("Options"); options.setMnemonic(KeyEvent.VK_O); - options.add(SettingsManager.getInstance().getActionShowSettings(this)); + options.add(SettingsManager.getActionShowSettings(this)); options.add(new TacletOptionsAction(this)); options.add(new SMTOptionsAction(this)); // options.add(setupSpeclangMenu()); // legacy since only JML supported diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java index a44133ca10d..b3d8a001eea 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/RecentFileMenu.java @@ -1,20 +1,21 @@ package de.uka.ilkd.key.gui; -import java.awt.event.ActionListener; -import java.io.*; -import java.nio.file.Path; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Properties; -import javax.swing.*; - import de.uka.ilkd.key.core.KeYMediator; import de.uka.ilkd.key.gui.fonticons.IconFactory; +import de.uka.ilkd.key.settings.Configuration; import de.uka.ilkd.key.settings.PathConfig; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.swing.*; +import java.awt.event.ActionListener; +import java.io.*; +import java.nio.file.Path; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.stream.Collectors; + /** * This class offers a mechanism to manage recent files; it adds the necessary menu items to a menu * or even can provide that menu itself. also it offers a way to read the recent files from a @@ -50,7 +51,7 @@ public class RecentFileMenu { /** * recent files, unique by path */ - private final HashMap pathToRecentFile = new HashMap<>(); + private final Map pathToRecentFile = new LinkedHashMap<>(); /** * Mapping from menu item to entry */ @@ -191,40 +192,13 @@ public JMenu getMenu() { return menu; } - /** - * read the recent file names from the properties object. the property names are expected to be - * "RecentFile0" "RecentFile1" ... - */ - private void load(Properties p) { - int i = maxNumberOfEntries; - do { - String s = p.getProperty("RecentFile" + i); - if (s != null) { - addRecentFileNoSave(s); - } - i--; - } while (i >= 0); - } - - /** - * Put the names of the recent Files into the properties object. The property names are - * "RecentFile0" "RecentFile1" ... The values are fully qualified path names. - */ - public void store(Properties p) { - // if there's nothing to store: - for (int i = 0; i < menu.getItemCount(); i++) { - p.setProperty("RecentFile" + i, getAbsolutePath(menu.getItem(i))); - } - } - /** * read the recent files from the given properties file */ public final void loadFrom(String filename) { - try (FileInputStream propStream = new FileInputStream(filename)) { - Properties p = new Properties(); - p.load(propStream); - load(p); + try { + var c = Configuration.load(new File(filename)); + c.getStringList("recentFiles").forEach(this::addRecentFileNoSave); } catch (FileNotFoundException ex) { LOGGER.debug("Could not read RecentFileList. Did not find file {}", filename); } catch (IOException ioe) { @@ -242,15 +216,14 @@ public String getMostRecent() { */ public void store(String filename) { File localRecentFiles = new File(filename); - - Properties p = new Properties(); - try (FileInputStream fin = new FileInputStream(localRecentFiles); - FileOutputStream fout = new FileOutputStream(localRecentFiles)) { - // creates a new file if it does not exist yet - localRecentFiles.createNewFile(); - p.load(fin); - store(p); - p.store(fout, "recent files"); + Configuration c = new Configuration(); + var seq = menuItemToRecentFile.values().stream() + .map(RecentFileEntry::getAbsolutePath) + .collect(Collectors.toList()); + c.set("recentFiles", seq); + + try (var fin = new BufferedWriter(new FileWriter(localRecentFiles))) { + c.save(fin, ""); } catch (IOException ex) { LOGGER.info("Could not write recent files list", ex); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java index 23c386ec2e8..3e425629432 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/colors/ColorSettings.java @@ -104,6 +104,7 @@ public void save() { ex.printStackTrace(); } + LOGGER.info("Save color settings to: " + SETTINGS_FILE_NEW.getAbsolutePath()); try (Writer writer = new FileWriter(SETTINGS_FILE_NEW)) { var config = new Configuration(properties); config.save(writer, "KeY's Colors"); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java index e465bef3b73..83c287b25b6 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java @@ -215,7 +215,7 @@ public void save() { ex.printStackTrace(); } - + LOGGER.info("Save keyboard shortcuts to: {}", SETTINGS_FILE_NEW.getAbsolutePath()); try (Writer writer = new FileWriter(SETTINGS_FILE_NEW)) { var config = new Configuration(properties); config.save(writer, "KeY's Colors"); diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java index 7b536fa28a3..67bdcb0ec8b 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java @@ -151,7 +151,7 @@ public boolean remove(SettingsProvider o) { return settingsProviders.remove(o); } - public Action getActionShowSettings(MainWindow window) { + public static Action getActionShowSettings(MainWindow window) { class ShowSettingsAction extends KeyAction { private static final long serialVersionUID = 153753479823919818L; @@ -163,7 +163,7 @@ public ShowSettingsAction() { @Override public void actionPerformed(ActionEvent e) { - showSettingsDialog(window); + SettingsManager.getInstance().showSettingsDialog(window); } } return new ShowSettingsAction(); From 0d9d3706df82de074402db855a794ca262909f92 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Wed, 5 Apr 2023 19:03:48 +0200 Subject: [PATCH 05/24] add support for KeY files --- .../java/de/uka/ilkd/key/nparser/KeyAst.java | 13 +++++++++---- ...ntermediatePresentationProofFileParser.java | 4 ++-- .../uka/ilkd/key/settings/ProofSettings.java | 18 ++++++++++++------ .../ilkd/key/proof/runallproofs/ProveTest.java | 4 ++-- .../runallproofs/proofcollection/TestFile.java | 4 ++-- 5 files changed, 27 insertions(+), 16 deletions(-) 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 075a1aa3bb6..4007f59bf2d 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 @@ -54,10 +54,15 @@ public static class File extends KeyAst { public @Nullable ProofSettings findProofSettings() { ProofSettings settings = new ProofSettings(ProofSettings.DEFAULT_SETTINGS); - if (ctx.preferences() != null) { - String text = - StringUtil.trim(ctx.preferences().s.getText(), '"').replace("\\\\:", ":"); - settings.loadSettingsFromString(text); + + if (ctx.preferences() != null && ctx.preferences().s != null) { + String text = StringUtil.trim(ctx.preferences().s.getText(), '"') + .replace("\\\\:", ":"); + settings.loadSettingsFromPropertyString(text); + } else if (ctx.preferences() != null && ctx.preferences().c != null) { + var cb = new ConfigurationBuilder(); + var c = (Configuration) ctx.preferences().c.accept(cb); + settings.readSettings(c); } return settings; } diff --git a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java index 072b8cafe83..37ab6e54b8c 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java +++ b/key.core/src/main/java/de/uka/ilkd/key/proof/io/IntermediatePresentationProofFileParser.java @@ -376,8 +376,8 @@ private BuiltInAppIntermediate constructBuiltInApp() { * @param preferences The preferences to load. */ private void loadPreferences(String preferences) { - final ProofSettings proofSettings = ProofSettings.DEFAULT_SETTINGS; - proofSettings.loadSettingsFromString(preferences); + final ProofSettings proofSettings = new ProofSettings(ProofSettings.DEFAULT_SETTINGS); + proofSettings.loadSettingsFromPropertyString(preferences); } /** diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java index a2f7f1daed3..6ee17e8ff24 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofSettings.java @@ -101,6 +101,9 @@ public void addSettings(Settings settings) { if (lastLoadedProperties != null) { settings.readSettings(lastLoadedProperties); } + if (lastLoadedConfiguration != null) { + settings.readSettings(lastLoadedConfiguration); + } } /** @@ -154,11 +157,7 @@ public String settingsToString() { public void loadSettingsFromJSONStream(Reader in) throws IOException { var config = Configuration.load(CharStreams.fromReader(in)); - lastLoadedProperties = null; - lastLoadedConfiguration = config; - for (Settings s : settings) { - s.readSettings(config); - } + readSettings(config); } public void loadDefaultJSONSettings() { @@ -221,7 +220,7 @@ public void loadSettings() { /** * Used to load Settings from a .key file */ - public void loadSettingsFromString(String s) { + public void loadSettingsFromPropertyString(String s) { if (s == null) { return; } @@ -289,4 +288,11 @@ public void update(Properties props) { public TermLabelSettings getTermLabelSettings() { return termLabelSettings; } + + public void readSettings(Configuration c) { + lastLoadedProperties = null; + lastLoadedConfiguration = c; + for (Settings setting : settings) + setting.readSettings(c); + } } 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 fde3ace0a60..cf53cb41f30 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 @@ -69,10 +69,10 @@ protected void assertUnLoadability(String file) throws Exception { private void runKey(String file, TestProperty testProperty) throws Exception { // Initialize KeY settings. - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(globalSettings); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(globalSettings); if (localSettings != null && !"".equals(localSettings)) { // local settings must be complete to have desired effect - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(localSettings); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(localSettings); } File keyFile = new File(file); 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 dae9d8b1f89..0fe41d2c3e4 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 @@ -140,9 +140,9 @@ public TestResult runKey() throws Exception { // Initialize KeY settings. String gks = settings.getGlobalKeYSettings(); - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(gks); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(gks); String lks = settings.getLocalKeYSettings(); - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(lks); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(lks); // Name resolution for the available KeY file. File keyFile = getKeYFile(); From dd98cca855e0f137efdb539957b525e96ebad04a Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Fri, 7 Apr 2023 16:34:10 +0200 Subject: [PATCH 06/24] every internal configuration number is long or double - fix merge error --- .../key/nparser/ConfigurationBuilder.java | 21 +++++++------------ .../gui/smt/settings/TranslationOptions.java | 1 + 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index 6291179691d..0e905e444ef 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -1,30 +1,25 @@ package de.uka.ilkd.key.nparser; +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.util.LinkedHashMap; + import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import de.uka.ilkd.key.settings.Configuration; -import de.uka.ilkd.key.util.LinkedHashMap; - /** + * Translates the configuration grammar (something like JSON) into a {@link Configuration} object. + * * @author Alexander Weigl * @version 1 (03.04.23) * @see KeyAst.ConfigurationFile#asConfiguration() */ class ConfigurationBuilder extends KeYParserBaseVisitor { - private Configuration root; - - public Configuration getConfiguration() { - return root; - } - @Override public List visitCfile(KeYParser.CfileContext ctx) { return ctx.cvalue().stream().map(it -> it.accept(this)).collect(Collectors.toList()); } - @Override public String visitCsymbol(KeYParser.CsymbolContext ctx) { return ctx.IDENT().getText(); @@ -40,17 +35,17 @@ public String visitCstring(KeYParser.CstringContext ctx) { @Override public Object visitCintb(KeYParser.CintbContext ctx) { - return Integer.parseInt(ctx.getText(), 2); + return Long.parseLong(ctx.getText(), 2); } @Override public Object visitCinth(KeYParser.CinthContext ctx) { - return Integer.parseInt(ctx.getText(), 16); + return Long.parseLong(ctx.getText(), 16); } @Override public Object visitCintd(KeYParser.CintdContext ctx) { - return Integer.parseInt(ctx.getText(), 10); + return Long.parseLong(ctx.getText(), 10); } @Override diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java index 5cdd0e85d1a..e5a40096ec9 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/smt/settings/TranslationOptions.java @@ -128,6 +128,7 @@ protected JSpinner createMaxField() { if (settings != null) { settings.setMaxInteger(e.longValue()); } + long result = 0; try { result = (long) maxField.getValue(); maxField.setForeground(Color.BLACK); From 1e3b8b2ac78d75d2f1b5d6e915adb51c84ba226a Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 17 Apr 2023 14:58:40 +0200 Subject: [PATCH 07/24] fix compilation error, spotless --- .../java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java | 6 +++--- .../main/java/de/uka/ilkd/key/settings/ChoiceSettings.java | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index 0e905e444ef..e21060c4dd8 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -1,12 +1,12 @@ package de.uka.ilkd.key.nparser; -import de.uka.ilkd.key.settings.Configuration; -import de.uka.ilkd.key.util.LinkedHashMap; - import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.util.LinkedHashMap; + /** * Translates the configuration grammar (something like JSON) into a {@link Configuration} object. * diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index 929ce647bac..151fcb0354e 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -1,6 +1,7 @@ package de.uka.ilkd.key.settings; import java.util.*; +import java.util.stream.Collectors; import javax.annotation.Nonnull; import de.uka.ilkd.key.logic.Choice; From 20bf9646149b573e1adca8764d9153e65409c3f9 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Tue, 30 May 2023 17:27:11 +0200 Subject: [PATCH 08/24] Update key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java Co-authored-by: Daniel Drodt <132357467+Drodt@users.noreply.github.com> --- key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java index 2e5fe988cc3..3614bb05c90 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java @@ -15,7 +15,7 @@ public interface Settings { * gets a Properties object and has to perform the necessary steps in order to change this * object in a way that it represents the stored settings * - * @deprecated Deprecated in favour of {@link #readSettings(Properties)} + * @deprecated Deprecated in favour of {@link #readSettings(Configuration)} */ @Deprecated void readSettings(Properties props); From 6956549a3d62319825437698933b08f6b5bd0e33 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Tue, 30 May 2023 17:27:19 +0200 Subject: [PATCH 09/24] Update key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java Co-authored-by: Daniel Drodt <132357467+Drodt@users.noreply.github.com> --- key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2c5a27be873..0d4070d5611 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 @@ -137,7 +137,7 @@ public static class ConfigurationFile extends KeyAst { public Configuration asConfiguration() { final var cfg = new ConfigurationBuilder(); - var res = cfg.visitCfile(ctx); + List res = cfg.visitCfile(ctx); if (res.size() > 0) return (Configuration) res.get(0); else From fa2f749cfc49c9210dd6d07e41fac4c043c5049a Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sun, 27 Aug 2023 04:56:05 +0200 Subject: [PATCH 10/24] fix merge errors --- key.core/src/main/java/de/uka/ilkd/key/nparser/KeyAst.java | 3 ++- .../java/de/uka/ilkd/key/settings/ProofCachingSettings.java | 4 ++++ key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) 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 fbf709628d4..352b2d224f8 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,6 +4,7 @@ package de.uka.ilkd.key.nparser; import java.net.URL; +import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -141,7 +142,7 @@ public static class ConfigurationFile extends KeyAst { public Configuration asConfiguration() { final var cfg = new ConfigurationBuilder(); List res = cfg.visitCfile(ctx); - if (res.size() > 0) + if (!res.isEmpty()) return (Configuration) res.get(0); else throw new RuntimeException(); diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java index 4a63ae34872..195a66652a5 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java @@ -33,6 +33,10 @@ public class ProofCachingSettings extends AbstractPropertiesSettings { private final AbstractPropertiesSettings.PropertyEntry dispose = createStringProperty(DISPOSE_KEY, ""); + public ProofCachingSettings() { + super("ProofCaching"); + } + public boolean getEnabled() { return enabled.get(); } diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java index 2ff7676a41b..ff500afa208 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java @@ -987,7 +987,7 @@ private JMenu createOptionsMenu() { JMenu options = new JMenu("Options"); options.setMnemonic(KeyEvent.VK_O); - options.add(SettingsManager.getActionShowSettings(this)); + options.add(SettingsManager.getInstance().getActionShowSettings(this)); options.add(new TacletOptionsAction(this)); options.add(new SMTOptionsAction(this)); // options.add(setupSpeclangMenu()); // legacy since only JML supported From bf45e0a0cdc753744855b372c9a82e6cf8d65b84 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 2 Oct 2023 15:17:03 +0200 Subject: [PATCH 11/24] fix compilation --- gradle/wrapper/gradle-wrapper.jar | Bin 61608 -> 63721 bytes gradle/wrapper/gradle-wrapper.properties | 4 +++- gradlew | 15 ++++++++++----- .../proofcollection/TestFile.java | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7710deaf9f98673a68957ea02138b60d0a..7f93135c49b765f8051ef9d0a6055ff8e46073d8 100644 GIT binary patch delta 38440 zcmZ6SQ*<3%6s?oSw$a$O+t{{kpWwtNwr$(CZL_f&H8y*DImUnA_rrded+oL6w`Tc1 z#Mv!G{V@^ba0IDo(ixEwh?a02n}!DKIvnc^%1aoMq1+#kAhJLP_oX|jgEPsr;V`0k zL+b-2$5Bo(3c}Buz&-hcO_SO<6900dXYt$Ter6+Mad;kQkW8)Rc`!+|ia-jh^V%qoFb5JQ`

cw$=gQbRBDL9uPo|6z1d&0P$^g)iXXq+aG z!TDoXPDJupv0Ph%%-$NJB$S*LH3Pj-EMdD`^o@l9JuD9pr?_DZoCP&%ipHzPybh{p zrtwXlO?7IzUEJYjV*z1IMJAc^TVcT#aJCR5sh_J*AgM{aL(JnfKKDlvti|)rcg$yR> zFZY!7AP{l1!V<|AO7dcVC$a;d#(osjC65jwf6;m;>++|PEYd&my^0!s~Q>DmRKZN~jp{~ON52%b=q z9ZhEnQes`_LM8(XXSsI$^djEl)Gsh4SqMl>FfdqHFfcG-unjH*zN8pZVbEU%3}Mu< zK5xbz0Aq7G$yY7xH_bgTEb-`wy|{Qa4&f}RLJR9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v>z}1;+X=_YzD{6ui2&o7R>nb zE`=?Lf`YRVd>o&4@an8Tz%ibMN{?5d(qmJe-%DxypguUNt_;c?kOj@=gn^$HpA`_; z4uPoO98YQdfFZbT0SSV0ssNWCBNsG$hy!iSDF9q8e|v-rQn%qiiwpaK-yS|tf|m>Owuc}k@bscCjL#DsT~q>VpitBo3f*8v0iel} zKTIeHG!8Zab-xOOPbPPP-2PK^N4$1!c_x+>nA?0Nl0XH2?Bl= z)c;pc&jlbUp!wPnfUA(13s}4ljR1g;)}Sld#@T_bH6vKvQ%<<=W6%;~dhvbr~458(dnq1h~>1Tz%$WgAoHdVB9~#0N0ls7j&!-R2b5LJ7M^s=MOSF Pg;r%T9-eUK&({9{Yi$yT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fae08049a6f..ac72c34e8ac 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d421cc..0adc8e1a532 100755 --- a/gradlew +++ b/gradlew @@ -83,10 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +131,13 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in 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 8a242412bb1..7ac1a9ce863 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 @@ -142,9 +142,9 @@ public TestResult runKey() throws Exception { // Initialize KeY settings. String gks = settings.getGlobalKeYSettings(); - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(gks); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(gks); String lks = settings.getLocalKeYSettings(); - ProofSettings.DEFAULT_SETTINGS.loadSettingsFromString(lks); + ProofSettings.DEFAULT_SETTINGS.loadSettingsFromPropertyString(lks); // Name resolution for the available KeY file. File keyFile = getKeYFile(); From f272c5e24635a47ee31fa825237dae97391bb92d Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Fri, 13 Oct 2023 09:35:39 +0000 Subject: [PATCH 12/24] Apply spotless --- .../java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java | 3 +++ .../main/java/de/uka/ilkd/key/settings/ChoiceSettings.java | 2 +- .../src/main/java/de/uka/ilkd/key/settings/Configuration.java | 3 +++ .../de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java | 4 ++-- .../java/de/uka/ilkd/key/gui/settings/SettingsManager.java | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index e21060c4dd8..3493d985550 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -1,3 +1,6 @@ +/* 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.nparser; import java.util.ArrayList; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index 96f0a0d0ae9..234ebddfb63 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -4,7 +4,6 @@ package de.uka.ilkd.key.settings; import java.util.*; -import java.util.stream.Collectors; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedHashSet; @@ -13,6 +12,7 @@ import java.util.Properties; import java.util.Set; import java.util.StringTokenizer; +import java.util.stream.Collectors; import javax.annotation.Nonnull; import de.uka.ilkd.key.logic.Choice; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index 0d25f43b088..e020b05ab01 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -1,3 +1,6 @@ +/* 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.settings; import java.io.File; diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java index 01e9f0517d5..5a9aaf34702 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java @@ -64,8 +64,8 @@ public class KeyStrokeSettings extends AbstractPropertiesSettings { /** * default {@link KeyStroke}s */ - private static Map DEFAULT_KEYSTROKES = new TreeMap<>(); - + private static Map DEFAULT_KEYSTROKES = new TreeMap<>(); + // define the default mappings static { // use CTRL+SHIFT+letter for macros diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java index e814a807abf..4c62528a89d 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java @@ -155,7 +155,7 @@ public boolean remove(SettingsProvider o) { public class ShowSettingsAction extends MainWindowAction { private static final long serialVersionUID = 153753479823919818L; - + public ShowSettingsAction(MainWindow mainWindow) { super(mainWindow); setName("Show Settings"); From 5bf77a9f9d8e5601ade7c31c0f416a7b3f60fadd Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Fri, 13 Oct 2023 10:11:54 +0000 Subject: [PATCH 13/24] pin down the problem with one file. Reloadability is destroyed. OSS not working. --- .../proof/runallproofs/ProofCollections.java | 859 +----------------- 1 file changed, 2 insertions(+), 857 deletions(-) diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java index 9a7e0b81e81..dc9682eafe0 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java @@ -101,870 +101,15 @@ public static ProofCollection automaticJavaDL() throws IOException { var c = new ProofCollection(settings); - // Examples used in the new book - var newBook = c.group("newBook"); - newBook.provable("newBook/09.list_modelfield/ArrayList.add.key"); - newBook.provable("newBook/09.list_modelfield/ArrayList.remFirst.key"); - newBook.provable("newBook/09.list_modelfield/ArrayList.empty.key"); - newBook.provable("newBook/09.list_modelfield/ArrayList.size.key"); - newBook.provable("newBook/09.list_modelfield/ArrayList.get.key"); - - var oldBook = c.group("oldBook"); - oldBook.provable("standard_key/BookExamples/02FirstOrderLogic/Ex2.58.key"); - oldBook.provable("standard_key/BookExamples/03DynamicLogic/Sect3.3.1.key");; - - - // Comprehension Tests - var comprehensions = c.group("comprehensions"); - comprehensions.provable("heap/comprehensions/general_sum.key"); - comprehensions.provable("heap/comprehensions/sum0.key"); - comprehensions.provable("heap/comprehensions/sum1.key"); - comprehensions.provable("heap/comprehensions/sum2.key"); - comprehensions.provable("heap/comprehensions/sum3.key"); - comprehensions.provable("heap/comprehensions/segsum.key"); - comprehensions.provable("heap/comprehensions/bsum_negative.key"); - comprehensions.provable("heap/comprehensions/bsum_neg2.key"); - comprehensions.provable("heap/comprehensions/bsumSplit.key"); - comprehensions.provable("heap/comprehensions/bprodSplit.key"); - comprehensions.notprovable("heap/comprehensions/bsumSplitInvalid.key"); - - - // Performance tests - var performance = c.group("performance"); - performance.provable( - "performance-test/Disjoint(Disjoint__disjoint_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/Disjoint(Disjoint__disjoint2_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/AccessChain1(AccessChain1__foo_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/AccessChain4(AccessChain4__foo_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/Disjoint(Disjoint__xZero_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/Dynamic(Dynamic__foo_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/DynamicGhost(DynamicGhost__dynamicGhost_08()).JML_normal_behavior_operation_contract.0.key"); - performance.provable( - "performance-test/GhostFrame(GhostFrame__foo_08()).JML_operation_contract.0.key"); - performance.provable( - "performance-test/Modelfield(Modelfield__foo_08()).JML_operation_contract.0.key"); - - // Test performance of PO construction - var performancePOConstruction = c.group("performancePOConstruction"); - performancePOConstruction.provable( - "performance-test/Test(Test__a0(int)).JML_normal_behavior_operation_contract.0.key"); - performancePOConstruction.provable( - "performance-test/Test(Test__a1(int)).JML_normal_behavior_operation_contract.0.key"); - performancePOConstruction.provable( - "performance-test/Test(Test__f1(int)).JML_normal_behavior_operation_contract.0.key"); - - - // Tests for rule application restrictions - var g = c.group("applicationRestrictions"); - g.provable("heap/polarity_tests/wellformed1.key"); - g.notprovable("heap/polarity_tests/wellformed2.key"); - g.provable("heap/polarity_tests/wellformed3.key"); - g.notprovable("heap/polarity_tests/wellformed4.key"); - g.provable("heap/polarity_tests/wellformed5.key"); - g.notprovable("heap/polarity_tests/wellformed6.key"); - g.provable("heap/polarity_tests/wellformed7.key"); - g.notprovable("heap/polarity_tests/wellformed8.key"); - g.provable("heap/polarity_tests/wellformed9.key"); - g.notprovable("heap/polarity_tests/wellformed10.key"); - g.notprovable("heap/polarity_tests/wellformed11.key"); - - - // Tests for block & loop contracts: - g = c.group("blockContracts"); - g.provable("heap/block_contracts/Simple__add.key"); - g.provable("heap/block_contracts/Simple__addAbsoluteValues.key"); - g.provable("heap/block_contracts/Simple__addWithJump.key"); - g.provable("heap/block_contracts/Simple__addWithTwoBlockContracts.key"); - g.provable("heap/block_contracts/Simple__generateByteArray.key"); - g.provable("heap/block_contracts/Simple__getLength.key"); - g.provable("heap/block_contracts/Simple__square.key"); - g.provable("heap/block_contracts/Simple__unnecessaryBlockContract.key"); - g.provable("heap/block_contracts/Simple__unnecessaryLoopInvariant.key"); - // the following test has a reload problem probably caused by the one -step-simplifier - // provable: ./heap/block_contracts/GreatestCommonDivisor.key"); - g.provable("standard_key/java_dl/jml-assert/assert.key"); - g.provable("standard_key/java_dl/jml-assert/assert_assume_order.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_external.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_internal.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_loop.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_external.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_internal.key"); - g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_loop.key"); - g.provable("heap/block_loop_contracts/Free/blockContracts0.key"); - g.provable("heap/block_loop_contracts/Free/blockContracts1.key"); - g.notprovable("heap/block_loop_contracts/Finally/block_finally.key"); - g.notprovable("heap/block_loop_contracts/Finally/loop_finally.key"); - - - g = c.group("jmlAsserts"); - g.provable("standard_key/java_dl/jml-assert/assert.key"); - g.provable("heap/block_loop_contracts/Free/assertions0.key"); - g.provable("heap/block_loop_contracts/Free/assertions1.key"); - // issue 1669 - g.provable("standard_key/java_dl/jml-assert/recursion-assert.key"); - g.provable("standard_key/java_dl/jml-assert/recursion-assume.key"); - g.provable("standard_key/java_dl/jml-assert/quantor-assert.key"); - g.provable("standard_key/java_dl/jml-assert/quantor-assume.key"); - // issue 1698 - g.provable("standard_key/java_dl/jml-assert/model-methods-static-static.key"); - g.provable("standard_key/java_dl/jml-assert/model-methods-instance-static.key"); - g.provable( - "standard_key/java_dl/jml-assert/model-methods-instance-instance.key"); - g.provable("standard_key/java_dl/jml-assert/model-methods-static-instance.key"); - // \old() - g.provable("standard_key/java_dl/jml-assert/assert-old/inc-field.key"); - g.provable("standard_key/java_dl/jml-assert/assert-old/inc-parameter.key"); - g.provable("standard_key/java_dl/jml-assert/assert-old/inc-parameter-field.key"); - g.provable("standard_key/java_dl/jml-assert/assert-old/inc-ghost-field.key"); - - - // Tests for Java Card (should also include the API, pending fix to bug //1475) - g = c.group("javaCard"); - g.provable("heap/javacard/updateBalance0.key"); - g.provable("heap/javacard/updateBalance1.key"); - g.provable("heap/javacard/setArray1.key"); - g.provable("heap/javacard/setArray2.key"); - // For this only "half" of the proof is done(see bug //1475), but it makes sure that the PO - // with two subproofs is - g.provable("heap/javacard/arrayFillNonAtomic.key"); - - - // Other tests: - g.provable("heap/coincidence_count/project.key"); - g.provable("heap/verifyThis11_1_Maximum/project.key"); - g.provable("heap/fm12_01_LRS/lcp.key"); - g.provable("heap/SemanticSlicing/project.key"); - g.provable("heap/information_flow/ArrayList_contains.key"); - g.provable("heap/information_flow/ArrayList_get.key"); - g.provable("heap/information_flow/ArrayList_size.key"); - g.provable("heap/information_flow/UpdateAbstraction_ex7_3_secure.key"); - g.provable("heap/information_flow/UpdateAbstraction_ex7_4_secure.key"); - g.provable("heap/information_flow/UpdateAbstraction_ex7_5_secure.key"); - g.provable("heap/information_flow/UpdateAbstraction_ex7_6_secure.key"); - g.provable("heap/information_flow/UpdateAbstraction_ex9_secure.key"); - - g = c.group("list"); - g.provable("heap/list/ArrayList_add.key"); - g.provable("heap/list/ArrayList_ArrayList.key"); - g.provable("heap/list/ArrayList_concatenate.key"); - g.provable("heap/list/ArrayList_contains_dep.key"); - g.provable("heap/list/ArrayList_enlarge.key"); - g.provable("heap/list/ArrayList_footprint.key"); - g.provable("heap/list/ArrayList_get_dep.key"); - g.provable("heap/list/ArrayList_get_exceptional.key"); - g.provable("heap/list/ArrayList_get_normal.key"); - g.provable("heap/list/ArrayList_inv.key"); - g.provable("heap/list/ArrayList_iterator.key"); - g.provable("heap/list/ArrayList_size_dep.key"); - g.provable("heap/list/ArrayList_size.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_ArrayListIterator.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_hasNext_dep.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_hasNext.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_inv.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_list.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_next_exceptional.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_next_normal.key"); - g.provable("heap/list/ArrayList.ArrayListIterator_pos.key"); - g.provable("heap/list/Client_m.key"); - g.provable("heap/list/Client_n.key"); - g.provable("heap/list/LinkedList_get_exceptional.key"); - g.provable("heap/list/LinkedList_get_normal.key"); - g.provable("heap/list/LinkedList_LinkedList.key"); - g.provable("heap/list/LinkedList_size_dep.key"); - g.provable("heap/list/LinkedList_size.key"); - g.provable("heap/list/MySet_footprint.key"); - g.provable("heap/list/MySet_MySet.key"); - - - g = c.group("list_ghost"); - g.provable("heap/list_ghost/ArrayList_add.key"); - g.provable("heap/list_ghost/ArrayList_ArrayList.key"); - g.provable("heap/list_ghost/ArrayList_enlarge.key"); - g.provable("heap/list_ghost/ArrayList_get_dep.key"); - g.provable("heap/list_ghost/ArrayList_get_exceptional.key"); - g.provable("heap/list_ghost/ArrayList_get_normal.key"); - g.provable("heap/list_ghost/ArrayList_inv.key"); - g.provable("heap/list_ghost/ArrayList_size_dep.key"); - g.provable("heap/list_ghost/ArrayList_size.key"); - - - g = c.group("list_recursive"); - g.provable( - "heap/list_recursiveSpec/ListOperationsNonNull_getNextNN_normal_behavior.key"); - g.provable( - "heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key"); - // Note: - // This proof was automatic in earlier versions of KeY but the automatic inductions do not - // work with model methods - // g.provable("heap/list_recursiveSpec/ListOperationsNonNull_remove_normal_behavior.key"); - - - g = c.group("list_seq"); - g.provable("heap/list_seq/SimplifiedLinkedList.remove.key"); - g.provable("heap/list_seq/ArrayList.ArrayList.key"); - g.provable("heap/list_seq/ArrayList.add.key"); - g.provable("heap/list_seq/ArrayList.contains.key"); - g.provable("heap/list_seq/ArrayList.enlarge.key"); - g.provable("heap/list_seq/ArrayList.get.key"); - g.provable("heap/list_seq/ArrayList.newArray.key"); - g.provable("heap/list_seq/ArrayList.remove.0.key"); - g.provable("heap/list_seq/ArrayList.remove.1.key"); - - - g = c.group("observer"); - g.provable("heap/observer/ExampleObserver_ExampleObserver.key"); - g.provable("heap/observer/ExampleObserver_inv.key"); - g.provable("heap/observer/ExampleObserver_subject.key"); - g.provable("heap/observer/ExampleObserver_update.key"); - g.provable("heap/observer/ExampleObserver_upToDate.key"); - g.provable("heap/observer/ExampleObserver_value.key"); - g.provable("heap/observer/ExampleSubject_addObserver.key"); - g.provable("heap/observer/ExampleSubject_change.key"); - g.provable("heap/observer/ExampleSubject_ExampleSubject.key"); - g.provable("heap/observer/ExampleSubject_footprint.key"); - g.provable("heap/observer/ExampleSubject_inv.key"); - g.provable("heap/observer/ExampleSubject_notifyObservers.key"); - g.provable("heap/observer/ExampleSubject_value_dep.key"); - g.provable("heap/observer/ExampleSubject_value.key"); - - - g = c.group("removeDups"); - g.provable("heap/removeDups/arrayPart.key"); - g.provable("heap/removeDups/contains.key"); - g.provable("heap/removeDups/removeDup.key"); - - - g.provable("heap/saddleback_search/Saddleback_search.key"); - - g = c.group("quicksort"); - g.setLocalSettings("[Choice]DefaultChoices=moreSeqRules-moreSeqRules:on"); - g.setDirectory("heap/quicksort"); - g.provable("toplevel.key"); - g.provable("sort.key"); - g.provable("split.key"); - /* * These are simpler regression tests that show a certain feature works * fine. */ - g = c.group("simpleTests"); - g.provable("heap/simple/anonymise_datagroup.key"); + var g = c.group("simpleTests"); g.provable("heap/simple/array_creation.key"); - g.provable("heap/simple/arrays_with_disjoint_sorts.key"); - g.provable("heap/simple/arrays.key"); - g.provable("heap/simple/attributes.key"); - g.provable("heap/simple/constructor_contracts.key"); - g.provable("heap/simple/dependencies.key"); - g.provable("heap/simple/dependency_contracts.key"); - g.provable("heap/simple/invariant_preservation.key"); - g.provable("heap/simple/locsets.key"); - g.provable("heap/simple/loop1.key"); - g.provable("heap/simple/loop2.key"); - g.provable("heap/simple/modifies_datagroup.key"); - g.provable("heap/simple/modifies.key"); - g.provable("heap/simple/object_creation.key"); - g.provable("heap/simple/operation_contracts.key"); - g.provable("heap/simple/select_store.key"); - g.provable("heap/simple/selection_sort.key"); - g.provable("heap/simple/seq.key"); - g.provable("heap/simple/oldForParams.key"); - g.provable("heap/simple/parse_lmtd.key"); - g.provable("heap/strictly_pure/strictlyPureMethod.key"); - g.provable("heap/strictly_pure/useStrictlyPureMethod.key"); - g.provable("heap/Wellfounded/ackermann.key"); - g.provable("standard_key/unicode_test.key"); - g.provable("heap/strictlyModular/mayExpand.key"); - g.notprovable("heap/strictlyModular/modularOnly.key"); - - - g = c.group("SmansEtAl"); - g.provable("heap/SmansEtAl/ArrayList_add.key"); - g.provable("heap/SmansEtAl/ArrayList_ArrayList.key"); - g.provable("heap/SmansEtAl/ArrayList_footprint.key"); - g.provable("heap/SmansEtAl/ArrayList_get_dep.key"); - g.provable("heap/SmansEtAl/ArrayList_get.key"); - g.provable("heap/SmansEtAl/ArrayList_inv.key"); - g.provable("heap/SmansEtAl/ArrayList_size_dep.key"); - g.provable("heap/SmansEtAl/ArrayList_size.key"); - g.provable("heap/SmansEtAl/Cell_Cell.key"); - g.provable("heap/SmansEtAl/Cell_footprint.key"); - g.provable("heap/SmansEtAl/Cell_getX_dep.key"); - g.provable("heap/SmansEtAl/Cell_getX.key"); - g.provable("heap/SmansEtAl/Cell_inv.key"); - g.provable("heap/SmansEtAl/Cell_setX.key"); - g.provable("heap/SmansEtAl/CellClient_m.key"); - g.provable("heap/SmansEtAl/Iterator_footprint.key"); - g.provable("heap/SmansEtAl/Iterator_hasNext_dep.key"); - g.provable("heap/SmansEtAl/Iterator_hasNext.key"); - g.provable("heap/SmansEtAl/Iterator_inv.key"); - g.provable("heap/SmansEtAl/Iterator_Iterator.key"); - g.provable("heap/SmansEtAl/Iterator_list_dep.key"); - g.provable("heap/SmansEtAl/Iterator_list.key"); - g.provable("heap/SmansEtAl/Iterator_next.key"); - g.provable("heap/SmansEtAl/Stack_footprint.key"); - g.provable("heap/SmansEtAl/Stack_inv.key"); - g.provable("heap/SmansEtAl/Stack_push.key"); - g.provable("heap/SmansEtAl/Stack_size.key"); - g.provable("heap/SmansEtAl/Stack_Stack.key"); - g.provable("heap/SmansEtAl/Stack_switchContents.key"); - - - g = c.group("VACID0"); - g.provable("heap/vacid0_01_SparseArray/Harness_sparseArrayTestHarness1.key"); - g.provable("heap/vacid0_01_SparseArray/Harness_sparseArrayTestHarness2.key"); - g.provable("heap/vacid0_01_SparseArray/MemoryAllocator_alloc_unsigned.key"); - g.provable("heap/vacid0_01_SparseArray/MemoryAllocator_alloc.key"); - g.provable("heap/vacid0_01_SparseArray/SparseArray_get_dep.key"); - g.provable("heap/vacid0_01_SparseArray/SparseArray_get.key"); - g.provable("heap/vacid0_01_SparseArray/SparseArray_inv.key"); - g.provable("heap/vacid0_01_SparseArray/SparseArray_SparseArray.key"); - - - g = c.group("VSTTE10"); - g.provable("heap/vstte10_01_SumAndMax/SumAndMax_sumAndMax.key"); - g.provable("heap/vstte10_03_LinkedList/Node_cons.key"); - g.provable("heap/vstte10_03_LinkedList/Node_inv.key"); - g.provable("heap/vstte10_03_LinkedList/Node_search.key"); - g.provable("heap/vstte10_04_Queens/Queens_isConsistent.key"); - g.provable("heap/vstte10_04_Queens/Queens_nQueens.key"); - g.provable("heap/vstte10_05_Queue/AmortizedQueue_AmortizedQueue.key"); - g.provable("heap/vstte10_05_Queue/AmortizedQueue_front.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_concat.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_cons.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_head.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_inv.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_length.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList1.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList2.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList3.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_reverse.key"); - g.provable("heap/vstte10_05_Queue/LinkedList_tail.key"); - - - g = c.group("WeideEtAl"); - g.provable("heap/WeideEtAl_01_AddAndMultiply/AddAndMultiply_add.key"); - g.provable("heap/WeideEtAl_01_AddAndMultiply/AddAndMultiply_mul.key"); - g.provable("heap/WeideEtAl_02_BinarySearch/BinarySearch_search.key"); - - - // this file contains Unicode symbols for logic operators - g = c.group("arithmetic"); - g.provable("standard_key/arith/binomial1.key"); - g.provable("standard_key/arith/binomial2.key"); - g.provable("standard_key/arith/check_jdiv.key"); - g.provable("standard_key/arith/check_jdiv_concrete.key"); - g.provable("standard_key/arith/check_jdiv_instantiated.key"); - g.provable("standard_key/arith/check_jmod.key"); - g.provable("standard_key/arith/complexExpressions.key"); - g.provable("standard_key/arith/compound_unaryMinus.key"); - g.provable("standard_key/arith/computation.key"); - g.provable("standard_key/arith/cubicSum.key"); - g.provable("standard_key/arith/divByZero.key"); - g.provable("standard_key/arith/divisionAssoc.key"); - g.provable("standard_key/arith/divisionBy2.key"); - g.provable("standard_key/arith/euclidean/gcdHelp-post.key"); - g.provable("standard_key/arith/gemplusDecimal/add.key"); - g.provable("standard_key/arith/jdivevenodd.key"); - g.provable("standard_key/arith/median.key"); - g.provable("standard_key/arith/mod1.key"); - g.provable("standard_key/arith/mod2.key"); - g.provable("standard_key/arith/mod7.key"); - g.provable("standard_key/arith/overflow_hija.key"); - g.provable("standard_key/arith/poly_division0.key"); - g.provable("standard_key/arith/poly_division1.key"); - g.provable("standard_key/inEqSimp/division.key"); - g.provable("standard_key/inEqSimp/inequations0.key"); - g.provable("standard_key/inEqSimp/inequations1.key"); - g.provable("standard_key/inEqSimp/inequations2.key"); - g.provable("standard_key/inEqSimp/linApprox.key"); - g.provable("standard_key/inEqSimp/nonLinInEqExample0.key"); - g.provable("standard_key/inEqSimp/nonLinInEqExample2.key"); - g.provable("standard_key/inEqSimp/nonLinInEqExample3.key"); - g.provable("standard_key/inEqSimp/nonLinInEqExample4.key"); - g.provable("standard_key/inEqSimp/quadraticInEq.key"); - g.provable("standard_key/inEqSimp/quadraticInEq10.key"); - g.provable("standard_key/inEqSimp/quadraticInEq13.key"); - g.provable("standard_key/inEqSimp/quadraticInEq14.key"); - g.provable("standard_key/inEqSimp/quadraticInEq2.key"); - g.provable("standard_key/inEqSimp/quadraticInEq3.key"); - g.provable("standard_key/inEqSimp/quadraticInEq4.key"); - g.provable("standard_key/inEqSimp/quadraticInEq5.key"); - g.provable("standard_key/inEqSimp/quadraticInEq6.key"); - g.provable("standard_key/inEqSimp/quadraticInEq7.key"); - g.provable("standard_key/inEqSimp/quadraticInEq8.key"); - g.provable("standard_key/inEqSimp/simplify0.key"); - g.provable("standard_key/inEqSimp/simplify1.key"); - g.provable("standard_key/inEqSimp/simplify2.key"); - g.provable("standard_key/inEqSimp/simplify3.key"); - g.provable("standard_key/inEqSimp/simplify4.key"); - g.provable("standard_key/inEqSimp/simplify5.key"); - g.provable("standard_key/inEqSimp/subsumptionExample.key"); - g.provable("standard_key/polySimp/simplify0.key"); - g.provable("standard_key/polySimp/simplify1.key"); - g.provable("standard_key/polySimp/simplify10.key"); - g.provable("standard_key/polySimp/simplify11.key"); - g.provable("standard_key/polySimp/simplify12.key"); - g.provable("standard_key/polySimp/simplify13.key"); - g.provable("standard_key/polySimp/simplify14.key"); - g.provable("standard_key/polySimp/simplify15.key"); - g.provable("standard_key/polySimp/simplify16.key"); - g.provable("standard_key/polySimp/simplify17.key"); - g.provable("standard_key/polySimp/simplify18.key"); - g.provable("standard_key/polySimp/simplify19.key"); - g.provable("standard_key/polySimp/simplify2.key"); - g.provable("standard_key/polySimp/simplify20.key"); - g.provable("standard_key/polySimp/simplify21.key"); - g.provable("standard_key/polySimp/simplify22.key"); - g.provable("standard_key/polySimp/simplify23.key"); - g.provable("standard_key/polySimp/simplify24.key"); - g.provable("standard_key/polySimp/simplify25.key"); - g.provable("standard_key/polySimp/simplify3.key"); - g.provable("standard_key/polySimp/simplify4.key"); - g.provable("standard_key/polySimp/simplify5.key"); - g.provable("standard_key/polySimp/simplify6.key"); - g.provable("standard_key/polySimp/simplify7.key"); - g.provable("standard_key/polySimp/simplify8.key"); - g.provable("standard_key/polySimp/simplify9.key"); - - - g = c.group("arrays"); - g.provable("standard_key/arrays/arrayStoreException/array2DimPrim.key"); - g.provable("standard_key/arrays/arrayStoreException/arrayStoreKnownDynType.key"); - g.provable("standard_key/arrays/arrayStoreException/reverseArray.key"); - g.provable("standard_key/arrays/arrayStoreException/throwArrayStoreException.key"); - g.provable("standard_key/arrays/creation/arrayCreation1.key"); - g.notprovable("standard_key/arrays/arrayStoreException/array2Dim.key"); - g.notprovable("standard_key/arrays/arrayStoreException/array2DimClose.key"); - g.notprovable("standard_key/arrays/arrayStoreException/throwASEForPrim.key"); - - - g = c.group("javadl"); - g.provable("standard_key/instanceCreation/instanceCreation1.key"); - g.provable("standard_key/instanceCreation/instanceCreation2.key"); - g.provable( - "standard_key/instanceCreation/interfacesAndAbstractClassesHaveNoInstances.key"); - g.provable("standard_key/instanceCreation/successiveCreatedObjectsAreDistinct.key"); - g.provable("standard_key/instanceCreation/testOverloadingConstructors.key"); - g.provable("standard_key/java_dl/SimpleAttributes.key"); - g.provable("standard_key/java_dl/arrayMax.key"); - g.provable("standard_key/java_dl/arrayUpdateSimp.key"); - g.provable("standard_key/java_dl/attributes.key"); - g.provable("standard_key/java_dl/break.key"); - g.provable("standard_key/java_dl/char.key"); - g.provable("standard_key/java_dl/compileTimeConstants.key"); - g.provable("standard_key/java_dl/constructorException/test.key"); - g.notprovable("standard_key/java_dl/constructorException/regressionTestBug1333.key"); - g.provable("standard_key/java_dl/continue1.key"); - g.provable("standard_key/java_dl/continue2.key"); - g.provable("standard_key/java_dl/complexAssignment.key"); - g.provable("standard_key/java_dl/danglingElseSolution1.key"); - g.provable("standard_key/java_dl/danglingElseSolution2.key"); - g.provable("standard_key/java_dl/deepNonNull/deepNonNull0.key"); - g.provable("standard_key/java_dl/deepNonNull/deepNonNull1.key"); - g.notprovable("standard_key/java_dl/deepNonNull/deepNonNull2.key"); - g.provable("standard_key/java_dl/deepNonNull/deepNonNull3.key"); - g.provable("standard_key/java_dl/exceptions.key"); - g.provable("standard_key/java_dl/exceptions1.key"); - g.provable("standard_key/java_dl/exceptions2.key"); - g.provable("standard_key/java_dl/exceptions3.key"); - g.provable("standard_key/java_dl/exchange.key"); - g.provable("standard_key/java_dl/if.key"); - g.provable("standard_key/java_dl/incrementcounter.key"); - g.notprovable("standard_key/java_dl/danglingElse.key"); - // commented out -in the current handling of this references(from branch mostThisRef) - // inner classes do not work.According to Richard, there is a bug in handling inner classes - // that needs a non -trivial fix. - // provable: ./standard_key/java_dl/innerClasses/inner.key"); - g.provable("standard_key/java_dl/iteratedAssignment.key"); - g.notprovable("standard_key/java_dl/assert/assert1.key"); - g.provable("standard_key/java_dl/assert/assert2.key"); - g.notprovable("standard_key/java_dl/assert/assert3.key"); - g.provable("standard_key/java_dl/java5/vararg.key"); - g.provable("standard_key/java_dl/java5/for_Array.key"); - g.provable("standard_key/java_dl/java5/for_Iterable.key"); - g.provable("standard_key/java_dl/java5/for_ReferenceArray.key"); - g.provable("standard_key/java_dl/jml-bigint/cast.key"); - g.provable("standard_key/java_dl/jml-free/loopInvFree.key"); - g.provable("standard_key/java_dl/jml-free/ensuresFree.key"); - // proof gets very long - // requires further investigations - g.provable("standard_key/java_dl/jml-information-flow.key"); - g.notprovable("standard_key/java_dl/jml-min/min-unprovable1.key"); - g.notprovable("standard_key/java_dl/jml-min/min-unprovable2.key"); - g.provable("standard_key/java_dl/methodCall.key"); - g.provable("standard_key/java_dl/methodCall1.key"); - g.provable("standard_key/java_dl/methodCall1box.key"); - // Commented out as this can not be proved modularly sound (See !183 which is related) - // g.provable("standard_key/java_dl/methodCall2.key"); - g.provable("standard_key/java_dl/methodCall3.key"); - g.provable("standard_key/java_dl/polishFlagSort.key"); - g.provable("standard_key/java_dl/postConditionTaclets1.key"); - g.provable("standard_key/java_dl/postConditionTaclets2.key"); - g.provable("standard_key/java_dl/quantifiedQuery.key"); - g.provable("standard_key/java_dl/recursion/triangular.key"); - g.provable("standard_key/java_dl/reverseArray.key"); - g.provable("standard_key/java_dl/reverseArray2.key"); - g.provable("standard_key/java_dl/simpleAssignment.key"); - g.provable("standard_key/java_dl/simpleAssignment2.key"); - g.provable("standard_key/java_dl/splittingWithQueries.key"); - g.provable("standard_key/java_dl/strassen/strassen.key"); - g.provable("standard_key/java_dl/symmArray.key"); - g.provable("standard_key/java_dl/testcontext.key"); - g.provable("standard_key/staticInitialisation/cascadeStaticInitialisation.key"); - g.provable( - "standard_key/staticInitialisation/erroneousClassImpliesErroneousSubclass.key"); - g.provable( - "standard_key/staticInitialisation/initializedSubclassImpliesInitializedSuperclass.key"); - g.provable("standard_key/staticInitialisation/localDeclared.key"); - g.provable("standard_key/staticInitialisation/localDeclaredMethod.key"); - g.provable("standard_key/staticInitialisation/objectOfErroneousClass.key"); - g.provable("standard_key/staticInitialisation/staticInitialisersAreNonSimple.key"); - g.provable("standard_key/types/disjoint.key"); - g.provable("../../key.core/src/test/resources/testcase/classpath/classpath.key"); - g.notprovable("heap/inconsistent_represents/MyClass_m.key"); - g.notprovable("heap/inconsistent_represents/MyClass_n.key"); - - - g = c.group("FOL"); - g.provable("standard_key/pred_log/count.key"); - g.provable("standard_key/pred_log/count2.key"); - g.provable("standard_key/pred_log/count3.key"); - g.provable("standard_key/pred_log/equalities.key"); - g.provable("standard_key/pred_log/equalities2.key"); - g.provable("standard_key/pred_log/equalities3.key"); - // cannot be proven automatically (see bug //1248) - // provable: ./standard_key/pred_log/exist1.key"); - g.provable("standard_key/pred_log/functions.key"); - g.provable("standard_key/pred_log/mv1.key"); - g.provable("standard_key/pred_log/mv2.key"); - g.provable("standard_key/pred_log/quantifiers.key"); - g.provable("standard_key/pred_log/simpleEps.key"); - g.provable("standard_key/pred_log/steam1.key"); - g.provable("standard_key/pred_log/tptp/PUZ/PUZ001p1.key"); - g.provable("standard_key/pred_log/tptp/PUZ/PUZ001p1-eq.key"); - g.provable("standard_key/pred_log/tptp/PUZ/PUZ031p1.key"); - g.provable("standard_key/pred_log/tptp/SET/SET027p3.key"); - g.provable("standard_key/pred_log/tptp/SET/SET043p1.key"); - // cannot be proven automatically (see bug //1248) - // provable: ./standard_key/pred_log/tptp/SET/SET044p1.key"); - g.provable("standard_key/pred_log/tptp/SET/SET045p1.key"); - g.provable("standard_key/pred_log/tptp/SET/SET062p3.key"); - g.provable("standard_key/pred_log/tptp/SET/SET063p3.key"); - // cannot be proven automatically (see bug //1248) - // provable: ./standard_key/pred_log/tptp/SYN/SYN002m1 .007 .008.key"); - g.provable("standard_key/pred_log/tptp/SYN/SYN036p2.key"); - // cannot be proven automatically (timeout, possibly due to bug //1248) - // provable: ./standard_key/pred_log/tptp/SYN/SYN548p1.key"); - g.provable("standard_key/pred_log/tptp/SYN/SYN550p1.key"); - g.notprovable("standard_key/prop_log/reallySimple.key"); - g.notprovable("standard_key/pred_log/sameName1.key"); - g.provable("standard_key/pred_log/jbyteIfEx.key"); - g.provable("standard_key/prop_log/allClausesLength4.key"); - g.provable("standard_key/prop_log/allClausesLength5.key"); - g.provable("standard_key/prop_log/doubleNeg.key"); - g.provable("standard_key/prop_log/liarsville.key"); - g.provable("standard_key/prop_log/simplest.key"); - g.provable("standard_key/prop_log/contraposition.key"); - g.provable("standard_key/quantifiers/elimination0.key"); - g.provable("standard_key/quantifiers/heuristic_PUZ001p1-eq.key"); - g.provable("standard_key/quantifiers/heuristic_PUZ001p1.key"); - g.provable("standard_key/quantifiers/heuristic_PUZ031p1.key"); - g.provable("standard_key/quantifiers/heuristic_SYN036p2.key"); - g.provable("standard_key/quantifiers/injectivity.key"); - g.provable("standard_key/quantifiers/normalisation0.key"); - g.provable("standard_key/quantifiers/normalisation1.key"); - g.provable("standard_key/quantifiers/normalisation2.key"); - g.provable("standard_key/quantifiers/normalisation3.key"); - g.provable("standard_key/quantifiers/normalisation4.key"); - g.provable("standard_key/quantifiers/normalisation5.key"); - g.provable("standard_key/quantifiers/normalisation6.key"); - g.provable("standard_key/quantifiers/normalisation7.key"); - g.provable("standard_key/quantifiers/normalisation8.key"); - g.provable("standard_key/quantifiers/normalisation9.key"); - g.provable("standard_key/quantifiers/normalisation10.key"); - // removed as long as we do not have a rule safely removing identical updates - // provable: ./standard_key/quantifiers/normalisation11.key"); - g.provable("standard_key/quantifiers/normalisation12.key"); - g.provable("standard_key/quantifiers/normalisation13.key"); - g.provable("standard_key/quantifiers/triggers0.key"); - - - g = c.group("strings"); - g.provable("standard_key/strings/charAt0.key"); - g.provable("standard_key/strings/charAt1.key"); - g.provable("standard_key/strings/concat1.key"); - g.provable("standard_key/strings/concat2.key"); - g.provable("standard_key/strings/deriveLength1.key"); - g.provable("standard_key/strings/emptyStringLengthZero.key"); - g.provable("standard_key/strings/implicitBooleanStringConversion.key"); - g.provable("standard_key/strings/implicitBooleanStringConversion2.key"); - g.provable("standard_key/strings/implicitIntStringConversion.key"); - g.provable("standard_key/strings/implicitNullStringConversion.key"); - g.provable("standard_key/strings/implicitNullStringConversion2.key"); - g.provable("standard_key/strings/implicitObjectStringConversion.key"); - g.provable("standard_key/strings/literalEquality.key"); - g.provable("standard_key/strings/replace0.key"); - g.provable("standard_key/strings/replace1.key"); - g.provable("standard_key/strings/simpleAssignment.key"); - g.provable("standard_key/strings/simpleLengthComp.key"); - g.provable("standard_key/strings/stringCompileTimeConstant1.key"); - g.provable("standard_key/strings/stringCompileTimeConstant2.key"); - g.provable("standard_key/strings/stringEquality1.key"); - g.provable("standard_key/strings/stringEquality2.key"); - g.provable("standard_key/strings/substring0.key"); - g.provable("standard_key/strings/substring1.key"); - g.provable("standard_key/strings/substring2.key"); - g.provable("standard_key/strings/substring3.key"); - g.provable("standard_key/strings/substring4.key"); - g.provable("standard_key/strings/substring5.key"); - - - g = c.group("simple_info_flow"); - g.notprovable("heap/information_flow/UpdateAbstraction_ex7_1_insecure.key"); - g.notprovable("heap/information_flow/UpdateAbstraction_ex7_2_insecure.key"); - - - // Model methods tests: - // (Note:some of the problems are trivial, but they should be kept - // here as these problems provide the only test base for model methods) - g = c.group("modelMethods"); - g.provable("heap/model_methods/Cell_footprint_acc.key"); - g.provable("heap/model_methods/Cell_footprint.key"); - g.provable("heap/model_methods/Cell_get_acc.key"); - g.provable("heap/model_methods/Cell_get.key"); - g.provable("heap/model_methods/Cell_post_set.key"); - g.provable("heap/model_methods/Cell_set.key"); - g.provable("heap/model_methods/CellTest_callSet.key"); - g.provable("heap/model_methods/CellTest_test2.key"); - g.provable("heap/model_methods/CellTest_test.key"); - g.provable("heap/model_methods/Coll1_add.key"); - g.provable("heap/model_methods/Coll1_Coll1_add_pre.key"); - g.provable("heap/model_methods/Coll1_Coll_add_pre.key"); - g.provable("heap/model_methods/Coll2_add.key"); - g.provable("heap/model_methods/Coll2_Coll2_add_pre.key"); - g.provable("heap/model_methods/Coll2_Coll_add_pre.key"); - g.provable("heap/model_methods/Coll_add.key"); - g.provable("heap/model_methods/Coll_add_pre.key"); - g.provable("heap/model_methods/Indirect_callAdd.key"); - g.provable("heap/model_methods/Indirect_test.key"); - g.provable("heap/model_methods/Recell_Cell_footprint.key"); - g.provable("heap/model_methods/Recell_Cell_post_set.key"); - g.provable("heap/model_methods/Recell_footprint_acc.key"); - g.provable("heap/model_methods/Recell_get_acc.key"); - g.provable("heap/model_methods/Recell_get.key"); - g.provable("heap/model_methods/Recell_Recell_footprint.key"); - g.provable("heap/model_methods/Recell_Recell_post_set.key"); - g.provable("heap/model_methods/Recell_set.key"); - g.provable("heap/model_methods/Recell_undo.key"); - - - // Permission heap problems: - g = c.group("permissionHeap"); - g.provable("heap/permissions/permissions_method0.key"); - g.provable("heap/permissions/permissions_method1.key"); - g.provable("heap/permissions/permissions_method3.key"); - g.provable("heap/permissions/permissions_setAB.key"); - g.provable("heap/permissions/permissionProperties.key"); - - g.provable("heap/permissions/threads/AFilter_AFilter.key"); - g.provable("heap/permissions/threads/AFilter_initPost_accessible.key"); - g.provable("heap/permissions/threads/AFilter_inv_accessible1.key"); - g.provable("heap/permissions/threads/AFilter_inv_accessible2.key"); - g.provable("heap/permissions/threads/AFilter_joinTransfer_accessible.key"); - g.provable("heap/permissions/threads/AFilter_joinTransfer_contract.key"); - g.provable("heap/permissions/threads/AFilter_postJoin_accessible.key"); - g.provable("heap/permissions/threads/AFilter_preStart_accessible.key"); - g.provable("heap/permissions/threads/AFilter_startTransfer_accessible.key"); - g.provable("heap/permissions/threads/AFilter_startTransfer_contract.key"); - g.provable("heap/permissions/threads/AFilter_stateInv_accessible.key"); - g.provable("heap/permissions/threads/AFilter_staticPermissions_accessible.key"); - g.provable("heap/permissions/threads/AFilter_workingPermissions_accessible.key"); - g.provable("heap/permissions/threads/BFilter_BFilter.key"); - g.provable("heap/permissions/threads/BFilter_initPost_accessible.key"); - g.provable("heap/permissions/threads/BFilter_inv_accessible1.key"); - g.provable("heap/permissions/threads/BFilter_inv_accessible2.key"); - g.provable("heap/permissions/threads/BFilter_joinTransfer_accessible.key"); - g.provable("heap/permissions/threads/BFilter_joinTransfer_contract.key"); - g.provable("heap/permissions/threads/BFilter_postJoin_accessible.key"); - g.provable("heap/permissions/threads/BFilter_preStart_accessible.key"); - g.provable("heap/permissions/threads/BFilter_startTransfer_accessible.key"); - g.provable("heap/permissions/threads/BFilter_startTransfer_contract.key"); - g.provable("heap/permissions/threads/BFilter_stateInv_accessible.key"); - g.provable("heap/permissions/threads/BFilter_staticPermissions_accessible.key"); - g.provable("heap/permissions/threads/BFilter_workingPermissions_accessible.key"); - g.provable("heap/permissions/threads/Fib_Fib.key"); - g.provable("heap/permissions/threads/Fib_initPost_accessible.key"); - g.provable("heap/permissions/threads/Fib_inv1_accessible.key"); - g.provable("heap/permissions/threads/Fib_inv2_accessible.key"); - g.provable("heap/permissions/threads/Fib_joinTransfer_accessible.key"); - g.provable("heap/permissions/threads/Fib_joinTransfer_contract.key"); - g.provable("heap/permissions/threads/Fib_postJoin_accessible.key"); - g.provable("heap/permissions/threads/Fib_preStart_accessible.key"); - g.provable("heap/permissions/threads/Fib_startTransfer_accessible.key"); - g.provable("heap/permissions/threads/Fib_startTransfer_contract.key"); - g.provable("heap/permissions/threads/Fib_workingPermissions_accessible.key"); - g.provable("heap/permissions/threads/Plotter_initPost_accessible.key"); - g.provable("heap/permissions/threads/Plotter_inv_accessible1.key"); - g.provable("heap/permissions/threads/Plotter_inv_accessible2.key"); - g.provable("heap/permissions/threads/Plotter_joinTransfer_contract.key"); - g.provable("heap/permissions/threads/Plotter_Plotter.key"); - g.provable("heap/permissions/threads/Plotter_postJoin_accessible.key"); - g.provable("heap/permissions/threads/Plotter_preStart_accessible.key"); - g.provable("heap/permissions/threads/Plotter_stateInv_accessible.key"); - g.provable("heap/permissions/threads/Plotter_staticPermissions_accessible.key"); - g.provable("heap/permissions/threads/Plotter_workingPermissions_accessible.key"); - g.provable("heap/permissions/threads/Sampler_initPost_accessible.key"); - g.provable("heap/permissions/threads/Sampler_inv_accessible1.key"); - g.provable("heap/permissions/threads/Sampler_inv_accessible2.key"); - g.provable("heap/permissions/threads/Sampler_joinTransfer_accessible.key"); - g.provable("heap/permissions/threads/Sampler_joinTransfer_contract.key"); - g.provable("heap/permissions/threads/Sampler_postJoin_accessible.key"); - g.provable("heap/permissions/threads/Sampler_preStart_accessible.key"); - g.provable("heap/permissions/threads/Sampler_run.key"); - g.provable("heap/permissions/threads/Sampler_Sampler.key"); - g.provable("heap/permissions/threads/Sampler_startTransfer_accessible.key"); - g.provable("heap/permissions/threads/Sampler_startTransfer_contract.key"); - g.provable("heap/permissions/threads/Sampler_stateInv_accessible.key"); - g.provable("heap/permissions/threads/Sampler_staticPermissions_accessible.key"); - g.provable("heap/permissions/threads/Sampler_workingPermissions_accessible.key"); - - // Müller et al example - g.provable("heap/permissions/mulleretal/ReadWrite_doRead_contract.key"); - g.provable("heap/permissions/mulleretal/ReadWrite_doWrite_contract.key"); - g.provable("heap/permissions/mulleretal/ReadWrite_read_contract.key"); - g.provable("heap/permissions/mulleretal/ReadWrite_write_contract.key"); - g.provable("heap/permissions/mulleretal/ReadWrite_inv1_accessible.key"); - g.provable("heap/permissions/mulleretal/ReadWrite_inv2_accessible.key"); - - // The LockSpec example(permissions & model methods) - g.provable("heap/permissions/lockspec/Counter_lockConsistent_contract.key"); - g.provable("heap/permissions/lockspec/Counter_increase_contract.key"); - g.provable("heap/permissions/lockspec/Counter_fp_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_fpLock_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_fpPerm_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_inv_accessible1.key"); - g.provable("heap/permissions/lockspec/Counter_inv_accessible2.key"); - g.provable("heap/permissions/lockspec/Counter_lockRef_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_lockRef_contract1.key"); - g.provable("heap/permissions/lockspec/Counter_lockRef_contract2.key"); - g.provable("heap/permissions/lockspec/Counter_lockState_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_lockStatus_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_lockTransfer_accessible.key"); - g.provable("heap/permissions/lockspec/Counter_unlockTransfer_accessible.key"); - - // These need (a lot of)interaction at the moment: - // provable: ./heap/permissions/threads/AFilter_run.key"); - // provable: ./heap/permissions/threads/BFilter_run.key"); - // provable: ./heap/permissions/threads/Fib_run.key"); - // provable: ./heap/permissions/threads/Plotter_run.key"); - // provable: ./heap/permissions/threads/Main_main.key"); - - // Is provable, but very heavy (~400000 steps) - // g.provable("heap/permissions/threads/Plotter_startTransfer_contract.key"); - g.loadable("heap/permissions/threads/Plotter_startTransfer_contract.proof"); - - // after !513 no longer g.provable(in automode but the old proofs are still loadable: - // g.provable("heap/permissions/threads/Plotter_startTransfer_accessible.key"); - g.loadable("heap/permissions/threads/Plotter_startTransfer_accessible.proof"); - // g.provable("heap/permissions/threads/Plotter_joinTransfer_accessible.key"); - g.loadable("heap/permissions/threads/Plotter_joinTransfer_accessible.proof"); - - - // Completion scopes /Exec statement tests - g = c.group("completionScopes"); - g.provable("completionscopes/testCcatchReturnVal.key"); - g.provable("completionscopes/testMultCcatchClauses.key"); - g.provable("completionscopes/testNestedExec.key"); - g.provable("completionscopes/testCcatchBreakLabel.key"); - g.provable("completionscopes/testCcatchContinueLabel.key"); - g.provable("completionscopes/testCcatchBreakLabelWildcard.key"); - g.provable("completionscopes/testCcatchContinueLabelWildcard.key"); - g.provable("completionscopes/testCcatchBreakLabelNonmatchingNested.key"); - - - // These are the proof files which can be loaded from the examples menu. - // They must work with the current version. - g = c.group("reload_examples"); - g.provable("firstTouch/05-ReverseArray/reverseArray.key"); - - // This is a reload regression test.Since it is the only one - // it goes here with the sibling reload tests - g.loadable("standard_key/arith/saveProofTest.key.proof"); - g.loadable("heap/permutedSum/perm.proof"); - g.loadable("firstTouch/05-ReverseArray/reverseArray.proof"); - g.loadable("heap/verifyThis15_1_RelaxedPrefix/relax.proof"); - g.loadable("heap/verifyThis15_3_DLL/doUndo.proof"); - g.loadable("heap/verifyThis15_2_ParallelGcd/parallelGcd.proof"); - // Temporarily disabled, see //1720 - // loadable./heap/verifyThis17_1_PairInsertionSort/sort.proof.gz - - - // Test whether reloading works (no examples) - g = c.group("proofLoadRepair"); - - // Demonstrate that loading a manipulated proof with wrong - // assumes instantiations works(MR !516). - // Provided that there is a unique candidate to instantiate. - g.loadable("proofLoadRepair/disjConj-manipulated.proof"); - - // There are two possible candidates to instantiate the assumes sequent. - g.notloadable("proofLoadRepair/insufficient-manipulated.proof"); - - // Verify that taclet instantiations read from proof files are checked - // for correct polarity (Issue //1716). - g.notloadable( - "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity.proof"); - g.notloadable( - "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity2.proof"); - g.notloadable( - "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity3.proof"); - - - g = c.group("switch"); - - // This isn 't a good test as it depends on ordering and naming scheme - // but it should be ok as regression test - // keep as first test in this group - g.provable("standard_key/java_dl/switch/labeled_case.key"); - - g.provable("standard_key/java_dl/switch/empty_switch.key"); - - // testing that side effects of the expression matter - g.provable("standard_key/java_dl/switch/empty_switch_null.key"); - g.provable("standard_key/java_dl/switch/empty_switch_null_catch.key"); - g.provable("standard_key/java_dl/switch/empty_switch_array_out_of_bounds.key"); - g.provable("standard_key/java_dl/switch/empty_switch_array_out_of_bounds_catch.key"); - - // test that breaks and labels are handled correctly with nested switches - g.provable("standard_key/java_dl/switch/switch_in_switch.key"); - - g.provable("standard_key/java_dl/switch/while_and_switch.key"); - - // this is to test that proving large switch statements are reasonable fast - g.provable("standard_key/java_dl/switch/large_switch.key"); - - - g = c.group("redux"); - g.provable("redux/arrays/Arrays.copyOf.key"); - g.provable("redux/arrays/Arrays.copyOf.float.key"); - g.provable("redux/arrays/Arrays.copyOfRange.key"); - g.provable("redux/arrays/Arrays.copyOfRange.float.key"); - g.provable("redux/arrays/Arrays.equals.key"); - g.provable("redux/arrays/Arrays.fill.key"); - g.provable("redux/arrays/Arrays.fill.float.key"); - g.provable("redux/arrays/Arrays.fillFromTo.key"); - g.provable("redux/arrays/Arrays.fillFromTo.float.key"); - g.provable("redux/arrays/ArrayCopy.arraycopy.normal.0.key"); - g.provable("redux/arrays/ArrayCopy.arraycopy.exceptional.0.key"); - g.provable("redux/arrays/ArrayCopy.arraycopy.exceptional.1.key"); + return c; } From 2f7606fdad848b394476a239f71387efe24b2a53 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Wed, 18 Oct 2023 01:03:13 +0200 Subject: [PATCH 14/24] Fix parsing errors and bugs in the StrategyProperties.java --- .../ilkd/key/nparser/ConfigurationBuilder.java | 16 +++++++++++++++- .../de/uka/ilkd/key/settings/Configuration.java | 8 +++++--- .../uka/ilkd/key/settings/StrategySettings.java | 5 +++-- .../ilkd/key/strategy/StrategyProperties.java | 9 ++++++--- .../key/proof/runallproofs/ProofCollections.java | 2 +- .../ilkd/key/proof/runallproofs/ProveTest.java | 8 ++++---- .../java/de/uka/ilkd/key/gui/MainWindow.java | 2 +- .../ilkd/key/gui/settings/SettingsManager.java | 8 +++----- 8 files changed, 38 insertions(+), 20 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index 3493d985550..af373f43153 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.annotation.Nonnull; import de.uka.ilkd.key.settings.Configuration; import de.uka.ilkd.key.util.LinkedHashMap; @@ -23,14 +24,27 @@ public List visitCfile(KeYParser.CfileContext ctx) { return ctx.cvalue().stream().map(it -> it.accept(this)).collect(Collectors.toList()); } + @Override + public Object visitCkey(KeYParser.CkeyContext ctx) { + if (ctx.STRING_LITERAL() != null) + return sanitizeStringLiteral(ctx.STRING_LITERAL().getText()); + return ctx.IDENT().getText(); + } + @Override public String visitCsymbol(KeYParser.CsymbolContext ctx) { return ctx.IDENT().getText(); } + @Override public String visitCstring(KeYParser.CstringContext ctx) { final var text = ctx.getText(); + return sanitizeStringLiteral(text); + } + + @Nonnull + private static String sanitizeStringLiteral(String text) { return text.substring(1, text.length() - 1) .replace("\\\"", "\"") .replace("\\\\", "\\"); @@ -75,7 +89,7 @@ public Object visitCbool(KeYParser.CboolContext ctx) { public Object visitTable(KeYParser.TableContext ctx) { final var data = new LinkedHashMap(); for (KeYParser.CkvContext context : ctx.ckv()) { - var name = context.ckey().getText(); + var name = context.ckey().accept(this).toString(); var val = context.cvalue().accept(this); data.put(name, val); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index e020b05ab01..61d8906e5de 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -48,6 +48,7 @@ public boolean exists(String name, Class clazz) { return data.containsKey(name) && clazz.isAssignableFrom(data.get(name).getClass()); } + @Nullable public T get(String name, Class clazz) { if (exists(name, clazz)) return (T) data.get(name); @@ -69,11 +70,11 @@ public Object get(String name) { } public int getInt(String name) { - return get(name, Integer.class); + return (int) getLong(name); } public int getInt(String name, int defaultValue) { - return get(name, defaultValue); + return (int) getLong(name, defaultValue); } public long getLong(String name) { @@ -81,7 +82,8 @@ public long getLong(String name) { } public long getLong(String name, long defaultValue) { - return getInt(name, (int) defaultValue); + var value = get(name, Long.class); + return Objects.requireNonNullElse(value, defaultValue); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java index 66d62255fd4..b9ff2043ae3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/StrategySettings.java @@ -184,7 +184,7 @@ public void readSettings(Configuration props) { try { setMaxSteps(props.getInt(STEPS_KEY)); - } catch (NumberFormatException e) { + } catch (NumberFormatException | NullPointerException e) { LOGGER.debug("StrategySettings: failure while converting the string " + "with the allowed steps of heuristics applications to int." + "Use default value 1000 instead." @@ -193,7 +193,7 @@ public void readSettings(Configuration props) { try { setTimeout(props.getInt(TIMEOUT_KEY)); - } catch (NumberFormatException e) { + } catch (NumberFormatException | NullPointerException e) { LOGGER.debug("StrategySettings: failure while converting the string " + "with rule application timeout. " + "\nThe String that has been tried to convert was {}", props.get(TIMEOUT_KEY)); @@ -210,6 +210,7 @@ public void readSettings(Configuration props) { @Override public void writeSettings(Configuration props) { + props = props.getOrCreateSection(CATEGORY); if (getStrategy() == null) { setStrategy(JavaCardDLStrategyFactory.NAME); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java index c2f02459271..4f490fbb865 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java +++ b/key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java @@ -372,6 +372,7 @@ private static String getUniqueString(String in) { } public static StrategyProperties read(Configuration category) { + category = category.getOrCreateSection("options"); StrategyProperties sp = new StrategyProperties(); for (Map.Entry entry : DEFAULT_MAP.entrySet()) { final var def = entry.getValue(); @@ -384,10 +385,12 @@ public static StrategyProperties read(Configuration category) { } public void write(Configuration category) { + category = category.getOrCreateSection("options"); for (Map.Entry entry : entrySet()) { - final var def = entry.getValue(); - final var obj = category.get(entry.getKey().toString()); - category.set(entry.getKey().toString(), obj); + final var value = entry.getValue(); + if (value != null) { + category.set(entry.getKey().toString(), value); + } } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java index dc9682eafe0..285e22b3a87 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java @@ -109,7 +109,7 @@ public static ProofCollection automaticJavaDL() throws IOException { var g = c.group("simpleTests"); g.provable("heap/simple/array_creation.key"); - + return c; } 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 aa83903506c..b3ff064de07 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 @@ -46,12 +46,12 @@ public class ProveTest { protected final boolean verbose = Boolean.getBoolean("prooftests.verbose"); protected String baseDirectory = ""; - protected final String statisticsFile = "tmp.csv"; + protected String statisticsFile = "tmp.csv"; protected String name = "unnamed_tests"; - protected final boolean reloadEnabled = false; + protected boolean reloadEnabled = false; protected String tempDir = "/tmp"; - protected final String globalSettings = ""; - protected final String localSettings = ""; + protected String globalSettings = ""; + protected String localSettings = ""; private StatisticsFile statistics; protected void assertProvability(String file) throws Exception { diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java index 0c45b171895..f599f8740af 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/MainWindow.java @@ -995,7 +995,7 @@ private JMenu createOptionsMenu() { JMenu options = new JMenu("Options"); options.setMnemonic(KeyEvent.VK_O); - options.add(SettingsManager.getInstance().getActionShowSettings(this)); + options.add(SettingsManager.getActionShowSettings(this)); options.add(new TacletOptionsAction(this)); options.add(new SMTOptionsAction(this)); // options.add(setupSpeclangMenu()); // legacy since only JML supported diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java index 4c62528a89d..218fd141672 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/settings/SettingsManager.java @@ -153,9 +153,7 @@ public boolean remove(SettingsProvider o) { return settingsProviders.remove(o); } - public class ShowSettingsAction extends MainWindowAction { - private static final long serialVersionUID = 153753479823919818L; - + public static class ShowSettingsAction extends MainWindowAction { public ShowSettingsAction(MainWindow mainWindow) { super(mainWindow); setName("Show Settings"); @@ -164,11 +162,11 @@ public ShowSettingsAction(MainWindow mainWindow) { @Override public void actionPerformed(ActionEvent e) { - showSettingsDialog(mainWindow); + getInstance().showSettingsDialog(mainWindow); } } - public Action getActionShowSettings(MainWindow window) { + public static Action getActionShowSettings(MainWindow window) { return new ShowSettingsAction(window); } } From ca1637f11a3b69623fc18ec37cb1dfecda9bae5a Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Wed, 18 Oct 2023 01:05:06 +0200 Subject: [PATCH 15/24] restart default ProofCollections --- .../proof/runallproofs/ProofCollections.java | 859 +++++++++++++++++- 1 file changed, 857 insertions(+), 2 deletions(-) diff --git a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java index 285e22b3a87..9a7e0b81e81 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java +++ b/key.core/src/test/java/de/uka/ilkd/key/proof/runallproofs/ProofCollections.java @@ -101,14 +101,869 @@ public static ProofCollection automaticJavaDL() throws IOException { var c = new ProofCollection(settings); + // Examples used in the new book + var newBook = c.group("newBook"); + newBook.provable("newBook/09.list_modelfield/ArrayList.add.key"); + newBook.provable("newBook/09.list_modelfield/ArrayList.remFirst.key"); + newBook.provable("newBook/09.list_modelfield/ArrayList.empty.key"); + newBook.provable("newBook/09.list_modelfield/ArrayList.size.key"); + newBook.provable("newBook/09.list_modelfield/ArrayList.get.key"); + + var oldBook = c.group("oldBook"); + oldBook.provable("standard_key/BookExamples/02FirstOrderLogic/Ex2.58.key"); + oldBook.provable("standard_key/BookExamples/03DynamicLogic/Sect3.3.1.key");; + + + // Comprehension Tests + var comprehensions = c.group("comprehensions"); + comprehensions.provable("heap/comprehensions/general_sum.key"); + comprehensions.provable("heap/comprehensions/sum0.key"); + comprehensions.provable("heap/comprehensions/sum1.key"); + comprehensions.provable("heap/comprehensions/sum2.key"); + comprehensions.provable("heap/comprehensions/sum3.key"); + comprehensions.provable("heap/comprehensions/segsum.key"); + comprehensions.provable("heap/comprehensions/bsum_negative.key"); + comprehensions.provable("heap/comprehensions/bsum_neg2.key"); + comprehensions.provable("heap/comprehensions/bsumSplit.key"); + comprehensions.provable("heap/comprehensions/bprodSplit.key"); + comprehensions.notprovable("heap/comprehensions/bsumSplitInvalid.key"); + + + // Performance tests + var performance = c.group("performance"); + performance.provable( + "performance-test/Disjoint(Disjoint__disjoint_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/Disjoint(Disjoint__disjoint2_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/AccessChain1(AccessChain1__foo_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/AccessChain4(AccessChain4__foo_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/Disjoint(Disjoint__xZero_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/Dynamic(Dynamic__foo_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/DynamicGhost(DynamicGhost__dynamicGhost_08()).JML_normal_behavior_operation_contract.0.key"); + performance.provable( + "performance-test/GhostFrame(GhostFrame__foo_08()).JML_operation_contract.0.key"); + performance.provable( + "performance-test/Modelfield(Modelfield__foo_08()).JML_operation_contract.0.key"); + + // Test performance of PO construction + var performancePOConstruction = c.group("performancePOConstruction"); + performancePOConstruction.provable( + "performance-test/Test(Test__a0(int)).JML_normal_behavior_operation_contract.0.key"); + performancePOConstruction.provable( + "performance-test/Test(Test__a1(int)).JML_normal_behavior_operation_contract.0.key"); + performancePOConstruction.provable( + "performance-test/Test(Test__f1(int)).JML_normal_behavior_operation_contract.0.key"); + + + // Tests for rule application restrictions + var g = c.group("applicationRestrictions"); + g.provable("heap/polarity_tests/wellformed1.key"); + g.notprovable("heap/polarity_tests/wellformed2.key"); + g.provable("heap/polarity_tests/wellformed3.key"); + g.notprovable("heap/polarity_tests/wellformed4.key"); + g.provable("heap/polarity_tests/wellformed5.key"); + g.notprovable("heap/polarity_tests/wellformed6.key"); + g.provable("heap/polarity_tests/wellformed7.key"); + g.notprovable("heap/polarity_tests/wellformed8.key"); + g.provable("heap/polarity_tests/wellformed9.key"); + g.notprovable("heap/polarity_tests/wellformed10.key"); + g.notprovable("heap/polarity_tests/wellformed11.key"); + + + // Tests for block & loop contracts: + g = c.group("blockContracts"); + g.provable("heap/block_contracts/Simple__add.key"); + g.provable("heap/block_contracts/Simple__addAbsoluteValues.key"); + g.provable("heap/block_contracts/Simple__addWithJump.key"); + g.provable("heap/block_contracts/Simple__addWithTwoBlockContracts.key"); + g.provable("heap/block_contracts/Simple__generateByteArray.key"); + g.provable("heap/block_contracts/Simple__getLength.key"); + g.provable("heap/block_contracts/Simple__square.key"); + g.provable("heap/block_contracts/Simple__unnecessaryBlockContract.key"); + g.provable("heap/block_contracts/Simple__unnecessaryLoopInvariant.key"); + // the following test has a reload problem probably caused by the one -step-simplifier + // provable: ./heap/block_contracts/GreatestCommonDivisor.key"); + g.provable("standard_key/java_dl/jml-assert/assert.key"); + g.provable("standard_key/java_dl/jml-assert/assert_assume_order.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_external.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_internal.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onBlock_loop.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_external.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_internal.key"); + g.provable("heap/block_loop_contracts/SimpleVariants/sum_onLoop_loop.key"); + g.provable("heap/block_loop_contracts/Free/blockContracts0.key"); + g.provable("heap/block_loop_contracts/Free/blockContracts1.key"); + g.notprovable("heap/block_loop_contracts/Finally/block_finally.key"); + g.notprovable("heap/block_loop_contracts/Finally/loop_finally.key"); + + + g = c.group("jmlAsserts"); + g.provable("standard_key/java_dl/jml-assert/assert.key"); + g.provable("heap/block_loop_contracts/Free/assertions0.key"); + g.provable("heap/block_loop_contracts/Free/assertions1.key"); + // issue 1669 + g.provable("standard_key/java_dl/jml-assert/recursion-assert.key"); + g.provable("standard_key/java_dl/jml-assert/recursion-assume.key"); + g.provable("standard_key/java_dl/jml-assert/quantor-assert.key"); + g.provable("standard_key/java_dl/jml-assert/quantor-assume.key"); + // issue 1698 + g.provable("standard_key/java_dl/jml-assert/model-methods-static-static.key"); + g.provable("standard_key/java_dl/jml-assert/model-methods-instance-static.key"); + g.provable( + "standard_key/java_dl/jml-assert/model-methods-instance-instance.key"); + g.provable("standard_key/java_dl/jml-assert/model-methods-static-instance.key"); + // \old() + g.provable("standard_key/java_dl/jml-assert/assert-old/inc-field.key"); + g.provable("standard_key/java_dl/jml-assert/assert-old/inc-parameter.key"); + g.provable("standard_key/java_dl/jml-assert/assert-old/inc-parameter-field.key"); + g.provable("standard_key/java_dl/jml-assert/assert-old/inc-ghost-field.key"); + + + // Tests for Java Card (should also include the API, pending fix to bug //1475) + g = c.group("javaCard"); + g.provable("heap/javacard/updateBalance0.key"); + g.provable("heap/javacard/updateBalance1.key"); + g.provable("heap/javacard/setArray1.key"); + g.provable("heap/javacard/setArray2.key"); + // For this only "half" of the proof is done(see bug //1475), but it makes sure that the PO + // with two subproofs is + g.provable("heap/javacard/arrayFillNonAtomic.key"); + + + // Other tests: + g.provable("heap/coincidence_count/project.key"); + g.provable("heap/verifyThis11_1_Maximum/project.key"); + g.provable("heap/fm12_01_LRS/lcp.key"); + g.provable("heap/SemanticSlicing/project.key"); + g.provable("heap/information_flow/ArrayList_contains.key"); + g.provable("heap/information_flow/ArrayList_get.key"); + g.provable("heap/information_flow/ArrayList_size.key"); + g.provable("heap/information_flow/UpdateAbstraction_ex7_3_secure.key"); + g.provable("heap/information_flow/UpdateAbstraction_ex7_4_secure.key"); + g.provable("heap/information_flow/UpdateAbstraction_ex7_5_secure.key"); + g.provable("heap/information_flow/UpdateAbstraction_ex7_6_secure.key"); + g.provable("heap/information_flow/UpdateAbstraction_ex9_secure.key"); + + g = c.group("list"); + g.provable("heap/list/ArrayList_add.key"); + g.provable("heap/list/ArrayList_ArrayList.key"); + g.provable("heap/list/ArrayList_concatenate.key"); + g.provable("heap/list/ArrayList_contains_dep.key"); + g.provable("heap/list/ArrayList_enlarge.key"); + g.provable("heap/list/ArrayList_footprint.key"); + g.provable("heap/list/ArrayList_get_dep.key"); + g.provable("heap/list/ArrayList_get_exceptional.key"); + g.provable("heap/list/ArrayList_get_normal.key"); + g.provable("heap/list/ArrayList_inv.key"); + g.provable("heap/list/ArrayList_iterator.key"); + g.provable("heap/list/ArrayList_size_dep.key"); + g.provable("heap/list/ArrayList_size.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_ArrayListIterator.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_hasNext_dep.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_hasNext.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_inv.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_list.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_next_exceptional.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_next_normal.key"); + g.provable("heap/list/ArrayList.ArrayListIterator_pos.key"); + g.provable("heap/list/Client_m.key"); + g.provable("heap/list/Client_n.key"); + g.provable("heap/list/LinkedList_get_exceptional.key"); + g.provable("heap/list/LinkedList_get_normal.key"); + g.provable("heap/list/LinkedList_LinkedList.key"); + g.provable("heap/list/LinkedList_size_dep.key"); + g.provable("heap/list/LinkedList_size.key"); + g.provable("heap/list/MySet_footprint.key"); + g.provable("heap/list/MySet_MySet.key"); + + + g = c.group("list_ghost"); + g.provable("heap/list_ghost/ArrayList_add.key"); + g.provable("heap/list_ghost/ArrayList_ArrayList.key"); + g.provable("heap/list_ghost/ArrayList_enlarge.key"); + g.provable("heap/list_ghost/ArrayList_get_dep.key"); + g.provable("heap/list_ghost/ArrayList_get_exceptional.key"); + g.provable("heap/list_ghost/ArrayList_get_normal.key"); + g.provable("heap/list_ghost/ArrayList_inv.key"); + g.provable("heap/list_ghost/ArrayList_size_dep.key"); + g.provable("heap/list_ghost/ArrayList_size.key"); + + + g = c.group("list_recursive"); + g.provable( + "heap/list_recursiveSpec/ListOperationsNonNull_getNextNN_normal_behavior.key"); + g.provable( + "heap/list_recursiveSpec/ListOperationsNonNull_setValueAt_normal_behavior.key"); + // Note: + // This proof was automatic in earlier versions of KeY but the automatic inductions do not + // work with model methods + // g.provable("heap/list_recursiveSpec/ListOperationsNonNull_remove_normal_behavior.key"); + + + g = c.group("list_seq"); + g.provable("heap/list_seq/SimplifiedLinkedList.remove.key"); + g.provable("heap/list_seq/ArrayList.ArrayList.key"); + g.provable("heap/list_seq/ArrayList.add.key"); + g.provable("heap/list_seq/ArrayList.contains.key"); + g.provable("heap/list_seq/ArrayList.enlarge.key"); + g.provable("heap/list_seq/ArrayList.get.key"); + g.provable("heap/list_seq/ArrayList.newArray.key"); + g.provable("heap/list_seq/ArrayList.remove.0.key"); + g.provable("heap/list_seq/ArrayList.remove.1.key"); + + + g = c.group("observer"); + g.provable("heap/observer/ExampleObserver_ExampleObserver.key"); + g.provable("heap/observer/ExampleObserver_inv.key"); + g.provable("heap/observer/ExampleObserver_subject.key"); + g.provable("heap/observer/ExampleObserver_update.key"); + g.provable("heap/observer/ExampleObserver_upToDate.key"); + g.provable("heap/observer/ExampleObserver_value.key"); + g.provable("heap/observer/ExampleSubject_addObserver.key"); + g.provable("heap/observer/ExampleSubject_change.key"); + g.provable("heap/observer/ExampleSubject_ExampleSubject.key"); + g.provable("heap/observer/ExampleSubject_footprint.key"); + g.provable("heap/observer/ExampleSubject_inv.key"); + g.provable("heap/observer/ExampleSubject_notifyObservers.key"); + g.provable("heap/observer/ExampleSubject_value_dep.key"); + g.provable("heap/observer/ExampleSubject_value.key"); + + + g = c.group("removeDups"); + g.provable("heap/removeDups/arrayPart.key"); + g.provable("heap/removeDups/contains.key"); + g.provable("heap/removeDups/removeDup.key"); + + + g.provable("heap/saddleback_search/Saddleback_search.key"); + + g = c.group("quicksort"); + g.setLocalSettings("[Choice]DefaultChoices=moreSeqRules-moreSeqRules:on"); + g.setDirectory("heap/quicksort"); + g.provable("toplevel.key"); + g.provable("sort.key"); + g.provable("split.key"); + /* * These are simpler regression tests that show a certain feature works * fine. */ - var g = c.group("simpleTests"); + g = c.group("simpleTests"); + g.provable("heap/simple/anonymise_datagroup.key"); g.provable("heap/simple/array_creation.key"); - + g.provable("heap/simple/arrays_with_disjoint_sorts.key"); + g.provable("heap/simple/arrays.key"); + g.provable("heap/simple/attributes.key"); + g.provable("heap/simple/constructor_contracts.key"); + g.provable("heap/simple/dependencies.key"); + g.provable("heap/simple/dependency_contracts.key"); + g.provable("heap/simple/invariant_preservation.key"); + g.provable("heap/simple/locsets.key"); + g.provable("heap/simple/loop1.key"); + g.provable("heap/simple/loop2.key"); + g.provable("heap/simple/modifies_datagroup.key"); + g.provable("heap/simple/modifies.key"); + g.provable("heap/simple/object_creation.key"); + g.provable("heap/simple/operation_contracts.key"); + g.provable("heap/simple/select_store.key"); + g.provable("heap/simple/selection_sort.key"); + g.provable("heap/simple/seq.key"); + g.provable("heap/simple/oldForParams.key"); + g.provable("heap/simple/parse_lmtd.key"); + g.provable("heap/strictly_pure/strictlyPureMethod.key"); + g.provable("heap/strictly_pure/useStrictlyPureMethod.key"); + g.provable("heap/Wellfounded/ackermann.key"); + g.provable("standard_key/unicode_test.key"); + g.provable("heap/strictlyModular/mayExpand.key"); + g.notprovable("heap/strictlyModular/modularOnly.key"); + + + g = c.group("SmansEtAl"); + g.provable("heap/SmansEtAl/ArrayList_add.key"); + g.provable("heap/SmansEtAl/ArrayList_ArrayList.key"); + g.provable("heap/SmansEtAl/ArrayList_footprint.key"); + g.provable("heap/SmansEtAl/ArrayList_get_dep.key"); + g.provable("heap/SmansEtAl/ArrayList_get.key"); + g.provable("heap/SmansEtAl/ArrayList_inv.key"); + g.provable("heap/SmansEtAl/ArrayList_size_dep.key"); + g.provable("heap/SmansEtAl/ArrayList_size.key"); + g.provable("heap/SmansEtAl/Cell_Cell.key"); + g.provable("heap/SmansEtAl/Cell_footprint.key"); + g.provable("heap/SmansEtAl/Cell_getX_dep.key"); + g.provable("heap/SmansEtAl/Cell_getX.key"); + g.provable("heap/SmansEtAl/Cell_inv.key"); + g.provable("heap/SmansEtAl/Cell_setX.key"); + g.provable("heap/SmansEtAl/CellClient_m.key"); + g.provable("heap/SmansEtAl/Iterator_footprint.key"); + g.provable("heap/SmansEtAl/Iterator_hasNext_dep.key"); + g.provable("heap/SmansEtAl/Iterator_hasNext.key"); + g.provable("heap/SmansEtAl/Iterator_inv.key"); + g.provable("heap/SmansEtAl/Iterator_Iterator.key"); + g.provable("heap/SmansEtAl/Iterator_list_dep.key"); + g.provable("heap/SmansEtAl/Iterator_list.key"); + g.provable("heap/SmansEtAl/Iterator_next.key"); + g.provable("heap/SmansEtAl/Stack_footprint.key"); + g.provable("heap/SmansEtAl/Stack_inv.key"); + g.provable("heap/SmansEtAl/Stack_push.key"); + g.provable("heap/SmansEtAl/Stack_size.key"); + g.provable("heap/SmansEtAl/Stack_Stack.key"); + g.provable("heap/SmansEtAl/Stack_switchContents.key"); + + + g = c.group("VACID0"); + g.provable("heap/vacid0_01_SparseArray/Harness_sparseArrayTestHarness1.key"); + g.provable("heap/vacid0_01_SparseArray/Harness_sparseArrayTestHarness2.key"); + g.provable("heap/vacid0_01_SparseArray/MemoryAllocator_alloc_unsigned.key"); + g.provable("heap/vacid0_01_SparseArray/MemoryAllocator_alloc.key"); + g.provable("heap/vacid0_01_SparseArray/SparseArray_get_dep.key"); + g.provable("heap/vacid0_01_SparseArray/SparseArray_get.key"); + g.provable("heap/vacid0_01_SparseArray/SparseArray_inv.key"); + g.provable("heap/vacid0_01_SparseArray/SparseArray_SparseArray.key"); + + + g = c.group("VSTTE10"); + g.provable("heap/vstte10_01_SumAndMax/SumAndMax_sumAndMax.key"); + g.provable("heap/vstte10_03_LinkedList/Node_cons.key"); + g.provable("heap/vstte10_03_LinkedList/Node_inv.key"); + g.provable("heap/vstte10_03_LinkedList/Node_search.key"); + g.provable("heap/vstte10_04_Queens/Queens_isConsistent.key"); + g.provable("heap/vstte10_04_Queens/Queens_nQueens.key"); + g.provable("heap/vstte10_05_Queue/AmortizedQueue_AmortizedQueue.key"); + g.provable("heap/vstte10_05_Queue/AmortizedQueue_front.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_concat.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_cons.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_head.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_inv.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_length.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList1.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList2.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_LinkedList3.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_reverse.key"); + g.provable("heap/vstte10_05_Queue/LinkedList_tail.key"); + + + g = c.group("WeideEtAl"); + g.provable("heap/WeideEtAl_01_AddAndMultiply/AddAndMultiply_add.key"); + g.provable("heap/WeideEtAl_01_AddAndMultiply/AddAndMultiply_mul.key"); + g.provable("heap/WeideEtAl_02_BinarySearch/BinarySearch_search.key"); + + + // this file contains Unicode symbols for logic operators + g = c.group("arithmetic"); + g.provable("standard_key/arith/binomial1.key"); + g.provable("standard_key/arith/binomial2.key"); + g.provable("standard_key/arith/check_jdiv.key"); + g.provable("standard_key/arith/check_jdiv_concrete.key"); + g.provable("standard_key/arith/check_jdiv_instantiated.key"); + g.provable("standard_key/arith/check_jmod.key"); + g.provable("standard_key/arith/complexExpressions.key"); + g.provable("standard_key/arith/compound_unaryMinus.key"); + g.provable("standard_key/arith/computation.key"); + g.provable("standard_key/arith/cubicSum.key"); + g.provable("standard_key/arith/divByZero.key"); + g.provable("standard_key/arith/divisionAssoc.key"); + g.provable("standard_key/arith/divisionBy2.key"); + g.provable("standard_key/arith/euclidean/gcdHelp-post.key"); + g.provable("standard_key/arith/gemplusDecimal/add.key"); + g.provable("standard_key/arith/jdivevenodd.key"); + g.provable("standard_key/arith/median.key"); + g.provable("standard_key/arith/mod1.key"); + g.provable("standard_key/arith/mod2.key"); + g.provable("standard_key/arith/mod7.key"); + g.provable("standard_key/arith/overflow_hija.key"); + g.provable("standard_key/arith/poly_division0.key"); + g.provable("standard_key/arith/poly_division1.key"); + g.provable("standard_key/inEqSimp/division.key"); + g.provable("standard_key/inEqSimp/inequations0.key"); + g.provable("standard_key/inEqSimp/inequations1.key"); + g.provable("standard_key/inEqSimp/inequations2.key"); + g.provable("standard_key/inEqSimp/linApprox.key"); + g.provable("standard_key/inEqSimp/nonLinInEqExample0.key"); + g.provable("standard_key/inEqSimp/nonLinInEqExample2.key"); + g.provable("standard_key/inEqSimp/nonLinInEqExample3.key"); + g.provable("standard_key/inEqSimp/nonLinInEqExample4.key"); + g.provable("standard_key/inEqSimp/quadraticInEq.key"); + g.provable("standard_key/inEqSimp/quadraticInEq10.key"); + g.provable("standard_key/inEqSimp/quadraticInEq13.key"); + g.provable("standard_key/inEqSimp/quadraticInEq14.key"); + g.provable("standard_key/inEqSimp/quadraticInEq2.key"); + g.provable("standard_key/inEqSimp/quadraticInEq3.key"); + g.provable("standard_key/inEqSimp/quadraticInEq4.key"); + g.provable("standard_key/inEqSimp/quadraticInEq5.key"); + g.provable("standard_key/inEqSimp/quadraticInEq6.key"); + g.provable("standard_key/inEqSimp/quadraticInEq7.key"); + g.provable("standard_key/inEqSimp/quadraticInEq8.key"); + g.provable("standard_key/inEqSimp/simplify0.key"); + g.provable("standard_key/inEqSimp/simplify1.key"); + g.provable("standard_key/inEqSimp/simplify2.key"); + g.provable("standard_key/inEqSimp/simplify3.key"); + g.provable("standard_key/inEqSimp/simplify4.key"); + g.provable("standard_key/inEqSimp/simplify5.key"); + g.provable("standard_key/inEqSimp/subsumptionExample.key"); + g.provable("standard_key/polySimp/simplify0.key"); + g.provable("standard_key/polySimp/simplify1.key"); + g.provable("standard_key/polySimp/simplify10.key"); + g.provable("standard_key/polySimp/simplify11.key"); + g.provable("standard_key/polySimp/simplify12.key"); + g.provable("standard_key/polySimp/simplify13.key"); + g.provable("standard_key/polySimp/simplify14.key"); + g.provable("standard_key/polySimp/simplify15.key"); + g.provable("standard_key/polySimp/simplify16.key"); + g.provable("standard_key/polySimp/simplify17.key"); + g.provable("standard_key/polySimp/simplify18.key"); + g.provable("standard_key/polySimp/simplify19.key"); + g.provable("standard_key/polySimp/simplify2.key"); + g.provable("standard_key/polySimp/simplify20.key"); + g.provable("standard_key/polySimp/simplify21.key"); + g.provable("standard_key/polySimp/simplify22.key"); + g.provable("standard_key/polySimp/simplify23.key"); + g.provable("standard_key/polySimp/simplify24.key"); + g.provable("standard_key/polySimp/simplify25.key"); + g.provable("standard_key/polySimp/simplify3.key"); + g.provable("standard_key/polySimp/simplify4.key"); + g.provable("standard_key/polySimp/simplify5.key"); + g.provable("standard_key/polySimp/simplify6.key"); + g.provable("standard_key/polySimp/simplify7.key"); + g.provable("standard_key/polySimp/simplify8.key"); + g.provable("standard_key/polySimp/simplify9.key"); + + + g = c.group("arrays"); + g.provable("standard_key/arrays/arrayStoreException/array2DimPrim.key"); + g.provable("standard_key/arrays/arrayStoreException/arrayStoreKnownDynType.key"); + g.provable("standard_key/arrays/arrayStoreException/reverseArray.key"); + g.provable("standard_key/arrays/arrayStoreException/throwArrayStoreException.key"); + g.provable("standard_key/arrays/creation/arrayCreation1.key"); + g.notprovable("standard_key/arrays/arrayStoreException/array2Dim.key"); + g.notprovable("standard_key/arrays/arrayStoreException/array2DimClose.key"); + g.notprovable("standard_key/arrays/arrayStoreException/throwASEForPrim.key"); + + + g = c.group("javadl"); + g.provable("standard_key/instanceCreation/instanceCreation1.key"); + g.provable("standard_key/instanceCreation/instanceCreation2.key"); + g.provable( + "standard_key/instanceCreation/interfacesAndAbstractClassesHaveNoInstances.key"); + g.provable("standard_key/instanceCreation/successiveCreatedObjectsAreDistinct.key"); + g.provable("standard_key/instanceCreation/testOverloadingConstructors.key"); + g.provable("standard_key/java_dl/SimpleAttributes.key"); + g.provable("standard_key/java_dl/arrayMax.key"); + g.provable("standard_key/java_dl/arrayUpdateSimp.key"); + g.provable("standard_key/java_dl/attributes.key"); + g.provable("standard_key/java_dl/break.key"); + g.provable("standard_key/java_dl/char.key"); + g.provable("standard_key/java_dl/compileTimeConstants.key"); + g.provable("standard_key/java_dl/constructorException/test.key"); + g.notprovable("standard_key/java_dl/constructorException/regressionTestBug1333.key"); + g.provable("standard_key/java_dl/continue1.key"); + g.provable("standard_key/java_dl/continue2.key"); + g.provable("standard_key/java_dl/complexAssignment.key"); + g.provable("standard_key/java_dl/danglingElseSolution1.key"); + g.provable("standard_key/java_dl/danglingElseSolution2.key"); + g.provable("standard_key/java_dl/deepNonNull/deepNonNull0.key"); + g.provable("standard_key/java_dl/deepNonNull/deepNonNull1.key"); + g.notprovable("standard_key/java_dl/deepNonNull/deepNonNull2.key"); + g.provable("standard_key/java_dl/deepNonNull/deepNonNull3.key"); + g.provable("standard_key/java_dl/exceptions.key"); + g.provable("standard_key/java_dl/exceptions1.key"); + g.provable("standard_key/java_dl/exceptions2.key"); + g.provable("standard_key/java_dl/exceptions3.key"); + g.provable("standard_key/java_dl/exchange.key"); + g.provable("standard_key/java_dl/if.key"); + g.provable("standard_key/java_dl/incrementcounter.key"); + g.notprovable("standard_key/java_dl/danglingElse.key"); + // commented out -in the current handling of this references(from branch mostThisRef) + // inner classes do not work.According to Richard, there is a bug in handling inner classes + // that needs a non -trivial fix. + // provable: ./standard_key/java_dl/innerClasses/inner.key"); + g.provable("standard_key/java_dl/iteratedAssignment.key"); + g.notprovable("standard_key/java_dl/assert/assert1.key"); + g.provable("standard_key/java_dl/assert/assert2.key"); + g.notprovable("standard_key/java_dl/assert/assert3.key"); + g.provable("standard_key/java_dl/java5/vararg.key"); + g.provable("standard_key/java_dl/java5/for_Array.key"); + g.provable("standard_key/java_dl/java5/for_Iterable.key"); + g.provable("standard_key/java_dl/java5/for_ReferenceArray.key"); + g.provable("standard_key/java_dl/jml-bigint/cast.key"); + g.provable("standard_key/java_dl/jml-free/loopInvFree.key"); + g.provable("standard_key/java_dl/jml-free/ensuresFree.key"); + // proof gets very long + // requires further investigations + g.provable("standard_key/java_dl/jml-information-flow.key"); + g.notprovable("standard_key/java_dl/jml-min/min-unprovable1.key"); + g.notprovable("standard_key/java_dl/jml-min/min-unprovable2.key"); + g.provable("standard_key/java_dl/methodCall.key"); + g.provable("standard_key/java_dl/methodCall1.key"); + g.provable("standard_key/java_dl/methodCall1box.key"); + // Commented out as this can not be proved modularly sound (See !183 which is related) + // g.provable("standard_key/java_dl/methodCall2.key"); + g.provable("standard_key/java_dl/methodCall3.key"); + g.provable("standard_key/java_dl/polishFlagSort.key"); + g.provable("standard_key/java_dl/postConditionTaclets1.key"); + g.provable("standard_key/java_dl/postConditionTaclets2.key"); + g.provable("standard_key/java_dl/quantifiedQuery.key"); + g.provable("standard_key/java_dl/recursion/triangular.key"); + g.provable("standard_key/java_dl/reverseArray.key"); + g.provable("standard_key/java_dl/reverseArray2.key"); + g.provable("standard_key/java_dl/simpleAssignment.key"); + g.provable("standard_key/java_dl/simpleAssignment2.key"); + g.provable("standard_key/java_dl/splittingWithQueries.key"); + g.provable("standard_key/java_dl/strassen/strassen.key"); + g.provable("standard_key/java_dl/symmArray.key"); + g.provable("standard_key/java_dl/testcontext.key"); + g.provable("standard_key/staticInitialisation/cascadeStaticInitialisation.key"); + g.provable( + "standard_key/staticInitialisation/erroneousClassImpliesErroneousSubclass.key"); + g.provable( + "standard_key/staticInitialisation/initializedSubclassImpliesInitializedSuperclass.key"); + g.provable("standard_key/staticInitialisation/localDeclared.key"); + g.provable("standard_key/staticInitialisation/localDeclaredMethod.key"); + g.provable("standard_key/staticInitialisation/objectOfErroneousClass.key"); + g.provable("standard_key/staticInitialisation/staticInitialisersAreNonSimple.key"); + g.provable("standard_key/types/disjoint.key"); + g.provable("../../key.core/src/test/resources/testcase/classpath/classpath.key"); + g.notprovable("heap/inconsistent_represents/MyClass_m.key"); + g.notprovable("heap/inconsistent_represents/MyClass_n.key"); + + + g = c.group("FOL"); + g.provable("standard_key/pred_log/count.key"); + g.provable("standard_key/pred_log/count2.key"); + g.provable("standard_key/pred_log/count3.key"); + g.provable("standard_key/pred_log/equalities.key"); + g.provable("standard_key/pred_log/equalities2.key"); + g.provable("standard_key/pred_log/equalities3.key"); + // cannot be proven automatically (see bug //1248) + // provable: ./standard_key/pred_log/exist1.key"); + g.provable("standard_key/pred_log/functions.key"); + g.provable("standard_key/pred_log/mv1.key"); + g.provable("standard_key/pred_log/mv2.key"); + g.provable("standard_key/pred_log/quantifiers.key"); + g.provable("standard_key/pred_log/simpleEps.key"); + g.provable("standard_key/pred_log/steam1.key"); + g.provable("standard_key/pred_log/tptp/PUZ/PUZ001p1.key"); + g.provable("standard_key/pred_log/tptp/PUZ/PUZ001p1-eq.key"); + g.provable("standard_key/pred_log/tptp/PUZ/PUZ031p1.key"); + g.provable("standard_key/pred_log/tptp/SET/SET027p3.key"); + g.provable("standard_key/pred_log/tptp/SET/SET043p1.key"); + // cannot be proven automatically (see bug //1248) + // provable: ./standard_key/pred_log/tptp/SET/SET044p1.key"); + g.provable("standard_key/pred_log/tptp/SET/SET045p1.key"); + g.provable("standard_key/pred_log/tptp/SET/SET062p3.key"); + g.provable("standard_key/pred_log/tptp/SET/SET063p3.key"); + // cannot be proven automatically (see bug //1248) + // provable: ./standard_key/pred_log/tptp/SYN/SYN002m1 .007 .008.key"); + g.provable("standard_key/pred_log/tptp/SYN/SYN036p2.key"); + // cannot be proven automatically (timeout, possibly due to bug //1248) + // provable: ./standard_key/pred_log/tptp/SYN/SYN548p1.key"); + g.provable("standard_key/pred_log/tptp/SYN/SYN550p1.key"); + g.notprovable("standard_key/prop_log/reallySimple.key"); + g.notprovable("standard_key/pred_log/sameName1.key"); + g.provable("standard_key/pred_log/jbyteIfEx.key"); + g.provable("standard_key/prop_log/allClausesLength4.key"); + g.provable("standard_key/prop_log/allClausesLength5.key"); + g.provable("standard_key/prop_log/doubleNeg.key"); + g.provable("standard_key/prop_log/liarsville.key"); + g.provable("standard_key/prop_log/simplest.key"); + g.provable("standard_key/prop_log/contraposition.key"); + g.provable("standard_key/quantifiers/elimination0.key"); + g.provable("standard_key/quantifiers/heuristic_PUZ001p1-eq.key"); + g.provable("standard_key/quantifiers/heuristic_PUZ001p1.key"); + g.provable("standard_key/quantifiers/heuristic_PUZ031p1.key"); + g.provable("standard_key/quantifiers/heuristic_SYN036p2.key"); + g.provable("standard_key/quantifiers/injectivity.key"); + g.provable("standard_key/quantifiers/normalisation0.key"); + g.provable("standard_key/quantifiers/normalisation1.key"); + g.provable("standard_key/quantifiers/normalisation2.key"); + g.provable("standard_key/quantifiers/normalisation3.key"); + g.provable("standard_key/quantifiers/normalisation4.key"); + g.provable("standard_key/quantifiers/normalisation5.key"); + g.provable("standard_key/quantifiers/normalisation6.key"); + g.provable("standard_key/quantifiers/normalisation7.key"); + g.provable("standard_key/quantifiers/normalisation8.key"); + g.provable("standard_key/quantifiers/normalisation9.key"); + g.provable("standard_key/quantifiers/normalisation10.key"); + // removed as long as we do not have a rule safely removing identical updates + // provable: ./standard_key/quantifiers/normalisation11.key"); + g.provable("standard_key/quantifiers/normalisation12.key"); + g.provable("standard_key/quantifiers/normalisation13.key"); + g.provable("standard_key/quantifiers/triggers0.key"); + + + g = c.group("strings"); + g.provable("standard_key/strings/charAt0.key"); + g.provable("standard_key/strings/charAt1.key"); + g.provable("standard_key/strings/concat1.key"); + g.provable("standard_key/strings/concat2.key"); + g.provable("standard_key/strings/deriveLength1.key"); + g.provable("standard_key/strings/emptyStringLengthZero.key"); + g.provable("standard_key/strings/implicitBooleanStringConversion.key"); + g.provable("standard_key/strings/implicitBooleanStringConversion2.key"); + g.provable("standard_key/strings/implicitIntStringConversion.key"); + g.provable("standard_key/strings/implicitNullStringConversion.key"); + g.provable("standard_key/strings/implicitNullStringConversion2.key"); + g.provable("standard_key/strings/implicitObjectStringConversion.key"); + g.provable("standard_key/strings/literalEquality.key"); + g.provable("standard_key/strings/replace0.key"); + g.provable("standard_key/strings/replace1.key"); + g.provable("standard_key/strings/simpleAssignment.key"); + g.provable("standard_key/strings/simpleLengthComp.key"); + g.provable("standard_key/strings/stringCompileTimeConstant1.key"); + g.provable("standard_key/strings/stringCompileTimeConstant2.key"); + g.provable("standard_key/strings/stringEquality1.key"); + g.provable("standard_key/strings/stringEquality2.key"); + g.provable("standard_key/strings/substring0.key"); + g.provable("standard_key/strings/substring1.key"); + g.provable("standard_key/strings/substring2.key"); + g.provable("standard_key/strings/substring3.key"); + g.provable("standard_key/strings/substring4.key"); + g.provable("standard_key/strings/substring5.key"); + + + g = c.group("simple_info_flow"); + g.notprovable("heap/information_flow/UpdateAbstraction_ex7_1_insecure.key"); + g.notprovable("heap/information_flow/UpdateAbstraction_ex7_2_insecure.key"); + + + // Model methods tests: + // (Note:some of the problems are trivial, but they should be kept + // here as these problems provide the only test base for model methods) + g = c.group("modelMethods"); + g.provable("heap/model_methods/Cell_footprint_acc.key"); + g.provable("heap/model_methods/Cell_footprint.key"); + g.provable("heap/model_methods/Cell_get_acc.key"); + g.provable("heap/model_methods/Cell_get.key"); + g.provable("heap/model_methods/Cell_post_set.key"); + g.provable("heap/model_methods/Cell_set.key"); + g.provable("heap/model_methods/CellTest_callSet.key"); + g.provable("heap/model_methods/CellTest_test2.key"); + g.provable("heap/model_methods/CellTest_test.key"); + g.provable("heap/model_methods/Coll1_add.key"); + g.provable("heap/model_methods/Coll1_Coll1_add_pre.key"); + g.provable("heap/model_methods/Coll1_Coll_add_pre.key"); + g.provable("heap/model_methods/Coll2_add.key"); + g.provable("heap/model_methods/Coll2_Coll2_add_pre.key"); + g.provable("heap/model_methods/Coll2_Coll_add_pre.key"); + g.provable("heap/model_methods/Coll_add.key"); + g.provable("heap/model_methods/Coll_add_pre.key"); + g.provable("heap/model_methods/Indirect_callAdd.key"); + g.provable("heap/model_methods/Indirect_test.key"); + g.provable("heap/model_methods/Recell_Cell_footprint.key"); + g.provable("heap/model_methods/Recell_Cell_post_set.key"); + g.provable("heap/model_methods/Recell_footprint_acc.key"); + g.provable("heap/model_methods/Recell_get_acc.key"); + g.provable("heap/model_methods/Recell_get.key"); + g.provable("heap/model_methods/Recell_Recell_footprint.key"); + g.provable("heap/model_methods/Recell_Recell_post_set.key"); + g.provable("heap/model_methods/Recell_set.key"); + g.provable("heap/model_methods/Recell_undo.key"); + + + // Permission heap problems: + g = c.group("permissionHeap"); + g.provable("heap/permissions/permissions_method0.key"); + g.provable("heap/permissions/permissions_method1.key"); + g.provable("heap/permissions/permissions_method3.key"); + g.provable("heap/permissions/permissions_setAB.key"); + g.provable("heap/permissions/permissionProperties.key"); + + g.provable("heap/permissions/threads/AFilter_AFilter.key"); + g.provable("heap/permissions/threads/AFilter_initPost_accessible.key"); + g.provable("heap/permissions/threads/AFilter_inv_accessible1.key"); + g.provable("heap/permissions/threads/AFilter_inv_accessible2.key"); + g.provable("heap/permissions/threads/AFilter_joinTransfer_accessible.key"); + g.provable("heap/permissions/threads/AFilter_joinTransfer_contract.key"); + g.provable("heap/permissions/threads/AFilter_postJoin_accessible.key"); + g.provable("heap/permissions/threads/AFilter_preStart_accessible.key"); + g.provable("heap/permissions/threads/AFilter_startTransfer_accessible.key"); + g.provable("heap/permissions/threads/AFilter_startTransfer_contract.key"); + g.provable("heap/permissions/threads/AFilter_stateInv_accessible.key"); + g.provable("heap/permissions/threads/AFilter_staticPermissions_accessible.key"); + g.provable("heap/permissions/threads/AFilter_workingPermissions_accessible.key"); + g.provable("heap/permissions/threads/BFilter_BFilter.key"); + g.provable("heap/permissions/threads/BFilter_initPost_accessible.key"); + g.provable("heap/permissions/threads/BFilter_inv_accessible1.key"); + g.provable("heap/permissions/threads/BFilter_inv_accessible2.key"); + g.provable("heap/permissions/threads/BFilter_joinTransfer_accessible.key"); + g.provable("heap/permissions/threads/BFilter_joinTransfer_contract.key"); + g.provable("heap/permissions/threads/BFilter_postJoin_accessible.key"); + g.provable("heap/permissions/threads/BFilter_preStart_accessible.key"); + g.provable("heap/permissions/threads/BFilter_startTransfer_accessible.key"); + g.provable("heap/permissions/threads/BFilter_startTransfer_contract.key"); + g.provable("heap/permissions/threads/BFilter_stateInv_accessible.key"); + g.provable("heap/permissions/threads/BFilter_staticPermissions_accessible.key"); + g.provable("heap/permissions/threads/BFilter_workingPermissions_accessible.key"); + g.provable("heap/permissions/threads/Fib_Fib.key"); + g.provable("heap/permissions/threads/Fib_initPost_accessible.key"); + g.provable("heap/permissions/threads/Fib_inv1_accessible.key"); + g.provable("heap/permissions/threads/Fib_inv2_accessible.key"); + g.provable("heap/permissions/threads/Fib_joinTransfer_accessible.key"); + g.provable("heap/permissions/threads/Fib_joinTransfer_contract.key"); + g.provable("heap/permissions/threads/Fib_postJoin_accessible.key"); + g.provable("heap/permissions/threads/Fib_preStart_accessible.key"); + g.provable("heap/permissions/threads/Fib_startTransfer_accessible.key"); + g.provable("heap/permissions/threads/Fib_startTransfer_contract.key"); + g.provable("heap/permissions/threads/Fib_workingPermissions_accessible.key"); + g.provable("heap/permissions/threads/Plotter_initPost_accessible.key"); + g.provable("heap/permissions/threads/Plotter_inv_accessible1.key"); + g.provable("heap/permissions/threads/Plotter_inv_accessible2.key"); + g.provable("heap/permissions/threads/Plotter_joinTransfer_contract.key"); + g.provable("heap/permissions/threads/Plotter_Plotter.key"); + g.provable("heap/permissions/threads/Plotter_postJoin_accessible.key"); + g.provable("heap/permissions/threads/Plotter_preStart_accessible.key"); + g.provable("heap/permissions/threads/Plotter_stateInv_accessible.key"); + g.provable("heap/permissions/threads/Plotter_staticPermissions_accessible.key"); + g.provable("heap/permissions/threads/Plotter_workingPermissions_accessible.key"); + g.provable("heap/permissions/threads/Sampler_initPost_accessible.key"); + g.provable("heap/permissions/threads/Sampler_inv_accessible1.key"); + g.provable("heap/permissions/threads/Sampler_inv_accessible2.key"); + g.provable("heap/permissions/threads/Sampler_joinTransfer_accessible.key"); + g.provable("heap/permissions/threads/Sampler_joinTransfer_contract.key"); + g.provable("heap/permissions/threads/Sampler_postJoin_accessible.key"); + g.provable("heap/permissions/threads/Sampler_preStart_accessible.key"); + g.provable("heap/permissions/threads/Sampler_run.key"); + g.provable("heap/permissions/threads/Sampler_Sampler.key"); + g.provable("heap/permissions/threads/Sampler_startTransfer_accessible.key"); + g.provable("heap/permissions/threads/Sampler_startTransfer_contract.key"); + g.provable("heap/permissions/threads/Sampler_stateInv_accessible.key"); + g.provable("heap/permissions/threads/Sampler_staticPermissions_accessible.key"); + g.provable("heap/permissions/threads/Sampler_workingPermissions_accessible.key"); + + // Müller et al example + g.provable("heap/permissions/mulleretal/ReadWrite_doRead_contract.key"); + g.provable("heap/permissions/mulleretal/ReadWrite_doWrite_contract.key"); + g.provable("heap/permissions/mulleretal/ReadWrite_read_contract.key"); + g.provable("heap/permissions/mulleretal/ReadWrite_write_contract.key"); + g.provable("heap/permissions/mulleretal/ReadWrite_inv1_accessible.key"); + g.provable("heap/permissions/mulleretal/ReadWrite_inv2_accessible.key"); + + // The LockSpec example(permissions & model methods) + g.provable("heap/permissions/lockspec/Counter_lockConsistent_contract.key"); + g.provable("heap/permissions/lockspec/Counter_increase_contract.key"); + g.provable("heap/permissions/lockspec/Counter_fp_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_fpLock_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_fpPerm_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_inv_accessible1.key"); + g.provable("heap/permissions/lockspec/Counter_inv_accessible2.key"); + g.provable("heap/permissions/lockspec/Counter_lockRef_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_lockRef_contract1.key"); + g.provable("heap/permissions/lockspec/Counter_lockRef_contract2.key"); + g.provable("heap/permissions/lockspec/Counter_lockState_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_lockStatus_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_lockTransfer_accessible.key"); + g.provable("heap/permissions/lockspec/Counter_unlockTransfer_accessible.key"); + + // These need (a lot of)interaction at the moment: + // provable: ./heap/permissions/threads/AFilter_run.key"); + // provable: ./heap/permissions/threads/BFilter_run.key"); + // provable: ./heap/permissions/threads/Fib_run.key"); + // provable: ./heap/permissions/threads/Plotter_run.key"); + // provable: ./heap/permissions/threads/Main_main.key"); + + // Is provable, but very heavy (~400000 steps) + // g.provable("heap/permissions/threads/Plotter_startTransfer_contract.key"); + g.loadable("heap/permissions/threads/Plotter_startTransfer_contract.proof"); + + // after !513 no longer g.provable(in automode but the old proofs are still loadable: + // g.provable("heap/permissions/threads/Plotter_startTransfer_accessible.key"); + g.loadable("heap/permissions/threads/Plotter_startTransfer_accessible.proof"); + // g.provable("heap/permissions/threads/Plotter_joinTransfer_accessible.key"); + g.loadable("heap/permissions/threads/Plotter_joinTransfer_accessible.proof"); + + + // Completion scopes /Exec statement tests + g = c.group("completionScopes"); + g.provable("completionscopes/testCcatchReturnVal.key"); + g.provable("completionscopes/testMultCcatchClauses.key"); + g.provable("completionscopes/testNestedExec.key"); + g.provable("completionscopes/testCcatchBreakLabel.key"); + g.provable("completionscopes/testCcatchContinueLabel.key"); + g.provable("completionscopes/testCcatchBreakLabelWildcard.key"); + g.provable("completionscopes/testCcatchContinueLabelWildcard.key"); + g.provable("completionscopes/testCcatchBreakLabelNonmatchingNested.key"); + + + // These are the proof files which can be loaded from the examples menu. + // They must work with the current version. + g = c.group("reload_examples"); + g.provable("firstTouch/05-ReverseArray/reverseArray.key"); + + // This is a reload regression test.Since it is the only one + // it goes here with the sibling reload tests + g.loadable("standard_key/arith/saveProofTest.key.proof"); + g.loadable("heap/permutedSum/perm.proof"); + g.loadable("firstTouch/05-ReverseArray/reverseArray.proof"); + g.loadable("heap/verifyThis15_1_RelaxedPrefix/relax.proof"); + g.loadable("heap/verifyThis15_3_DLL/doUndo.proof"); + g.loadable("heap/verifyThis15_2_ParallelGcd/parallelGcd.proof"); + // Temporarily disabled, see //1720 + // loadable./heap/verifyThis17_1_PairInsertionSort/sort.proof.gz + + + // Test whether reloading works (no examples) + g = c.group("proofLoadRepair"); + + // Demonstrate that loading a manipulated proof with wrong + // assumes instantiations works(MR !516). + // Provided that there is a unique candidate to instantiate. + g.loadable("proofLoadRepair/disjConj-manipulated.proof"); + + // There are two possible candidates to instantiate the assumes sequent. + g.notloadable("proofLoadRepair/insufficient-manipulated.proof"); + + // Verify that taclet instantiations read from proof files are checked + // for correct polarity (Issue //1716). + g.notloadable( + "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity.proof"); + g.notloadable( + "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity2.proof"); + g.notloadable( + "../../key.core/src/test/resources/testcase/issues/1716/incorrectPolarity3.proof"); + + + g = c.group("switch"); + + // This isn 't a good test as it depends on ordering and naming scheme + // but it should be ok as regression test + // keep as first test in this group + g.provable("standard_key/java_dl/switch/labeled_case.key"); + + g.provable("standard_key/java_dl/switch/empty_switch.key"); + + // testing that side effects of the expression matter + g.provable("standard_key/java_dl/switch/empty_switch_null.key"); + g.provable("standard_key/java_dl/switch/empty_switch_null_catch.key"); + g.provable("standard_key/java_dl/switch/empty_switch_array_out_of_bounds.key"); + g.provable("standard_key/java_dl/switch/empty_switch_array_out_of_bounds_catch.key"); + + // test that breaks and labels are handled correctly with nested switches + g.provable("standard_key/java_dl/switch/switch_in_switch.key"); + + g.provable("standard_key/java_dl/switch/while_and_switch.key"); + + // this is to test that proving large switch statements are reasonable fast + g.provable("standard_key/java_dl/switch/large_switch.key"); + + + g = c.group("redux"); + g.provable("redux/arrays/Arrays.copyOf.key"); + g.provable("redux/arrays/Arrays.copyOf.float.key"); + g.provable("redux/arrays/Arrays.copyOfRange.key"); + g.provable("redux/arrays/Arrays.copyOfRange.float.key"); + g.provable("redux/arrays/Arrays.equals.key"); + g.provable("redux/arrays/Arrays.fill.key"); + g.provable("redux/arrays/Arrays.fill.float.key"); + g.provable("redux/arrays/Arrays.fillFromTo.key"); + g.provable("redux/arrays/Arrays.fillFromTo.float.key"); + g.provable("redux/arrays/ArrayCopy.arraycopy.normal.0.key"); + g.provable("redux/arrays/ArrayCopy.arraycopy.exceptional.0.key"); + g.provable("redux/arrays/ArrayCopy.arraycopy.exceptional.1.key"); return c; } From bf40f745569d3427e508184dbd1df7562e355218 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sun, 22 Oct 2023 16:41:33 +0000 Subject: [PATCH 16/24] adding javadocs --- key.core/src/main/antlr4/KeYParser.g4 | 6 +- .../uka/ilkd/key/nparser/ParsingFacade.java | 34 ++++ .../uka/ilkd/key/settings/Configuration.java | 155 +++++++++++++++++- 3 files changed, 187 insertions(+), 8 deletions(-) diff --git a/key.core/src/main/antlr4/KeYParser.g4 b/key.core/src/main/antlr4/KeYParser.g4 index 534d965b0ed..e15b775488a 100644 --- a/key.core/src/main/antlr4/KeYParser.g4 +++ b/key.core/src/main/antlr4/KeYParser.g4 @@ -837,9 +837,9 @@ cvalue: | BIN_LITERAL #cintb | HEX_LITERAL #cinth | MINUS? INT_LITERAL #cintd - | FLOAT_LITERAL #cfpf - | DOUBLE_LITERAL #cfpd - | REAL_LITERAL #cfpr + | MINUS? FLOAT_LITERAL #cfpf + | MINUS? DOUBLE_LITERAL #cfpd + | MINUS? REAL_LITERAL #cfpr | (TRUE|FALSE) #cbool | LBRACE (ckv (COMMA ckv)*)? COMMA? 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 2fc943f9ea6..17aa0ed2408 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 @@ -19,6 +19,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.util.parsing.BuildingException; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.PredictionMode; @@ -196,14 +197,33 @@ public static String getValueDocumentation(@Nullable TerminalNode docComment) { // region configuration + /** + * Parses a the configuration determined by the given {@code file}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * @param file non-null {@link Path} object + * @return monad that encapsluate the ParserRuleContext + * @throws IOException if the file is not found or not readable. + * @throws BuildingException if the file is syntactical broken. + */ public static KeyAst.ConfigurationFile parseConfigurationFile(Path file) throws IOException { return parseConfigurationFile(CharStreams.fromPath(file)); } + /** + * @see #parseConfigurationFile(Path) + */ public static KeyAst.ConfigurationFile parseConfigurationFile(File file) throws IOException { return parseConfigurationFile(file.toPath()); } + /** + * Parses a the configuration determined by the given {@code stream}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * @param file non-null {@link CharStream} object + * @return monad that encapsluate the ParserRuleContext + * @throws IOException if the file is not found or not readable. + * @throws BuildingException if the file is syntactical broken. + */ public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) { KeYParser p = createParser(stream); var ctx = p.cfile(); @@ -211,14 +231,28 @@ public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) return new KeyAst.ConfigurationFile(ctx); } + /** + * Parses a the configuration determined by the given {@code stream}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * @param file non-null {@link CharStream} object + * @return a configration object with the data deserialize from the given file + * @throws IOException if the file is not found or not readable. + * @throws BuildingException if the file is syntactical broken. + */ public static Configuration readConfigurationFile(CharStream input) throws IOException { return parseConfigurationFile(input).asConfiguration(); } + /** + * @see #readConfigurationFile(CharStream) + */ public static Configuration readConfigurationFile(Path file) throws IOException { return readConfigurationFile(CharStreams.fromPath(file)); } + /** + * @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/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index 61d8906e5de..bc1e483909a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -17,6 +17,12 @@ import org.antlr.v4.runtime.CharStream; /** + * A container to hold parsed configurations. Configurations are a mapping between a property name + * and a value plus additional meta information (line number, documentation etc.). + *

+ * Helper functions allow to accesss the values in a type safe fashion. + * Note that configuration are also nested, use {@link #getTable(String)} to receive a sub configuration. + * * @author Alexander Weigl * @version 1 (03.04.23) */ @@ -32,22 +38,53 @@ public Configuration(Map data) { this.data = data; } + /** + * Loads a configuration using the given file. + * @param file existsing file path + * @return a configuration based on the file contents + * @throws IOException if file does not exists or i/o error + */ public static Configuration load(File file) throws IOException { return ParsingFacade.readConfigurationFile(file); } + /** + * Loads a configuration using the given char stream. + * @param file existsing file path + * @return a configuration based on the file contents + * @throws IOException i/o error on the steram + */ public static Configuration load(CharStream input) throws IOException { return ParsingFacade.readConfigurationFile(input); } + /** + * Returns true if an entry for the given name exists. + */ public boolean exists(String name) { return data.containsKey(name); } + /** + * Returns true if an entry for the given name exists and is also compatible + * with the given class. + * @see #getBool(String) + * @see #getInt(String) + * @see #getLong(String) + * @see #getDouble(String) + * @see #getTable(String) + */ public boolean exists(String name, Class clazz) { return data.containsKey(name) && clazz.isAssignableFrom(data.get(name).getClass()); } + /** + * Returns the stored value for the given name casted to the given clazz if possible. + * If no value exists, or value is not compatible to {@code clazz}, {@code null} is returned. + * @param an arbitrary class, exptected return type + * @param name property name + * @param clazz data type because of missing reified generics. + */ @Nullable public T get(String name, Class clazz) { if (exists(name, clazz)) @@ -56,6 +93,13 @@ public T get(String name, Class clazz) { return null; } + /** + * The same as {@link #get(String, Class)} but returns the {@code defaultValue} instead + * of a {@code null} reference. + * @param the expected return type compatible to the {@code defaultValue} + * @param name property name + * @param defaultValue the returned instead of {@code null}. + */ @Nonnull public T get(String name, @Nonnull T defaultValue) { if (exists(name, defaultValue.getClass())) @@ -64,66 +108,142 @@ public T get(String name, @Nonnull T defaultValue) { return defaultValue; } + /** + * Get the value for the entry named {@code name}. Null if no such entry exists. + * @see #exists(String) + */ @Nullable public Object get(String name) { return data.get(name); } + /** + * Returns an integer or {@code null} if not such entry exists. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public int getInt(String name) { return (int) getLong(name); } + /** + * Returns an integer value for the given name. {@code defaultValue} if no such value is present. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public int getInt(String name, int defaultValue) { return (int) getLong(name, defaultValue); } + /** + * Returns a long value for the given name. {@code null} if no such value is present. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public long getLong(String name) { return get(name, Integer.class); } + /** + * Returns a long value for the given name. {@code defaultValue} if no such value is present. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public long getLong(String name, long defaultValue) { var value = get(name, Long.class); return Objects.requireNonNullElse(value, defaultValue); } - + /** + * Returns a boolean value for the given name. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public boolean getBool(String name) { return get(name, Boolean.class); } + /** + * Returns a boolean value for the given name. {@code defaultValue} if no such value is present. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public boolean getBool(String name, boolean defaultValue) { return get(name, defaultValue); } + /** + * Returns an integer value for the given name. {@code defaultValue} if no such value is present. + * @param name property name + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists + */ public double getDouble(String name) { return get(name, Double.class); } + /** + * Returns an string value for the given name. {@code null} if no such value is present. + * @param name property name + */ + @Nullable public String getString(String name) { return get(name, String.class); } + /** + * Returns an string value for the given name. {@code defaultValue} if no such value is present. + * @param name property name + */ public String getString(String name, String defaultValue) { return get(name, defaultValue); } + /** + * Returns an sub configuration for the given name. {@code null} if no such value is present. + * @param name property name + */ + @Nullable public Configuration getTable(String name) { return get(name, Configuration.class); } + /** + * Returns a list of objects for the given name. {@code null} if no such value is present. + * @param name property name + */ + @Nullable public List getList(String name) { return get(name, List.class); } + /** + * Returns a list of strings for the given name. + * @param name property name + * @throws ClassCastException if the list contains non-strings + */ + @Nonnull public List getStringList(String name) { var seq = get(name, List.class); if (seq == null) return Collections.emptyList(); if (!seq.stream().allMatch(it -> it instanceof String)) - throw new AssertionError(); + throw new ClassCastException(); return seq; } + /** + * Returns string array for the requested entry. {@code defaultValue} is returned if no such entry exists. + * @param name a string identifying the entry + * @param defaultValue a default value + * @throws ClassCastException if the given entry has non-string elements + */ @Nonnull public String[] getStringArray(String name, @Nonnull String[] defaultValue) { if (exists(name)) { @@ -132,18 +252,25 @@ public String[] getStringArray(String name, @Nonnull String[] defaultValue) { return defaultValue; } - + /** + * Returns the meta data corresponding to the given entry. + */ @Nullable public ConfigurationMeta getMeta(String name) { return meta.get(name); } + /** + * Returns the meta data corresponding to the given entry, creates the entry if not existing. + */ @Nonnull private ConfigurationMeta getOrCreateMeta(String name) { return Objects.requireNonNull(meta.putIfAbsent(name, new ConfigurationMeta())); } - + /** + * @see #getTable(String) + */ public Configuration getSection(String name) { return get(name, Configuration.class); } @@ -199,6 +326,12 @@ public Set> getEntries() { return data.entrySet(); } + /** + * Interprets the given entry as an enum value. + * @param the enum + * @param name a name identifying an entry + * @param defaultValue the default value to be returned + */ public > T getEnum(String name, T defaultValue) { var idx = getString(name); try { @@ -208,14 +341,23 @@ public > T getEnum(String name, T defaultValue) { } } + /** + * Serializes this configuration instance into the given writer. + * @param writer a writer + * @param comment a comment + */ public void save(Writer writer, String comment) { new ConfigurationWriter(writer).printComment(comment).printMap(this.data); } - + /** + * POJO for metadata of configuration entries. + */ public static class ConfigurationMeta { + /** Position of declaration within a file */ private Position position; + /** documentation given in the file */ private String documentation; public Position getPosition() { @@ -235,6 +377,9 @@ public void setDocumentation(String documentation) { } } + /** + * Writer for configurations. Mainly manages the identation levels and escapings. + */ public static class ConfigurationWriter { private final PrintWriter out; private int indent; From ae9fe0167a3042977660760ce324b29843eaddd2 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sun, 22 Oct 2023 16:46:53 +0000 Subject: [PATCH 17/24] check the suffix checks for floats --- .../ilkd/key/nparser/builder/ExpressionBuilder.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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 1d45254f8b2..28055afc4fb 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 @@ -703,7 +703,7 @@ private Operator getAttributeInPrefixSort(Sort prefixSort, String attributeName) } } else if (attributeName.equals("")) { // The invariant observer "" is implicit and - // not part of the class declaration + // not part of the class declap // A special case is needed, hence. result = javaInfo.getInvProgramVar(); } else if (attributeName.equals("")) { @@ -1525,16 +1525,12 @@ public Term visitAccessterm(KeYParser.AccesstermContext ctx) { @Override public Object visitFloatLiteral(FloatLiteralContext ctx) { String txt = ctx.getText(); // full text of node incl. unary minus. - char lastChar = txt.charAt(txt.length() - 1); - assert lastChar == 'F' || lastChar == 'f'; return toFPNotation(txt); } @Override public Object visitDoubleLiteral(DoubleLiteralContext ctx) { String txt = ctx.getText(); // full text of node incl. unary minus. - char lastChar = txt.charAt(txt.length() - 1); - assert lastChar == 'D' || lastChar == 'd'; return toDFPNotation(txt.substring(0, txt.length() - 1)); } @@ -1542,7 +1538,9 @@ public Object visitDoubleLiteral(DoubleLiteralContext ctx) { public Object visitRealLiteral(RealLiteralContext ctx) { String txt = ctx.getText(); // full text of node incl. unary minus. char lastChar = txt.charAt(txt.length() - 1); - assert lastChar == 'R' || lastChar == 'r'; + if(lastChar == 'R' || lastChar == 'r') { + semanticError(ctx, "The given float literal does not have a suffix. This is essential to determine its exact meaning. You probably want to add 'r' as a suffix."); + } throw new Error("not yet implemented"); } From 9672332e0ba2e68fa4e62965acc2cd121d754d59 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sun, 22 Oct 2023 16:59:48 +0000 Subject: [PATCH 18/24] add test cases --- .../uka/ilkd/key/settings/SettingsTest.java | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java diff --git a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java new file mode 100644 index 00000000000..3a3ce69b9f6 --- /dev/null +++ b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java @@ -0,0 +1,56 @@ +package de.uka.ilkd.key.settings; + +class SettingsTest { + enum ABC { + A, B, C; + } + + static final String ALL_DATA = """ + { + integer : 1241, + long : 145122343214L, + string : "this is a string", + mlstring : "this is a multi + linestring + string", + stringlist : ["a", "b", "c"], + subconfig : { + a : "A", + b : "B", + c : "C", + }, + "booleans are important": true, + "booleans are important": false, + } + """; + + @Test + void read() { + var input = CharStreams.fromString(ALL_DATA); + var config = Configuration.load(input); + assertEquals(1241, config.getInt("integer")); + assertEquals(145122343214L, config.getInt("long")); + assertEquals("this is a string", config.getInt("string")); + assertEquals("this is a multi\n linestring\n string", config.getInt("mlstring")); + assertEquals(List.of("a", "b", "c"), config.getStringList("stringlist")); + var s = config.getTable("subconfig"); + assertNonNull(s); + assertEquals("A", s.getString("a")); + assertEquals("B", s.getString("b")); + assertEquals("C", s.getString("c")); + assertEquals(false, config.getInt("booleans are important")); + } + + @Test void reread() { + var input = CharStreams.fromString(ALL_DATA); + var config = Configuration.load(input); + + var out = new StringWriter(); + config.save(out,""); + var input2 = CharStreams.fromString(out.toString()); + var config2 = Configuration.load(input2); + + assertEquals(config, config2); + } + +} \ No newline at end of file From d37584b555fcb1cc960dba65c6725c3400dacf5c Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Mon, 23 Oct 2023 22:56:29 +0200 Subject: [PATCH 19/24] fix tests remove old junit for test classes except recoder module --- build.gradle | 3 -- .../key/nparser/ConfigurationBuilder.java | 15 ++++++--- .../uka/ilkd/key/settings/Configuration.java | 14 ++++++++- .../uka/ilkd/key/settings/SettingsTest.java | 31 ++++++++++++++----- recoder/build.gradle | 3 ++ 5 files changed, 49 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 52b702d33e7..a5842c1d051 100644 --- a/build.gradle +++ b/build.gradle @@ -77,11 +77,8 @@ subprojects { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0' testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.0' - testCompileOnly 'junit:junit:4.13.2' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0' - testImplementation project(':key.util') } diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index af373f43153..c53743accad 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -3,13 +3,13 @@ * SPDX-License-Identifier: GPL-2.0-only */ package de.uka.ilkd.key.nparser; +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.util.LinkedHashMap; + +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import javax.annotation.Nonnull; - -import de.uka.ilkd.key.settings.Configuration; -import de.uka.ilkd.key.util.LinkedHashMap; /** * Translates the configuration grammar (something like JSON) into a {@link Configuration} object. @@ -62,7 +62,12 @@ public Object visitCinth(KeYParser.CinthContext ctx) { @Override public Object visitCintd(KeYParser.CintdContext ctx) { - return Long.parseLong(ctx.getText(), 10); + final var text = ctx.getText(); + if (text.endsWith("L") || text.endsWith("l")) { + return Long.parseLong(text.substring(0, text.length() - 1), 10); + } else { + return Long.parseLong(text, 10); + } } @Override diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index bc1e483909a..dc17cb109e0 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -144,7 +144,7 @@ public int getInt(String name, int defaultValue) { * @throw NullPointerException if no such value entry exists */ public long getLong(String name) { - return get(name, Integer.class); + return get(name, Long.class); } /** @@ -494,4 +494,16 @@ private ConfigurationWriter printKey(String key) { return this; } } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Configuration that)) return false; + return Objects.equals(data, that.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } } diff --git a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java index 3a3ce69b9f6..51abc3698a4 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java @@ -1,5 +1,14 @@ package de.uka.ilkd.key.settings; +import org.antlr.v4.runtime.CharStreams; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; + class SettingsTest { enum ABC { A, B, C; @@ -25,28 +34,34 @@ enum ABC { """; @Test - void read() { + void read() throws IOException { var input = CharStreams.fromString(ALL_DATA); var config = Configuration.load(input); assertEquals(1241, config.getInt("integer")); - assertEquals(145122343214L, config.getInt("long")); - assertEquals("this is a string", config.getInt("string")); - assertEquals("this is a multi\n linestring\n string", config.getInt("mlstring")); + assertEquals(145122343214L, config.getLong("long")); + assertEquals("this is a string", config.getString("string")); + assertEquals("this is a multi\n linestring\n string", config.getString("mlstring")); assertEquals(List.of("a", "b", "c"), config.getStringList("stringlist")); var s = config.getTable("subconfig"); - assertNonNull(s); + assertNotNull(s); assertEquals("A", s.getString("a")); assertEquals("B", s.getString("b")); assertEquals("C", s.getString("c")); - assertEquals(false, config.getInt("booleans are important")); + + assertEquals(ABC.A, s.getEnum("a", ABC.C)); + assertEquals(ABC.B, s.getEnum("b", ABC.A)); + assertEquals(ABC.C, s.getEnum("c", ABC.B)); + + assertFalse(config.getBool("booleans are important")); } - @Test void reread() { + @Test + void reread() throws IOException { var input = CharStreams.fromString(ALL_DATA); var config = Configuration.load(input); var out = new StringWriter(); - config.save(out,""); + config.save(out, ""); var input2 = CharStreams.fromString(out.toString()); var config2 = Configuration.load(input2); diff --git a/recoder/build.gradle b/recoder/build.gradle index e32619869a0..29dc2adc0fc 100644 --- a/recoder/build.gradle +++ b/recoder/build.gradle @@ -9,4 +9,7 @@ dependencies { implementation 'org.apache-extras.beanshell:bsh:2.0b6' implementation 'net.sf.retrotranslator:retrotranslator-runtime:1.2.9' implementation 'net.sf.retrotranslator:retrotranslator-transformer:1.2.9' + + testCompileOnly 'junit:junit:4.13.2' + testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.10.0' } \ No newline at end of file From 6c08ea90ae38b3b42c52050128abf14aab132c35 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Tue, 24 Oct 2023 18:08:25 +0200 Subject: [PATCH 20/24] spotless fixes --- .../key/nparser/ConfigurationBuilder.java | 8 +- .../uka/ilkd/key/nparser/ParsingFacade.java | 17 +-- .../uka/ilkd/key/settings/Configuration.java | 101 +++++++++++------- .../uka/ilkd/key/settings/SettingsTest.java | 14 ++- 4 files changed, 87 insertions(+), 53 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index c53743accad..93ff471bf47 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -3,13 +3,13 @@ * SPDX-License-Identifier: GPL-2.0-only */ package de.uka.ilkd.key.nparser; -import de.uka.ilkd.key.settings.Configuration; -import de.uka.ilkd.key.util.LinkedHashMap; - -import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; +import javax.annotation.Nonnull; + +import de.uka.ilkd.key.settings.Configuration; +import de.uka.ilkd.key.util.LinkedHashMap; /** * Translates the configuration grammar (something like JSON) into a {@link Configuration} object. 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 17aa0ed2408..037c7921656 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 @@ -199,10 +199,11 @@ public static String getValueDocumentation(@Nullable TerminalNode docComment) { // region configuration /** * Parses a the configuration determined by the given {@code file}. - * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * * @param file non-null {@link Path} object * @return monad that encapsluate the ParserRuleContext - * @throws IOException if the file is not found or not readable. + * @throws IOException if the file is not found or not readable. * @throws BuildingException if the file is syntactical broken. */ public static KeyAst.ConfigurationFile parseConfigurationFile(Path file) throws IOException { @@ -218,10 +219,11 @@ public static KeyAst.ConfigurationFile parseConfigurationFile(File file) throws /** * Parses a the configuration determined by the given {@code stream}. - * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * * @param file non-null {@link CharStream} object * @return monad that encapsluate the ParserRuleContext - * @throws IOException if the file is not found or not readable. + * @throws IOException if the file is not found or not readable. * @throws BuildingException if the file is syntactical broken. */ public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) { @@ -231,12 +233,13 @@ public static KeyAst.ConfigurationFile parseConfigurationFile(CharStream stream) return new KeyAst.ConfigurationFile(ctx); } - /** + /** * Parses a the configuration determined by the given {@code stream}. - * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * A configuration corresponds to the grammar rule {@code cfile} in the {@code KeYParser.g4}. + * * @param file non-null {@link CharStream} object * @return a configration object with the data deserialize from the given file - * @throws IOException if the file is not found or not readable. + * @throws IOException if the file is not found or not readable. * @throws BuildingException if the file is syntactical broken. */ public static Configuration readConfigurationFile(CharStream input) throws IOException { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index dc17cb109e0..e699e7598f3 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -17,12 +17,13 @@ import org.antlr.v4.runtime.CharStream; /** - * A container to hold parsed configurations. Configurations are a mapping between a property name + * A container to hold parsed configurations. Configurations are a mapping between a property name * and a value plus additional meta information (line number, documentation etc.). *

- * Helper functions allow to accesss the values in a type safe fashion. - * Note that configuration are also nested, use {@link #getTable(String)} to receive a sub configuration. - * + * Helper functions allow to accesss the values in a type safe fashion. + * Note that configuration are also nested, use {@link #getTable(String)} to receive a sub + * configuration. + * * @author Alexander Weigl * @version 1 (03.04.23) */ @@ -39,7 +40,8 @@ public Configuration(Map data) { } /** - * Loads a configuration using the given file. + * Loads a configuration using the given file. + * * @param file existsing file path * @return a configuration based on the file contents * @throws IOException if file does not exists or i/o error @@ -49,11 +51,12 @@ public static Configuration load(File file) throws IOException { } /** - * Loads a configuration using the given char stream. + * Loads a configuration using the given char stream. + * * @param file existsing file path * @return a configuration based on the file contents * @throws IOException i/o error on the steram - */ + */ public static Configuration load(CharStream input) throws IOException { return ParsingFacade.readConfigurationFile(input); } @@ -66,8 +69,9 @@ public boolean exists(String name) { } /** - * Returns true if an entry for the given name exists and is also compatible - * with the given class. + * Returns true if an entry for the given name exists and is also compatible + * with the given class. + * * @see #getBool(String) * @see #getInt(String) * @see #getLong(String) @@ -79,11 +83,12 @@ public boolean exists(String name, Class clazz) { } /** - * Returns the stored value for the given name casted to the given clazz if possible. + * Returns the stored value for the given name casted to the given clazz if possible. * If no value exists, or value is not compatible to {@code clazz}, {@code null} is returned. + * * @param an arbitrary class, exptected return type - * @param name property name - * @param clazz data type because of missing reified generics. + * @param name property name + * @param clazz data type because of missing reified generics. */ @Nullable public T get(String name, Class clazz) { @@ -95,7 +100,8 @@ public T get(String name, Class clazz) { /** * The same as {@link #get(String, Class)} but returns the {@code defaultValue} instead - * of a {@code null} reference. + * of a {@code null} reference. + * * @param the expected return type compatible to the {@code defaultValue} * @param name property name * @param defaultValue the returned instead of {@code null}. @@ -110,6 +116,7 @@ public T get(String name, @Nonnull T defaultValue) { /** * Get the value for the entry named {@code name}. Null if no such entry exists. + * * @see #exists(String) */ @Nullable @@ -119,19 +126,22 @@ public Object get(String name) { /** * Returns an integer or {@code null} if not such entry exists. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public int getInt(String name) { return (int) getLong(name); } /** - * Returns an integer value for the given name. {@code defaultValue} if no such value is present. + * Returns an integer value for the given name. {@code defaultValue} if no such value is + * present. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public int getInt(String name, int defaultValue) { return (int) getLong(name, defaultValue); @@ -139,9 +149,10 @@ public int getInt(String name, int defaultValue) { /** * Returns a long value for the given name. {@code null} if no such value is present. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public long getLong(String name) { return get(name, Long.class); @@ -149,9 +160,10 @@ public long getLong(String name) { /** * Returns a long value for the given name. {@code defaultValue} if no such value is present. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public long getLong(String name, long defaultValue) { var value = get(name, Long.class); @@ -160,9 +172,10 @@ public long getLong(String name, long defaultValue) { /** * Returns a boolean value for the given name. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public boolean getBool(String name) { return get(name, Boolean.class); @@ -170,19 +183,22 @@ public boolean getBool(String name) { /** * Returns a boolean value for the given name. {@code defaultValue} if no such value is present. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public boolean getBool(String name, boolean defaultValue) { return get(name, defaultValue); } /** - * Returns an integer value for the given name. {@code defaultValue} if no such value is present. + * Returns an integer value for the given name. {@code defaultValue} if no such value is + * present. + * * @param name property name - * @throw ClassCastException if the entry is not an {@link #Long} - * @throw NullPointerException if no such value entry exists + * @throw ClassCastException if the entry is not an {@link #Long} + * @throw NullPointerException if no such value entry exists */ public double getDouble(String name) { return get(name, Double.class); @@ -190,6 +206,7 @@ public double getDouble(String name) { /** * Returns an string value for the given name. {@code null} if no such value is present. + * * @param name property name */ @Nullable @@ -199,14 +216,16 @@ public String getString(String name) { /** * Returns an string value for the given name. {@code defaultValue} if no such value is present. + * * @param name property name - */ + */ public String getString(String name, String defaultValue) { return get(name, defaultValue); } /** * Returns an sub configuration for the given name. {@code null} if no such value is present. + * * @param name property name */ @Nullable @@ -216,6 +235,7 @@ public Configuration getTable(String name) { /** * Returns a list of objects for the given name. {@code null} if no such value is present. + * * @param name property name */ @Nullable @@ -225,8 +245,9 @@ public List getList(String name) { /** * Returns a list of strings for the given name. + * * @param name property name - * @throws ClassCastException if the list contains non-strings + * @throws ClassCastException if the list contains non-strings */ @Nonnull public List getStringList(String name) { @@ -239,7 +260,9 @@ public List getStringList(String name) { } /** - * Returns string array for the requested entry. {@code defaultValue} is returned if no such entry exists. + * Returns string array for the requested entry. {@code defaultValue} is returned if no such + * entry exists. + * * @param name a string identifying the entry * @param defaultValue a default value * @throws ClassCastException if the given entry has non-string elements @@ -327,10 +350,11 @@ public Set> getEntries() { } /** - * Interprets the given entry as an enum value. - * @param the enum + * Interprets the given entry as an enum value. + * + * @param the enum * @param name a name identifying an entry - * @param defaultValue the default value to be returned + * @param defaultValue the default value to be returned */ public > T getEnum(String name, T defaultValue) { var idx = getString(name); @@ -343,6 +367,7 @@ public > T getEnum(String name, T defaultValue) { /** * Serializes this configuration instance into the given writer. + * * @param writer a writer * @param comment a comment */ @@ -497,8 +522,10 @@ private ConfigurationWriter printKey(String key) { @Override public boolean equals(Object o) { - if (this == o) return true; - if (!(o instanceof Configuration that)) return false; + if (this == o) + return true; + if (!(o instanceof Configuration that)) + return false; return Objects.equals(data, that.data); } diff --git a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java index 51abc3698a4..05966a1f92b 100644 --- a/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java +++ b/key.core/src/test/java/de/uka/ilkd/key/settings/SettingsTest.java @@ -1,12 +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.settings; -import org.antlr.v4.runtime.CharStreams; -import org.junit.jupiter.api.Test; - import java.io.IOException; import java.io.StringWriter; import java.util.List; +import org.antlr.v4.runtime.CharStreams; +import org.junit.jupiter.api.Test; + import static org.junit.jupiter.api.Assertions.*; class SettingsTest { @@ -40,7 +43,8 @@ void read() throws IOException { assertEquals(1241, config.getInt("integer")); assertEquals(145122343214L, config.getLong("long")); assertEquals("this is a string", config.getString("string")); - assertEquals("this is a multi\n linestring\n string", config.getString("mlstring")); + assertEquals("this is a multi\n linestring\n string", + config.getString("mlstring")); assertEquals(List.of("a", "b", "c"), config.getStringList("stringlist")); var s = config.getTable("subconfig"); assertNotNull(s); @@ -68,4 +72,4 @@ void reread() throws IOException { assertEquals(config, config2); } -} \ No newline at end of file +} From 62f919a8cc9aea73781dea0964390ded38539b4f Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sat, 28 Oct 2023 17:27:45 +0200 Subject: [PATCH 21/24] fix merge errors --- .../ilkd/key/nparser/ConfigurationBuilder.java | 5 +++-- .../java/de/uka/ilkd/key/nparser/KeyAst.java | 1 + .../uka/ilkd/key/settings/ChoiceSettings.java | 1 + .../de/uka/ilkd/key/settings/Configuration.java | 17 +++++++++-------- .../java/de/uka/ilkd/key/settings/Settings.java | 17 +++++++++-------- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java index 93ff471bf47..b7702e848e9 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java +++ b/key.core/src/main/java/de/uka/ilkd/key/nparser/ConfigurationBuilder.java @@ -6,11 +6,12 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import javax.annotation.Nonnull; import de.uka.ilkd.key.settings.Configuration; import de.uka.ilkd.key.util.LinkedHashMap; +import org.jspecify.annotations.NonNull; + /** * Translates the configuration grammar (something like JSON) into a {@link Configuration} object. * @@ -43,7 +44,7 @@ public String visitCstring(KeYParser.CstringContext ctx) { return sanitizeStringLiteral(text); } - @Nonnull + @NonNull private static String sanitizeStringLiteral(String text) { return text.substring(1, text.length() - 1) .replace("\\\"", "\"") 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 39816bd1958..d7c9e10250b 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,6 +4,7 @@ package de.uka.ilkd.key.nparser; import java.net.URL; +import java.util.List; import de.uka.ilkd.key.nparser.builder.BuilderHelpers; import de.uka.ilkd.key.nparser.builder.ChoiceFinder; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java index 7a1705e8214..66fe0fe6fcc 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ChoiceSettings.java @@ -12,6 +12,7 @@ import java.util.Properties; import java.util.Set; import java.util.StringTokenizer; +import java.util.stream.Collectors; import de.uka.ilkd.key.logic.Choice; import de.uka.ilkd.key.logic.Name; diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java index e699e7598f3..7785598b50a 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Configuration.java @@ -8,13 +8,14 @@ import java.io.PrintWriter; import java.io.Writer; import java.util.*; -import javax.annotation.Nonnull; -import javax.annotation.Nullable; import de.uka.ilkd.key.nparser.ParsingFacade; import de.uka.ilkd.key.util.Position; import org.antlr.v4.runtime.CharStream; +import org.jspecify.annotations.NonNull; +import org.jspecify.annotations.Nullable; + /** * A container to hold parsed configurations. Configurations are a mapping between a property name @@ -106,8 +107,8 @@ public T get(String name, Class clazz) { * @param name property name * @param defaultValue the returned instead of {@code null}. */ - @Nonnull - public T get(String name, @Nonnull T defaultValue) { + @NonNull + public T get(String name, @NonNull T defaultValue) { if (exists(name, defaultValue.getClass())) return (T) data.get(name); else @@ -249,7 +250,7 @@ public List getList(String name) { * @param name property name * @throws ClassCastException if the list contains non-strings */ - @Nonnull + @NonNull public List getStringList(String name) { var seq = get(name, List.class); if (seq == null) @@ -267,8 +268,8 @@ public List getStringList(String name) { * @param defaultValue a default value * @throws ClassCastException if the given entry has non-string elements */ - @Nonnull - public String[] getStringArray(String name, @Nonnull String[] defaultValue) { + @NonNull + public String[] getStringArray(String name, @NonNull String[] defaultValue) { if (exists(name)) { return getStringList(name).toArray(new String[0]); } else @@ -286,7 +287,7 @@ public ConfigurationMeta getMeta(String name) { /** * Returns the meta data corresponding to the given entry, creates the entry if not existing. */ - @Nonnull + @NonNull private ConfigurationMeta getOrCreateMeta(String name) { return Objects.requireNonNull(meta.putIfAbsent(name, new ConfigurationMeta())); } diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java index 3fbd62c5840..3ead7fb78b1 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/Settings.java @@ -6,7 +6,8 @@ import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.Properties; -import javax.annotation.Nonnull; + +import org.jspecify.annotations.NonNull; /** * This interface is implemented by classes that are used to store settings for different proposes @@ -41,7 +42,7 @@ public interface Settings { * @param props a non-null references to a configuration object. The state of this object * shall not be changed by the implementations. */ - void readSettings(@Nonnull Configuration props); + void readSettings(@NonNull Configuration props); /** * The internal state is stored in the given configuration object. The stored information must @@ -54,7 +55,7 @@ public interface Settings { * accordingly to the local * internal state. */ - void writeSettings(@Nonnull Configuration props); + void writeSettings(@NonNull Configuration props); /** @@ -63,7 +64,7 @@ public interface Settings { * @param listener a non-null reference * @see java.beans.PropertyChangeSupport#addPropertyChangeListener(PropertyChangeListener) */ - void addPropertyChangeListener(@Nonnull PropertyChangeListener listener); + void addPropertyChangeListener(@NonNull PropertyChangeListener listener); /** * Removes the given listener. @@ -80,8 +81,8 @@ public interface Settings { * @param listener the listener to be added * @see PropertyChangeSupport#addPropertyChangeListener(String, PropertyChangeListener) */ - void addPropertyChangeListener(@Nonnull String propertyName, - @Nonnull PropertyChangeListener listener); + void addPropertyChangeListener(@NonNull String propertyName, + @NonNull PropertyChangeListener listener); /** * Removes the given listener from being triggered by changes of the specified property. @@ -90,6 +91,6 @@ void addPropertyChangeListener(@Nonnull String propertyName, * @param listener the listener to be removed * @see PropertyChangeSupport#removePropertyChangeListener(String, PropertyChangeListener) */ - void removePropertyChangeListener(@Nonnull String propertyName, - @Nonnull PropertyChangeListener listener); + void removePropertyChangeListener(@NonNull String propertyName, + @NonNull PropertyChangeListener listener); } From e57e3d43dcb8ae303604c12f8a661423d743a515 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Fri, 3 Nov 2023 14:38:33 +0000 Subject: [PATCH 22/24] fixes from review --- .../de/uka/ilkd/key/nparser/builder/ExpressionBuilder.java | 3 +-- .../java/de/uka/ilkd/key/settings/ProofCachingSettings.java | 4 ++-- .../de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java | 2 +- .../main/java/org/key_project/slicing/SlicingSettings.java | 4 +++- 4 files changed, 7 insertions(+), 6 deletions(-) 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 c62d0ee8992..1cc53a2eda6 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 @@ -702,8 +702,7 @@ private Operator getAttributeInPrefixSort(Sort prefixSort, String attributeName) throw new BuildingException(ex); } } else if (attributeName.equals("")) { - // The invariant observer "" is implicit and - // not part of the class declap + // The invariant observer "" is implicit and not part of the class declaration // A special case is needed, hence. result = javaInfo.getInvProgramVar(); } else if (attributeName.equals("")) { diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java index 195a66652a5..81d370feb14 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ProofCachingSettings.java @@ -15,11 +15,11 @@ public class ProofCachingSettings extends AbstractPropertiesSettings { /** * Key ID for {@link #enabled}. */ - private static final String ENABLED_KEY = "[ProofCaching]Enabled"; + private static final String ENABLED_KEY = "Enabled"; /** * Key ID for {@link #enabled}. */ - private static final String DISPOSE_KEY = "[ProofCaching]Dispose"; + private static final String DISPOSE_KEY = "Dispose"; /** diff --git a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java index 5a9aaf34702..1151dd47db8 100644 --- a/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java +++ b/key.ui/src/main/java/de/uka/ilkd/key/gui/keyshortcuts/KeyStrokeSettings.java @@ -222,7 +222,7 @@ public void save() { LOGGER.info("Save keyboard shortcuts to: {}", SETTINGS_FILE_NEW.getAbsolutePath()); try (Writer writer = new FileWriter(SETTINGS_FILE_NEW)) { var config = new Configuration(properties); - config.save(writer, "KeY's Colors"); + config.save(writer, "KeY's KeyStrokes"); writer.flush(); } catch (IOException ex) { LOGGER.warn("Failed to save", ex); diff --git a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java index 34209e58222..98aeb502799 100644 --- a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java +++ b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java @@ -15,11 +15,13 @@ * @author Arne Keller */ public class SlicingSettings extends AbstractPropertiesSettings { + public static final String CATEGORY = "ProofSlicing"; + /** * Config key for {@link #alwaysTrack}. */ - private static final String KEY_ALWAYS_TRACK = "[ProofSlicing]alwaysTrack"; + private static final String KEY_ALWAYS_TRACK = "alwaysTrack"; /** * Config key for {@link #aggressiveDeduplicate}. */ From 720dccee2a9ab8553a9f7df19a887bb61c7629f9 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Fri, 3 Nov 2023 14:40:32 +0000 Subject: [PATCH 23/24] spotless --- .../src/main/java/org/key_project/slicing/SlicingSettings.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java index 98aeb502799..677d3c20491 100644 --- a/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java +++ b/keyext.slicing/src/main/java/org/key_project/slicing/SlicingSettings.java @@ -17,7 +17,7 @@ public class SlicingSettings extends AbstractPropertiesSettings { public static final String CATEGORY = "ProofSlicing"; - + /** * Config key for {@link #alwaysTrack}. */ From 0a46626436b72c7d7858fc78bd4b573ae647fa20 Mon Sep 17 00:00:00 2001 From: Alexander Weigl Date: Sun, 19 Nov 2023 23:57:00 +0100 Subject: [PATCH 24/24] Merge errors --- .../src/main/java/de/uka/ilkd/key/settings/ViewSettings.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java index d3af9641940..09bcadfa5e2 100644 --- a/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java +++ b/key.core/src/main/java/de/uka/ilkd/key/settings/ViewSettings.java @@ -124,8 +124,7 @@ public class ViewSettings extends AbstractPropertiesSettings { /** * Show heatmap for sequent formulas (true) or terms (false) */ - private static final String HEATMAP_SHOW = " - _enabled"; + private static final String HEATMAP_SHOW = "Heatmap_enabled"; /** * */ @@ -216,7 +215,7 @@ public class ViewSettings extends AbstractPropertiesSettings { private final PropertyEntry notificationAfterMacro = createStringProperty(NOTIFICATION_AFTER_MACRO, NOTIFICATION_UNFOCUSED); - + /** * User-definable folder bookmarks. *