-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
151 additions
and
15 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
key.core/src/main/java/de/uka/ilkd/key/java/ast/expression/operator/adt/SeqPut.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* 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.java.ast.expression.operator.adt; | ||
|
||
import de.uka.ilkd.key.java.Services; | ||
import de.uka.ilkd.key.java.ast.abstraction.KeYJavaType; | ||
import de.uka.ilkd.key.java.ast.abstraction.PrimitiveType; | ||
import de.uka.ilkd.key.java.ast.expression.Operator; | ||
import de.uka.ilkd.key.java.ast.reference.ExecutionContext; | ||
import de.uka.ilkd.key.java.visitor.Visitor; | ||
|
||
import org.key_project.util.ExtList; | ||
|
||
public class SeqPut extends Operator { | ||
|
||
public SeqPut(ExtList children) { | ||
super(children); | ||
} | ||
|
||
|
||
@Override | ||
public int getPrecedence() { | ||
return 0; | ||
} | ||
|
||
|
||
@Override | ||
public int getNotation() { | ||
return PREFIX; | ||
} | ||
|
||
|
||
@Override | ||
public void visit(Visitor v) { | ||
v.performActionOnSeqPut(this); | ||
} | ||
|
||
|
||
@Override | ||
public int getArity() { | ||
return 3; | ||
} | ||
|
||
|
||
@Override | ||
public KeYJavaType getKeYJavaType(Services javaServ, ExecutionContext ec) { | ||
return javaServ.getJavaInfo().getKeYJavaType(PrimitiveType.JAVA_SEQ); | ||
} | ||
} |
78 changes: 78 additions & 0 deletions
78
key.core/src/main/java/de/uka/ilkd/key/java/ast/statement/SetStatement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/* 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.java.ast.statement; | ||
|
||
import de.uka.ilkd.key.java.ast.PositionInfo; | ||
import de.uka.ilkd.key.java.ast.ProgramElement; | ||
import de.uka.ilkd.key.java.visitor.Visitor; | ||
import de.uka.ilkd.key.nparser.KeyAst.SetStatementContext; | ||
|
||
|
||
|
||
/** | ||
* JML set statement | ||
* | ||
* @author Julian Wiesler | ||
*/ | ||
public class SetStatement extends JavaStatement { | ||
|
||
/** | ||
* The target of the assignment as a term. Either a heap access for a ghost field | ||
* or a ghost variable. | ||
*/ | ||
public static int INDEX_TARGET = 0; | ||
|
||
/** | ||
* The value of the assignment as a term. | ||
*/ | ||
public static int INDEX_VALUE = 1; | ||
|
||
/** | ||
* The parser context of the statement produced during parsing. | ||
*/ | ||
private final SetStatementContext context; | ||
|
||
/** Constructor used in recoderext */ | ||
public SetStatement(SetStatementContext context, PositionInfo positionInfo) { | ||
super(positionInfo); | ||
this.context = context; | ||
} | ||
|
||
/** Constructor used when cloning */ | ||
public SetStatement(SetStatement copyFrom) { | ||
this(copyFrom.context, copyFrom.getPositionInfo()); | ||
} | ||
|
||
|
||
/** | ||
* Removes the attached parser context from this set statement | ||
* | ||
* @return the parser context that was attached | ||
*/ | ||
public SetStatementContext getParserContext() { | ||
return context; | ||
} | ||
|
||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public void visit(Visitor v) { | ||
v.performActionOnSetStatement(this); | ||
} | ||
|
||
@Override | ||
public int getChildCount() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public ProgramElement getChildAt(int index) { | ||
throw new IndexOutOfBoundsException("SetStatement has no program children"); | ||
} | ||
|
||
@Override | ||
protected int computeHashCode() { | ||
return System.identityHashCode(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
key.core/src/main/resources/de/uka/ilkd/key/proof/rules/String.key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
permission, | ||
reach, | ||
seq, | ||
stringDef, | ||
map, | ||
freeADT, | ||
wellfound, | ||
|
8 changes: 8 additions & 0 deletions
8
key.core/src/main/resources/de/uka/ilkd/key/proof/rules/stringDef.key
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
\sorts { | ||
java.lang.String \extends java.lang.Object; | ||
} | ||
|
||
\functions { | ||
Seq strContent(java.lang.String); | ||
java.lang.String strPool(Seq); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters