Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sarah.grebing
ProofScriptParser
Commits
c0bd89e7
Commit
c0bd89e7
authored
Jun 27, 2018
by
Sarah Grebing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bigfix in relaoding contracts
parent
291eec9d
Pipeline
#23252
passed with stages
in 82 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/KeYProofFacade.java
.../edu/kit/iti/formal/psdbg/interpreter/KeYProofFacade.java
+18
-2
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/DebuggerMain.java
...edu/kit/iti/formal/psdbg/gui/controller/DebuggerMain.java
+6
-2
No files found.
rt-key/src/main/java/edu/kit/iti/formal/psdbg/interpreter/KeYProofFacade.java
View file @
c0bd89e7
...
...
@@ -8,6 +8,7 @@ import de.uka.ilkd.key.java.Services;
import
de.uka.ilkd.key.proof.Goal
;
import
de.uka.ilkd.key.proof.Proof
;
import
de.uka.ilkd.key.proof.init.ProofInputException
;
import
de.uka.ilkd.key.proof.init.ProofOblInput
;
import
de.uka.ilkd.key.proof.io.ProblemLoaderException
;
import
de.uka.ilkd.key.speclang.Contract
;
import
edu.kit.iti.formal.psdbg.interpreter.data.GoalNode
;
...
...
@@ -91,8 +92,23 @@ public class KeYProofFacade {
*/
public
void
reload
(
File
problemFile
)
throws
ProofInputException
,
ProblemLoaderException
{
if
(
contract
.
get
()
!=
null
)
{
// reinstante the contract
setProof
(
getEnvironment
().
createProof
(
contract
.
get
().
getProofObl
(
getEnvironment
().
getServices
())));
pma
=
KeYApi
.
loadFromKeyFile
(
problemFile
);
List
<
Contract
>
contracts
=
pma
.
getProofContracts
();
contracts
.
forEach
(
contract1
->
{
if
(
contract
.
get
().
getName
().
equals
(
contract1
.
getName
())){
contractProperty
().
set
(
contract1
);
}
});
if
(
contract
.
get
()
!=
null
){
try
{
activateContract
(
contract
.
get
());
}
catch
(
ProofInputException
pie
){
throw
new
ProofInputException
(
"Contract not reloadable."
,
pie
.
getCause
());
}
}
/*setProof(getEnvironment().createProof(
contract.get().getProofObl(getEnvironment().getServices())));*/
}
else
{
setProof
(
KeYApi
.
loadFromKeyFile
(
problemFile
).
getLoadedProof
().
getProof
());
}
...
...
ui/src/main/java/edu/kit/iti/formal/psdbg/gui/controller/DebuggerMain.java
View file @
c0bd89e7
...
...
@@ -545,10 +545,11 @@ public class DebuggerMain implements Initializable {
//save old information and refresh models
statusBar
.
publishMessage
(
"Reloading..."
);
File
lastLoaded
;
Contract
chosen
=
null
;
if
(
model
.
getKeyFile
()
!=
null
)
{
lastLoaded
=
model
.
getKeyFile
();
}
else
{
Contract
chosen
=
model
.
getChosenContract
();
chosen
=
model
.
getChosenContract
();
lastLoaded
=
model
.
getJavaFile
();
}
//model.reload();
...
...
@@ -562,8 +563,11 @@ public class DebuggerMain implements Initializable {
iModel
.
clearHighlightLines
();
iModel
.
getGoals
().
clear
();
iModel
.
setSelectedGoalNodeToShow
(
null
);
if
(
chosen
!=
null
)
{
FACADE
.
contractProperty
().
set
(
chosen
);
}
try
{
FACADE
.
reload
(
lastLoaded
);
if
(
iModel
.
getGoals
().
size
()
>
0
)
{
iModel
.
setSelectedGoalNodeToShow
(
iModel
.
getGoals
().
get
(
0
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment