Commit 38d2c3e6 authored by Lulu Luong's avatar Lulu Luong

foreach-end working for not closed goals

branchlabels working in the Maxtriplets Example
defaultcases added to visitor
parent 65615828
Pipeline #26698 passed with stages
in 4 minutes and 25 seconds
package edu.kit.iti.formal.psdbg.examples.java.maxtriplet;
import edu.kit.iti.formal.psdbg.examples.JavaExample;
public class MaxTripletExample extends JavaExample {
public MaxTripletExample() {
setName("MaxTriplet");
setJavaFile(this.getClass().getResource("MaxTriplet.java"));
defaultInit(getClass());
}
}
\ No newline at end of file
......@@ -1322,6 +1322,7 @@ public class DebuggerMain implements Initializable {
ScriptTreeGraph stg = new ScriptTreeGraph();
PTreeNode startnode = (model.getDebuggerFramework() != null)?model.getDebuggerFramework().getPtreeManager().getStartNode():null;
if(startnode == null) return;
stg.createGraph(startnode, FACADE.getProof().root());
TreeItem<TreeNode> item = (stg.toView());
......
......@@ -41,7 +41,7 @@ public class ForeachTreeNode extends AbstractTreeNode {
@Override
public TreeNode toTreeNode() {
String label= (foreachstart)? "foreach in line " + linenr + " START": "foreach in line " + linenr + "END";
String label= (foreachstart)? "foreach in line " + linenr + " START": "foreach in line " + linenr + " END";
return new TreeNode(label, getNode());
}
......
......@@ -41,7 +41,9 @@ public class ScriptTreeNode extends AbstractTreeNode {
public TreeNode toTreeNode() {
String label;
if (isMatchEx()) {
String matchexpression = ((TermLiteral) ((MatchExpression) ((GuardedCaseStatement) scriptState.getStatement()).getGuard()).getPattern()).getContent();
String matchexpression = (scriptState.getStatement() instanceof GuardedCaseStatement)?((TermLiteral) ((MatchExpression) ((GuardedCaseStatement) scriptState.getStatement()).getGuard()).getPattern()).getContent()
: "default";
label = "match ("+ matchexpression +") in line " + linenr;
} else {
label = ((CallStatement)scriptState.getStatement()).getCommand() + " (line " + linenr + ")";
......
edu.kit.iti.formal.psdbg.examples.contraposition.ContrapositionExample
edu.kit.iti.formal.psdbg.examples.fol.FirstOrderLogicExample
edu.kit.iti.formal.psdbg.examples.java.simple.JavaSimpleExample
edu.kit.iti.formal.psdbg.examples.java.maxtriplet.MaxTripletExample
#edu.kit.iti.formal.psdbg.examples.java.transitive.PaperExample
#edu.kit.iti.formal.psdbg.examples.java.dpqs.DualPivotExample
edu.kit.iti.formal.psdbg.examples.java.quicksort.QuickSort
......
public class MaxTriplet {
/*@ public normal_behavior
@ requires true;
@ ensures \result >= a && \result >= b && \result >= c;
@*/
public int getMax(int a, int b, int c) {
int max;
if(a >= b) {
max = a;
} else {
max = b;
}
if(max <= c) {
max = c;
}
return max;
}
}
\ No newline at end of file
\profile "Java Profile";
\settings {
"#Proof-Settings-Config-File
#Tue Aug 28 16:59:30 CEST 2018
[StrategyProperty]OSS_OPTIONS_KEY=OSS_ON
[StrategyProperty]VBT_PHASE=VBT_SYM_EX
[SMTSettings]useUninterpretedMultiplication=true
[SMTSettings]SelectedTaclets=
[StrategyProperty]METHOD_OPTIONS_KEY=METHOD_CONTRACT
[StrategyProperty]USER_TACLETS_OPTIONS_KEY3=USER_TACLETS_OFF
[StrategyProperty]SYMBOLIC_EXECUTION_ALIAS_CHECK_OPTIONS_KEY=SYMBOLIC_EXECUTION_ALIAS_CHECK_NEVER
[StrategyProperty]LOOP_OPTIONS_KEY=LOOP_INVARIANT
[StrategyProperty]USER_TACLETS_OPTIONS_KEY2=USER_TACLETS_OFF
[StrategyProperty]USER_TACLETS_OPTIONS_KEY1=USER_TACLETS_OFF
[StrategyProperty]QUANTIFIERS_OPTIONS_KEY=QUANTIFIERS_NON_SPLITTING_WITH_PROGS
[StrategyProperty]NON_LIN_ARITH_OPTIONS_KEY=NON_LIN_ARITH_NONE
[SMTSettings]instantiateHierarchyAssumptions=true
[StrategyProperty]AUTO_INDUCTION_OPTIONS_KEY=AUTO_INDUCTION_OFF
[StrategyProperty]DEP_OPTIONS_KEY=DEP_ON
[StrategyProperty]BLOCK_OPTIONS_KEY=BLOCK_CONTRACT_INTERNAL
[StrategyProperty]CLASS_AXIOM_OPTIONS_KEY=CLASS_AXIOM_FREE
[StrategyProperty]SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OPTIONS_KEY=SYMBOLIC_EXECUTION_NON_EXECUTION_BRANCH_HIDING_OFF
[StrategyProperty]QUERY_NEW_OPTIONS_KEY=QUERY_OFF
[Strategy]Timeout=-1
[Strategy]MaximumNumberOfAutomaticApplications=10000
[SMTSettings]integersMaximum=2147483645
[Choice]DefaultChoices=assertions-assertions\\:safe , initialisation-initialisation\\:disableStaticInitialisation , intRules-intRules\\:arithmeticSemanticsIgnoringOF , programRules-programRules\\:Java , runtimeExceptions-runtimeExceptions\\:allow , JavaCard-JavaCard\\:off , Strings-Strings\\:on , modelFields-modelFields\\:treatAsAxiom , bigint-bigint\\:on , sequences-sequences\\:on , moreSeqRules-moreSeqRules\\:on , reach-reach\\:on , integerSimplificationRules-integerSimplificationRules\\:full , permissions-permissions\\:off , wdOperator-wdOperator\\:L , wdChecks-wdChecks\\:off , mergeGenerateIsWeakeningGoal-mergeGenerateIsWeakeningGoal\\:off
[SMTSettings]useConstantsForBigOrSmallIntegers=true
[StrategyProperty]STOPMODE_OPTIONS_KEY=STOPMODE_DEFAULT
[StrategyProperty]QUERYAXIOM_OPTIONS_KEY=QUERYAXIOM_ON
[StrategyProperty]INF_FLOW_CHECK_PROPERTY=INF_FLOW_CHECK_FALSE
[SMTSettings]maxGenericSorts=2
[SMTSettings]integersMinimum=-2147483645
[SMTSettings]invariantForall=false
[SMTSettings]UseBuiltUniqueness=false
[SMTSettings]explicitTypeHierarchy=false
[Strategy]ActiveStrategy=JavaCardDLStrategy
[StrategyProperty]SPLITTING_OPTIONS_KEY=SPLITTING_DELAYED
[StrategyProperty]MPS_OPTIONS_KEY=MPS_MERGE
"
}
\javaSource "";
\proofObligation "#Proof Obligation Settings
#Tue Aug 28 16:59:30 CEST 2018
name=MaxTriplet[MaxTriplet\\:\\:getMax(int,int,int)].JML normal_behavior operation contract.0
contract=MaxTriplet[MaxTriplet\\:\\:getMax(int,int,int)].JML normal_behavior operation contract.0
class=de.uka.ilkd.key.proof.init.FunctionalOperationContractPO
";
\proof {
(keyLog "0" (keyUser "Lulu" ) (keyVersion "f70bcf96664be17b2edcd824cec1bc6bfb2f9528"))
(autoModeTime "0")
(branch "dummy ID"
(opengoal " ")
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment