Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ncore taclets #15

Open
wants to merge 179 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
b1bbfdf
Add simplified Rust parser
Drodt Jun 5, 2024
b0220bd
initial commit for generalizing data structures representing calculi
unp1 Jun 12, 2024
704070f
more refactoring
unp1 Jun 12, 2024
9debf5e
polish
unp1 Jun 12, 2024
b99b975
Add AST classes
Drodt Jun 12, 2024
5c6cbac
Types, ops, and idents
Drodt Jun 14, 2024
7bc8e41
Convert to KeY AST
Drodt Jun 20, 2024
e02f171
Add ops and term
Drodt Jun 20, 2024
adde184
TermFactory
Drodt Jun 21, 2024
02bba08
Move Namespac
Drodt Jun 24, 2024
f489dea
Namespaces
Drodt Jun 25, 2024
a53a5d2
LDTs
Drodt Jun 27, 2024
76a08c4
Spotless
Drodt Jul 3, 2024
13414d8
Add taclet files
Drodt Jul 3, 2024
e61c708
Split grammars
Drodt Jul 3, 2024
33201ff
Merge branch 'main' into rusty-while
Drodt Jul 12, 2024
d791592
TermBuilder and LDTs
Drodt Jul 12, 2024
5b7df1f
Extend TermBuilder
Drodt Jul 15, 2024
0d2996a
Basic KeY-File infrastructure
Drodt Jul 16, 2024
7077abe
KeYUserProblemFile and friends
Drodt Jul 18, 2024
39b1f4b
Add SVs
Drodt Jul 19, 2024
fea930e
Spotless
Drodt Jul 19, 2024
f682fe1
Make SimpleExpressionSort proper
Drodt Jul 19, 2024
0d57115
Taclets
Drodt Jul 19, 2024
e3a4ee7
Merge branch 'main' into rusty-while
Drodt Jul 22, 2024
75b9809
Fix int literals and test
Drodt Jul 23, 2024
4f5b3f9
Add more taclets
Drodt Jul 23, 2024
bd87d2e
NoFindTaclet
Drodt Jul 23, 2024
2b05b74
TacletBuilder
Drodt Jul 23, 2024
30ef7f1
Printing + fix
Drodt Jul 25, 2024
658e810
almost working version of loading ldt.key in rusty_while
tobias-rnh Jul 24, 2024
6fbefb0
start adding copy methods for InitConfig
tobias-rnh Jul 24, 2024
b286e94
fixing parsing
tobias-rnh Jul 25, 2024
fcabfc8
spotless
tobias-rnh Jul 25, 2024
54c54c4
Start on instructions
Drodt Jul 25, 2024
479204a
start implementing TacletPBuilder
tobias-rnh Jul 25, 2024
160d0d3
copy more of TacletPBuilder
tobias-rnh Jul 25, 2024
4921e22
Matching
Drodt Jul 26, 2024
a4ec590
Improve code quality
Drodt Jul 26, 2024
22db910
Some typos
Drodt Jul 26, 2024
c36cc13
copy TacletBuilders
tobias-rnh Jul 26, 2024
091c53f
fix TacletPBuilder (WIP)
tobias-rnh Jul 26, 2024
dd8a087
start work on Semisequent
tobias-rnh Jul 26, 2024
2d5044f
Formatting
Drodt Jul 26, 2024
92b13f5
Merge pull request #10 from tobias-rnh/taclet-pbuilder
Drodt Jul 26, 2024
9af7cbf
start SemisequentChangeInfo
tobias-rnh Jul 26, 2024
b19d645
Merge branch 'rusty-while' into taclet-pbuilder
Drodt Jul 26, 2024
8ceeef7
adapt equality modulo renaming to rusty_while
tobias-rnh Jul 26, 2024
d6361f4
Merge pull request #11 from tobias-rnh/taclet-pbuilder
Drodt Jul 26, 2024
cd740e3
Read Rusty and SchemaRusty
Drodt Jul 26, 2024
601ac46
Fix ExpressionBuilder
Drodt Jul 26, 2024
4e23097
add toString() methods for simpler debugging of created taclets
tobias-rnh Jul 26, 2024
bea1bf5
add more taclets to testrules for rusty_while
tobias-rnh Jul 26, 2024
26f3394
Merge pull request #12 from tobias-rnh/taclet-pbuilder
Drodt Jul 27, 2024
a07e655
Allow application of taclets
Drodt Aug 12, 2024
ddba1ff
Spotless
Drodt Aug 12, 2024
265dbcf
Expand tests, fix quant vars, ...
Drodt Aug 13, 2024
5bfbee8
Remove references to Java in var names and comments
Drodt Aug 13, 2024
c4dcb8b
Merge branch 'main' into rusty-while
Drodt Aug 13, 2024
0cc948d
More tests & fixes
Drodt Aug 13, 2024
d83b854
More tests & fixes
Drodt Aug 13, 2024
ecf73f2
Remove some quant var checks
Drodt Aug 13, 2024
a32e029
Work on quant vars
Drodt Aug 14, 2024
ee16c3f
Merge branch 'calculus' into rusty-while
Drodt Aug 14, 2024
defb736
Use ncore.calculus; reduce passing of services
Drodt Aug 14, 2024
7fb0a59
Use calculus in rusty; formatting
Drodt Aug 14, 2024
c12e9da
Bump Java to 21
Drodt Aug 14, 2024
3f14edb
Fix tests and strats
Drodt Aug 14, 2024
ac6bdaa
Fix some constructors
Drodt Aug 14, 2024
16e27b3
Fix taclet builder; add tests
Drodt Aug 19, 2024
d601085
Add EmptyStatement, add tests, fix addRules
Drodt Aug 21, 2024
4fc34b7
Add rules; minor fix
Drodt Aug 21, 2024
08a74f1
Fix schema parsing, conversion, and matching on programs
Drodt Aug 22, 2024
cd51e34
Add varconds
Drodt Aug 22, 2024
f6459b7
First successful proof! (And fixes)
Drodt Aug 23, 2024
ed06741
Fix subst and quantifiers
Drodt Aug 26, 2024
8e45491
Spotless
Drodt Aug 26, 2024
6192b5f
Fix tests
Drodt Aug 26, 2024
0d443a2
Expand parser; rewrite converters
Drodt Aug 28, 2024
95fe495
Expand converters and AST classes
Drodt Aug 28, 2024
0705889
Add toString
Drodt Aug 28, 2024
bc33c57
Update Java & ANTLR version
Drodt Aug 29, 2024
dc42ca2
Format tests
Drodt Aug 29, 2024
fc3d61c
Merge branch 'main' into rusty-while
Drodt Aug 29, 2024
366bca0
Rename parsers
Drodt Aug 29, 2024
cbd3847
Rename module
Drodt Aug 29, 2024
8dd1d3b
More concrete type
Drodt Aug 30, 2024
34f8666
Merge branch 'main' into rusty
Drodt Aug 30, 2024
f6b5024
Add more rules; fixes
Drodt Sep 4, 2024
76e0f59
Finish IfTest
Drodt Sep 5, 2024
01433d5
Add more rules (and necessary fixes)
Drodt Sep 5, 2024
7b1d654
Add missing 'let'
Drodt Sep 6, 2024
1f093cb
Merge branch 'main' into rusty
Drodt Sep 6, 2024
75f4ca6
Add more rules
Drodt Sep 11, 2024
18285a9
Tuple rules, block assign rules
Drodt Sep 11, 2024
b841876
Compound assignment
Drodt Sep 11, 2024
17c9c31
Bool expr rules
Drodt Sep 11, 2024
02ed921
Add proof saving
Drodt Sep 14, 2024
ce56856
ProofReplayer
Drodt Sep 14, 2024
cf5dcea
RunAllProofs
Drodt Sep 17, 2024
b6bf0cc
Rework types in code
Drodt Sep 18, 2024
f9ba875
Start refactoring taclets to ncore
Drodt Sep 18, 2024
8d45819
Formatting
Drodt Sep 18, 2024
5976b4d
Fix some errors
Drodt Sep 18, 2024
889c2cc
Start using calculus in rusty
Drodt Sep 27, 2024
f5cc73a
Fix
Drodt Oct 10, 2024
20a9f4d
Remove some generics
Drodt Oct 10, 2024
21c5453
Fix generics and inheritance
Drodt Oct 16, 2024
fa7da83
Fix most errors
Drodt Oct 23, 2024
1ff2de1
fix compilation errors in TestApplyTaclet
unp1 Oct 24, 2024
1fc53f1
Spotless fixes
unp1 Oct 24, 2024
f75e8e4
Fix static initialisation errors
unp1 Oct 25, 2024
c3dc2c8
spotless fixes
unp1 Oct 25, 2024
ffd3b43
Sequents
Drodt Nov 6, 2024
0abdc55
Merge branch 'ncore-taclets' of github.com:Drodt/key into ncore-taclets
Drodt Nov 6, 2024
316232d
Fix merge error & rusty
Drodt Nov 13, 2024
97ebbe5
Fix compilation errors
Drodt Nov 13, 2024
3f27f5f
Fix Pos hash
Drodt Nov 13, 2024
fa6b7ef
Fix skolem terms
Drodt Nov 13, 2024
d6d332f
Fix goBelowUpdate and mergeRule
Drodt Nov 14, 2024
8f80ee2
Fix Empty Sequent
Drodt Nov 14, 2024
d2ab55b
Merge branch 'main' into ncore-taclets
Drodt Nov 14, 2024
18529c7
Fix rusty
Drodt Nov 14, 2024
78efa3b
Renamed package
unp1 Nov 18, 2024
4b8ab3a
Merge branch 'main' of github.com:keyproject/key into test
unp1 Nov 18, 2024
179ef65
factored out remaining equalsModProofIrrelevancy
unp1 Nov 27, 2024
a8e2b62
Fixed compilation errors and add a reflection based dynamic dispatche…
unp1 Nov 27, 2024
944ee3b
Added comments and minor code cleanup
unp1 Nov 27, 2024
3b3738d
Fix slicing
Drodt Dec 4, 2024
68b70ae
Remove EqualsModProofIrrelevancy interface
Drodt Dec 4, 2024
17d2d6b
Remove reflection
Drodt Dec 9, 2024
064570f
Replace java.SequentFormula with ncore.SequentFormula
Drodt Dec 11, 2024
ebc3268
Remove java.SequentFormula
Drodt Dec 11, 2024
499c749
Sequent refactoring
unp1 Dec 20, 2024
a3f22ca
Generalized sequents and semisequents
unp1 Dec 21, 2024
f5905b7
Fix program variable replacer
unp1 Dec 21, 2024
d25fda4
Fix compilation errors
unp1 Dec 21, 2024
5a91b58
Commit fix (unrelated) testcase
unp1 Dec 22, 2024
647d83f
Remove unused static methods from sequent kits for JavaDL and RustyDL
unp1 Dec 22, 2024
0668dd4
Spotless fixes
unp1 Dec 22, 2024
dbd7605
Generaliized and moved some rules and calculus related classes
unp1 Jan 6, 2025
8212d58
Code cleanup
unp1 Jan 6, 2025
160c069
Additional code cleanup
unp1 Jan 6, 2025
9500b05
Remove unused imports and minor cleanups
unp1 Jan 6, 2025
dde0d2f
Use ncore SchemaVariable at more places
unp1 Jan 6, 2025
568dbaf
Minor fix for SymbolcExecutionUtil
unp1 Jan 6, 2025
cc0afbc
Fixed a few tests
unp1 Jan 7, 2025
87b12e8
Fix modality caching
unp1 Jan 8, 2025
f21b9bc
Add more hashcode and equals methods to RustyAST clases
unp1 Jan 8, 2025
f919fe3
Remove JavaDL specific SchemaVariable interface
unp1 Jan 8, 2025
9280539
Added comment to Layoutable interface
unp1 Jan 8, 2025
f448b29
Remove Layoutable class
unp1 Jan 8, 2025
832d4eb
Fix compilation error (forgotten implements for no longer interface)
unp1 Jan 8, 2025
acd9e08
spotless fixes
unp1 Jan 8, 2025
dc18d6c
Replace specific Rule interface by ncore Rule interface
unp1 Jan 8, 2025
09e9772
spotless fixes
unp1 Jan 8, 2025
e99f4d6
Minor cleanup
unp1 Jan 10, 2025
0f1b567
Refactoring of InstantiationEntry classes
unp1 Jan 10, 2025
cfc0e49
Added comments to SVInstantiations interface
unp1 Jan 10, 2025
4a12eb5
Fixed bug (class cast exception) in ProgVarReplacer
unp1 Jan 10, 2025
78f8961
Fix for modality caching and sort equality
unp1 Jan 12, 2025
e96c354
Add test for WeakValue map implementation
unp1 Jan 13, 2025
8571f0b
Added comments to assumes instantiation types and minor clean up
unp1 Jan 15, 2025
e6ba6a3
Added comment for AssumesMatchResult
unp1 Jan 15, 2025
d10c2e7
Moved rule instantiation related types to corresponding package (and …
unp1 Jan 15, 2025
30b2380
Created package rules.conditions in ncore for common taclet related c…
unp1 Jan 15, 2025
ad8a543
Refactored misnamed method in RuleApp and added comments
unp1 Jan 15, 2025
280a2bf
Some taclet classes related cleanup
unp1 Jan 15, 2025
fd99b64
Removed empty class and some readability improvements to taclet classes
unp1 Jan 15, 2025
1c1ee9f
Replace usage of JFunction by Function where possible
unp1 Jan 15, 2025
51a792b
Reduced generic parameters for TacletExecutors
unp1 Jan 15, 2025
7cc5c77
Removed unnecessary RuleApp interface in Rusty
unp1 Jan 15, 2025
12c2c5e
Clean up for syntactical replace visitors
unp1 Jan 15, 2025
0ae4bdc
Clean up rusty syntactical replace visitor
unp1 Jan 15, 2025
99a3527
Fixed JavaDoc comment tags.
unp1 Jan 16, 2025
3f0bb71
Update qodana linter
unp1 Jan 16, 2025
9319356
Move exception type "IllegalInstantiationException" to ncore
unp1 Jan 16, 2025
da879c3
Fix printing of ModalOperatorSVs
unp1 Jan 17, 2025
186107d
Create textual representation of taclets in inner nodes only if these…
unp1 Jan 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,6 @@ key.core/src/main/antlr4/gen/

scripts/tools/checkstyle/key_checks_incremental.xml
checkstyle-diff.txt
/key.ncore/src/main/gen/
/key.ncore/src/main/antlr/KeYLexer.tokens
/keyext.rusty/src/main/gen/
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
// id "com.github.ben-manes.versions" version "0.39.0"

// Code formatting
id "com.diffplug.spotless" version "6.25.0"
id "com.diffplug.spotless" version "7.0.0.BETA2"

// EISOP Checker Framework
id "org.checkerframework" version "0.6.45"
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
14 changes: 7 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ 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
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
import de.uka.ilkd.key.java.reference.MethodReference;
import de.uka.ilkd.key.java.reference.TypeRef;
import de.uka.ilkd.key.logic.JavaBlock;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.ProgramElementName;
import de.uka.ilkd.key.logic.TermBuilder;
import de.uka.ilkd.key.logic.op.IProgramMethod;
import de.uka.ilkd.key.logic.op.SchemaVariable;
import de.uka.ilkd.key.proof.Node;
import de.uka.ilkd.key.proof.NodeInfo;
import de.uka.ilkd.key.proof_references.ProofReferenceUtil;
import de.uka.ilkd.key.proof_references.reference.DefaultProofReference;
import de.uka.ilkd.key.proof_references.reference.IProofReference;
import de.uka.ilkd.key.rule.PosTacletApp;
import de.uka.ilkd.key.rule.RuleApp;
import de.uka.ilkd.key.util.MiscTools;

import org.key_project.logic.Name;
import org.key_project.logic.op.sv.SchemaVariable;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.util.collection.ImmutableArray;
import org.key_project.util.collection.ImmutableSLList;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ public LinkedHashSet<IProofReference<?>> computeReferences(Node node, Services s
*/
protected void listReferences(Node node, ProgramElement pe, ProgramVariable arrayLength,
LinkedHashSet<IProofReference<?>> toFill, boolean includeExpressionContainer) {
if (pe instanceof ProgramVariable) {
ProgramVariable pv = (ProgramVariable) pe;
if (pe instanceof ProgramVariable pv) {
if (pv.isMember()) {
DefaultProofReference<ProgramVariable> reference =
new DefaultProofReference<>(IProofReference.ACCESS, node,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import de.uka.ilkd.key.java.abstraction.KeYJavaType;
import de.uka.ilkd.key.util.KeYTypeUtil;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;
Expand Down Expand Up @@ -54,9 +53,9 @@ public void testIsInnerType() throws Exception {
// Test class with package
assertFalse(KeYTypeUtil.isInnerType(services, typeWithPackage));
// Test inner class without package
Assertions.assertTrue(KeYTypeUtil.isInnerType(services, innerTypeWithoutPackage));
assertTrue(KeYTypeUtil.isInnerType(services, innerTypeWithoutPackage));
// Test inner class with package
Assertions.assertTrue(KeYTypeUtil.isInnerType(services, innerTypeWithPackage));
assertTrue(KeYTypeUtil.isInnerType(services, innerTypeWithPackage));
} finally {
environment.dispose();
}
Expand Down Expand Up @@ -87,11 +86,11 @@ public void testGetParentName() throws Exception {
KeYTypeUtil.getType(services, "model.InnerAndAnonymousTypeTest.IGetter");
assertNotNull(innerTypeWithPackage);
// Test null
Assertions.assertNull(KeYTypeUtil.getParentName(services, null));
Assertions.assertNull(KeYTypeUtil.getParentName(null, typeWithoutPackage));
Assertions.assertNull(KeYTypeUtil.getParentName(null, null));
assertNull(KeYTypeUtil.getParentName(services, null));
assertNull(KeYTypeUtil.getParentName(null, typeWithoutPackage));
assertNull(KeYTypeUtil.getParentName(null, null));
// Test class without package
Assertions.assertNull(KeYTypeUtil.getParentName(services, typeWithoutPackage));
assertNull(KeYTypeUtil.getParentName(services, typeWithoutPackage));
// Test class with package
assertEquals("model", KeYTypeUtil.getParentName(services, typeWithPackage));
// Test inner class without package
Expand Down Expand Up @@ -127,14 +126,13 @@ public void testIsType() throws Exception {
assertFalse(KeYTypeUtil.isType(services, "InnerAndAnonymousTypeTest.Invalid"));
assertFalse(KeYTypeUtil.isType(services, "model.InnerAndAnonymousTypeTest.Invalid"));
// Test class without package
Assertions.assertTrue(KeYTypeUtil.isType(services, "InnerAndAnonymousTypeTest"));
assertTrue(KeYTypeUtil.isType(services, "InnerAndAnonymousTypeTest"));
// Test class with package
Assertions.assertTrue(KeYTypeUtil.isType(services, "model.InnerAndAnonymousTypeTest"));
assertTrue(KeYTypeUtil.isType(services, "model.InnerAndAnonymousTypeTest"));
// Test inner class without package
Assertions
.assertTrue(KeYTypeUtil.isType(services, "InnerAndAnonymousTypeTest.IGetter"));
assertTrue(KeYTypeUtil.isType(services, "InnerAndAnonymousTypeTest.IGetter"));
// Test inner class with package
Assertions.assertTrue(
assertTrue(
KeYTypeUtil.isType(services, "model.InnerAndAnonymousTypeTest.IGetter"));
} finally {
environment.dispose();
Expand All @@ -153,16 +151,15 @@ public void testGetType() throws Exception {
Services services = environment.getServices();
assertNotNull(services);
// Test null
Assertions.assertNull(KeYTypeUtil.getType(services, null));
Assertions.assertNull(KeYTypeUtil.getType(null, "InnerAndAnonymousTypeTest"));
Assertions.assertNull(KeYTypeUtil.getType(null, null));
assertNull(KeYTypeUtil.getType(services, null));
assertNull(KeYTypeUtil.getType(null, "InnerAndAnonymousTypeTest"));
assertNull(KeYTypeUtil.getType(null, null));
// Test invalid names
Assertions.assertNull(KeYTypeUtil.getType(services, "Invalid"));
Assertions.assertNull(KeYTypeUtil.getType(services, "model.Invalid"));
Assertions.assertNull(KeYTypeUtil.getType(services, "invalid.Invalid"));
Assertions
.assertNull(KeYTypeUtil.getType(services, "InnerAndAnonymousTypeTest.Invalid"));
Assertions.assertNull(
assertNull(KeYTypeUtil.getType(services, "Invalid"));
assertNull(KeYTypeUtil.getType(services, "model.Invalid"));
assertNull(KeYTypeUtil.getType(services, "invalid.Invalid"));
assertNull(KeYTypeUtil.getType(services, "InnerAndAnonymousTypeTest.Invalid"));
assertNull(
KeYTypeUtil.getType(services, "model.InnerAndAnonymousTypeTest.Invalid"));
// Test class without package
KeYJavaType kjt = KeYTypeUtil.getType(services, "InnerAndAnonymousTypeTest");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testReferenceComputation_ExpandAndContract() throws Exception {
new ExpectedProofReferences(IProofReference.INLINE_METHOD,
"UseOperationContractTest::main"),
new ExpectedProofReferences(IProofReference.USE_CONTRACT,
"pre: {heap=java.lang.Object::<inv>(heap,self)<<impl>>}; mby: null; post: {heap=and(and(equals(result_magic42,Z(2(4(#))))<<origin(ensures @ file UseOperationContractTest.java @ line 12) ([])>>,java.lang.Object::<inv>(heap,self)<<impl>>)<<SC>>,equals(exc<<origin(ensures (implicit)) ([])>>,null)<<impl, origin(ensures (implicit)) ([])>>)}; mods: {heap=allLocs, savedHeap=null}; hasMod: {heap=true, savedHeap=true}; termination: diamond; transaction: false"));
"pre: {heap=java.lang.Object::<inv>(heap,self)<<impl>>}; mby: null; post: {heap=and(and(equals(result_magic42,Z(2(4(#))))<<origin(ensures @ file UseOperationContractTest.java @ line 12) ([])>>,java.lang.Object::<inv>(heap,self)<<impl>>)<<SC>>,equals(exc<<origin(ensures (implicit)) ([])>>,null)<<impl, origin(ensures (implicit)) ([])>>)}free post: {heap=true, savedHeap=null}; modifiable: {heap=allLocs, savedHeap=null}; hasModifiable: {heap=true, savedHeap=true}; termination: diamond; transaction: false"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public void testUseOperationContracts() throws Exception {
"/proofReferences/UseOperationContractTest/UseOperationContractTest.java",
"UseOperationContractTest", "main", true, new ContractProofReferencesAnalyst(),
new ExpectedProofReferences(IProofReference.USE_CONTRACT,
"pre: {heap=java.lang.Object::<inv>(heap,self)<<impl>>}; mby: null; post: {heap=and(and(equals(result_magic42,Z(2(4(#))))<<origin(ensures @ file UseOperationContractTest.java @ line 12) ([])>>,java.lang.Object::<inv>(heap,self)<<impl>>)<<SC>>,equals(exc<<origin(ensures (implicit)) ([])>>,null)<<impl, origin(ensures (implicit)) ([])>>)}; mods: {heap=allLocs, savedHeap=null}; hasMod: {heap=true, savedHeap=true}; termination: diamond; transaction: false"));
"pre: {heap=java.lang.Object::<inv>(heap,self)<<impl>>}; mby: null; post: {heap=and(and(equals(result_magic42,Z(2(4(#))))<<origin(ensures @ file UseOperationContractTest.java @ line 12) ([])>>,java.lang.Object::<inv>(heap,self)<<impl>>)<<SC>>,equals(exc<<origin(ensures (implicit)) ([])>>,null)<<impl, origin(ensures (implicit)) ([])>>)}free post: {heap=true, savedHeap=null}; modifiable: {heap=allLocs, savedHeap=null}; hasModifiable: {heap=true, savedHeap=true}; termination: diamond; transaction: false"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static void main(String[] args) {
} else {
final File riflFilename = new File(args[0]);
final File javaFilename = new File(args[1]);
RIFLTransformer.transform(riflFilename, javaFilename);
transform(riflFilename, javaFilename);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
import java.util.Set;

import de.uka.ilkd.key.java.Services;
import de.uka.ilkd.key.logic.PosInOccurrence;
import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.logic.label.BlockContractValidityTermLabel;
import de.uka.ilkd.key.logic.label.TermLabel;
import de.uka.ilkd.key.logic.label.TermLabelState;
import de.uka.ilkd.key.rule.BlockContractInternalRule;
import de.uka.ilkd.key.rule.LoopContractInternalRule;
import de.uka.ilkd.key.rule.Rule;
import de.uka.ilkd.key.rule.RuleApp;
import de.uka.ilkd.key.symbolic_execution.util.SymbolicExecutionUtil;

import org.key_project.logic.Name;
import org.key_project.prover.rules.Rule;
import org.key_project.prover.rules.RuleApp;
import org.key_project.prover.sequent.PosInOccurrence;
import org.key_project.util.collection.ImmutableList;
import org.key_project.util.collection.ImmutableSLList;
import org.key_project.util.java.CollectionUtil;
Expand All @@ -34,7 +34,7 @@ public class BlockContractValidityTermLabelUpdate implements TermLabelUpdate {
*/
@Override
public ImmutableList<Name> getSupportedRuleNames() {
return ImmutableSLList.<Name>nil().append(BlockContractInternalRule.INSTANCE.name());
return ImmutableSLList.singleton(BlockContractInternalRule.INSTANCE.name());
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
import java.util.Arrays;
import java.util.List;

import de.uka.ilkd.key.logic.SequentFormula;
import de.uka.ilkd.key.logic.Term;
import de.uka.ilkd.key.logic.label.FormulaTermLabel;
import de.uka.ilkd.key.logic.label.TermLabel;

import org.key_project.prover.sequent.SequentFormula;

/**
* The {@link TermLabelMerger} used to merge {@link FormulaTermLabel}s.
*
Expand All @@ -22,7 +23,8 @@ public class FormulaTermLabelMerger implements TermLabelMerger {
* {@inheritDoc}
*/
@Override
public boolean mergeLabels(SequentFormula existingSF, Term existingTerm,
public boolean mergeLabels(SequentFormula existingSF,
Term existingTerm,
TermLabel existingLabel, SequentFormula rejectedSF, Term rejectedTerm,
TermLabel rejectedLabel, List<TermLabel> mergedLabels) {
if (existingLabel != null) {
Expand Down
Loading
Loading