Actions
Task #5010
closedConditions in IfStatementBranch
Start date:
06/25/2014
Due date:
% Done:
0%
Estimated time:
Detected in build:
svn
Published in build:
r527
Description
To make Cfg one needs some condition to be set for each branch of "if-else" construction. Why doesn't VeriTrans return the condition in "IfStatementBranch" in "onIfStatementBranchBegin"? It should be negation of the correspondent condition in "onIfStatementBegin".
Updated by Alexander Kamkin over 10 years ago
- Status changed from New to Resolved
- Target version set to 0.1
- Detected in build set to svn
- Published in build set to r527
- Tracker changed from Support to Task
The getExpression
methods have been implemented for the following classes:
IfStatementBranch
- returns the condition associated with the if-statement branch:
Construct | Condition |
if(EXPRESSION) then ... |
EXPRESSION |
if(EXPRESSION) ... else |
not (EXPRESSION) |
IfGenerateBranch
- returns the condition associated with the if-generate branch:- see
IfStatementBranch
.
- see
CaseStatementItem
- returns the condition associated with the case-statement item:
Construct | Condition |
case(EXPRESSION) A: |
(EXPRESSION === A) |
case(EXPRESSION) A, B, ...: |
(EXPRESSION === A) or (EXPRESSION === B) or ... |
case(EXPRESSION) default: |
not (CONDITION 1 or CONDITION 2 or ...) |
CaseGenerateItem
- returns the condition associated with the case-generate item:- see
CaseStatementItem
.
- see
Updated by Alexander Kamkin over 10 years ago
Here is an example:
@Override
public void onIfStatementBranchBegin(final IfStatementBranch node) {
// Get the branch condition.
final Expression condition = node.getExpression();
// Do what you need.
...
}
Updated by Alexander Kamkin about 10 years ago
- Status changed from Resolved to Closed
Actions