Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
80c4353
Improved init contract
m4ndeb2r Aug 7, 2021
0812d25
Removed generated constructor contract
m4ndeb2r Aug 7, 2021
ca95cac
New init contract, new proof.
m4ndeb2r Aug 7, 2021
a8883b8
New proof file for default constructor
m4ndeb2r Aug 9, 2021
c4da843
Improved JML to prove default constructor
m4ndeb2r Aug 9, 2021
5893f64
New proof file for default constructor
m4ndeb2r Aug 9, 2021
59748d8
Improved the loop invariant of resize()
m4ndeb2r Sep 5, 2021
d70cc8a
Improved loop invariant of resize()
m4ndeb2r Sep 11, 2021
c7f66bb
New proof file for capacity()
m4ndeb2r Sep 12, 2021
7086de9
New proof file for init()
m4ndeb2r Sep 12, 2021
bd88dc0
New proof files for isEmpty()
m4ndeb2r Sep 12, 2021
47ce7b5
New proof file for maskNull()
m4ndeb2r Sep 12, 2021
b0ba238
New proof file for nextKeyIndex()
m4ndeb2r Sep 12, 2021
c107436
New proof files for size()
m4ndeb2r Sep 12, 2021
4ca551a
New proof file for unmaskNull()
m4ndeb2r Sep 12, 2021
5684966
New proof file for resize() exceptional behaviour (proven)
m4ndeb2r Sep 12, 2021
d812257
New proof file for resize() normal behaviour (under construction)
m4ndeb2r Sep 12, 2021
3f3fb6c
Added KeY system 2.7
m4ndeb2r Sep 12, 2021
30c2962
Removed Key 2.7 map
m4ndeb2r Sep 12, 2021
6a7cf2e
Removed KeY 2.7 map
m4ndeb2r Sep 12, 2021
795cc1a
Added key.zip (version 2.7)
m4ndeb2r Sep 12, 2021
8e6e6db
Updated the README.md file; how to start the stand-alone tool KeY tool.
m4ndeb2r Sep 12, 2021
50412db
Improved hash() contract
m4ndeb2r Sep 21, 2021
7efe21d
New proof file for resize(), still under construction.
m4ndeb2r Sep 21, 2021
9a8a2fe
Replaced hash() with \dl_genHash() in KeY spec.
m4ndeb2r Sep 22, 2021
f574bf3
New proof files due to changes in class invariant
m4ndeb2r Sep 22, 2021
b2261a8
Improved loop invariant of resize().
m4ndeb2r Sep 22, 2021
4859cdb
New proof file after changes to loop invariant.
m4ndeb2r Sep 23, 2021
a3a8cba
Improved loop invariant of resize()
m4ndeb2r Sep 23, 2021
a587ae6
Capacity method strictly pure (was: pure).
m4ndeb2r Sep 23, 2021
d288667
Fixed contract of nextKeyIndex and improved loop inv. of resize.
m4ndeb2r Sep 24, 2021
90fe530
New proof file for nextKeyIndex.
m4ndeb2r Sep 24, 2021
fcae6c0
proving containsKey
mattulbrich Sep 24, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@ Now, the class can be loaded in KeY.

Note: The KeY plugin Eclipse complains about the `remove` method on line 979 (Cycle detected). However, this does not seem to be a real problem. Threrefore, it is ignored.

## Start the stand-alone KeY tool
Version 2.7 of the stand-alone KeY tool is provided in the directory key2.7 this repository. First, unzip the file `key.zip` in your working directory of you choice. Then, start the tool in one of the following ways:
* On the command line, type:
`$ cd ./key/key`
`$ ./gradlew :key.ui:run --parallel`
or
* `$ cd ./key/key`
`$ ./gradlew shadowJar`
`$ java -Xmx8G -jar ./key.ui/build/libs/key-2.9-exe.jar`

The second option allows you to claim extra memory resources (in this example, 8GB).

## Load VerifiedIdentityHashMap in KeY
* select your project, and right-click on it for the context menu
* from the context menu, choose Load Project.
* Open the `IdentityHashMap.key` file that is available in the root of the project.
25 changes: 7 additions & 18 deletions jre/java/lang/Object.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ public class Object {
/**
* @generated
*/
/*@ public behavior
@ requires true;
@ ensures true;
@ assignable \everything;
/*@ public normal_behavior
@ requires true;
@ ensures \result == this.equals(param0);
@*/
public Object();
public /*@ helper strictly_pure @*/ boolean equals(/*@ nullable */ java.lang.Object param0);

/**
* @generated
Expand All @@ -22,7 +21,7 @@ public class Object {
@ ensures true;
@ assignable \everything;
@*/
protected java.lang.Object[] clone();
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException;

/**
* @generated
Expand All @@ -32,7 +31,7 @@ public class Object {
@ ensures true;
@ assignable \everything;
@*/
public boolean equals(java.lang.Object param0);
public final java.lang.Class getClass();

/**
* @generated
Expand All @@ -54,16 +53,6 @@ public class Object {
@*/
public java.lang.String toString();

/**
* @generated
*/
/*@ public behavior
@ requires true;
@ ensures true;
@ assignable \everything;
@*/
public final java.lang.Class getClass();

/**
* @generated
*/
Expand Down Expand Up @@ -123,4 +112,4 @@ public class Object {
@ assignable \everything;
@*/
protected void finalize() throws java.lang.Throwable;
}
}
Binary file added key2.7/key.zip
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\settings {
"#Proof-Settings-Config-File
#Fri Jun 18 12:43:59 CEST 2021
#Sat Aug 28 15:04:36 CEST 2021
[Labels]UseOriginLabels=true
[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON
[SMTSettings]invariantForall=false
Expand All @@ -11,7 +11,7 @@
[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS
[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF
[Choice]DefaultChoices=assertions-assertions\\:safe , initialisation-initialisation\\:disableStaticInitialisation , intRules-intRules\\:javaSemantics , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:treatAsAxiom , bigint-bigint\\:on , sequences-sequences\\:on , moreSeqRules-moreSeqRules\\:off , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , permissions-permissions\\:off , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , methodExpansion-methodExpansion\\:modularOnly , javaLoopTreatment-javaLoopTreatment\\:efficient
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_NONE
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_SCOPE_INV_TACLET
[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE
[SMTSettings]UseBuiltUniqueness=false
[SMTSettings]explicitTypeHierarchy=false
Expand All @@ -20,7 +20,7 @@
[SMTSettings]SelectedTaclets=
[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON
[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF
[Strategy]MaximumNumberOfAutomaticApplications=100000
[Strategy]MaximumNumberOfAutomaticApplications=50000
[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT
[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_DELAYED
[SMTSettings]useConstantsForBigOrSmallIntegers=true
Expand Down Expand Up @@ -49,7 +49,7 @@
\include "../../../../functions.key";

\proofObligation "#Proof Obligation Settings
#Fri Jun 18 12:43:59 CEST 2021
#Sat Aug 28 15:04:36 CEST 2021
contract=java.util.VerifiedIdentityHashMap[java.util.Map\\:\\:isEmpty()].JML behavior operation contract.0
name=java.util.VerifiedIdentityHashMap[java.util.Map\\:\\:isEmpty()].JML behavior operation contract.0
class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
Expand All @@ -58,7 +58,7 @@ class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
\proof {
(keyLog "0" (keyUser "martindeboer" ) (keyVersion "a6034b00a3"))

(autoModeTime "149")
(autoModeTime "46")

(branch "dummy ID"
(rule "instanceof_static_type" (formula "1") (term "0,0,0,1,1,0,0,1,1") (newnames "self,result,exc,heapAtPre,o,f"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\settings {
"#Proof-Settings-Config-File
#Fri Jun 18 12:44:57 CEST 2021
#Sat Aug 28 15:05:05 CEST 2021
[Labels]UseOriginLabels=true
[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON
[SMTSettings]invariantForall=false
Expand All @@ -11,7 +11,7 @@
[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS
[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF
[Choice]DefaultChoices=assertions-assertions\\:safe , initialisation-initialisation\\:disableStaticInitialisation , intRules-intRules\\:javaSemantics , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:treatAsAxiom , bigint-bigint\\:on , sequences-sequences\\:on , moreSeqRules-moreSeqRules\\:off , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , permissions-permissions\\:off , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , methodExpansion-methodExpansion\\:modularOnly , javaLoopTreatment-javaLoopTreatment\\:efficient
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_NONE
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_SCOPE_INV_TACLET
[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE
[SMTSettings]UseBuiltUniqueness=false
[SMTSettings]explicitTypeHierarchy=false
Expand All @@ -20,7 +20,7 @@
[SMTSettings]SelectedTaclets=
[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON
[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF
[Strategy]MaximumNumberOfAutomaticApplications=100000
[Strategy]MaximumNumberOfAutomaticApplications=50000
[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT
[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_DELAYED
[SMTSettings]useConstantsForBigOrSmallIntegers=true
Expand Down Expand Up @@ -49,7 +49,7 @@
\include "../../../../functions.key";

\proofObligation "#Proof Obligation Settings
#Fri Jun 18 12:44:57 CEST 2021
#Sat Aug 28 15:05:05 CEST 2021
contract=java.util.VerifiedIdentityHashMap[java.util.VerifiedIdentityHashMap\\:\\:isEmpty()].JML normal_behavior operation contract.0
name=java.util.VerifiedIdentityHashMap[java.util.VerifiedIdentityHashMap\\:\\:isEmpty()].JML normal_behavior operation contract.0
class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
Expand All @@ -58,7 +58,7 @@ class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
\proof {
(keyLog "0" (keyUser "martindeboer" ) (keyVersion "a6034b00a3"))

(autoModeTime "96")
(autoModeTime "56")

(branch "dummy ID"
(rule "impRight" (formula "1") (newnames "self,result,exc,heapAtPre,o,f"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

\settings {
"#Proof-Settings-Config-File
#Fri Jun 04 15:11:07 CEST 2021
#Sat Aug 28 15:02:53 CEST 2021
[Labels]UseOriginLabels=true
[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON
[SMTSettings]invariantForall=false
Expand All @@ -11,7 +11,7 @@
[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS
[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF
[Choice]DefaultChoices=assertions-assertions\\:safe , initialisation-initialisation\\:disableStaticInitialisation , intRules-intRules\\:javaSemantics , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:ban , JavaCard-JavaCard\\:on , Strings-Strings\\:on , modelFields-modelFields\\:treatAsAxiom , bigint-bigint\\:on , sequences-sequences\\:on , moreSeqRules-moreSeqRules\\:off , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , permissions-permissions\\:off , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off , methodExpansion-methodExpansion\\:modularOnly , javaLoopTreatment-javaLoopTreatment\\:efficient
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_NONE
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_SCOPE_INV_TACLET
[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE
[SMTSettings]UseBuiltUniqueness=false
[SMTSettings]explicitTypeHierarchy=false
Expand All @@ -20,7 +20,7 @@
[SMTSettings]SelectedTaclets=
[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON
[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF
[Strategy]MaximumNumberOfAutomaticApplications=100000
[Strategy]MaximumNumberOfAutomaticApplications=50000
[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT
[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_DELAYED
[SMTSettings]useConstantsForBigOrSmallIntegers=true
Expand Down Expand Up @@ -49,16 +49,17 @@
\include "../../../../functions.key";

\proofObligation "#Proof Obligation Settings
#Fri Jun 04 15:11:07 CEST 2021
#Sat Aug 28 15:02:53 CEST 2021
contract=java.util.VerifiedIdentityHashMap[java.util.VerifiedIdentityHashMap\\:\\:maskNull(java.lang.Object)].JML normal_behavior operation contract.0
name=java.util.VerifiedIdentityHashMap[java.util.VerifiedIdentityHashMap\\:\\:maskNull(java.lang.Object)].JML normal_behavior operation contract.0
class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
";

\proof {
(keyLog "0" (keyUser "martindeboer" ) (keyVersion "a6034b00a3"))
(keyLog "1" (keyUser "martindeboer" ) (keyVersion "a6034b00a3"))

(autoModeTime "93")
(autoModeTime "67")

(branch "dummy ID"
(rule "impRight" (formula "1") (newnames "key,result,exc,heapAtPre,o,f"))
Expand Down
Loading