Repository navigation
Let identity statements be the start point of a method #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
swissiety
merged 3 commits into
secure-software-engineering:develop
from
Hazem-Gamall:fix/identity-stmts-as-start-points
Nov 30, 2026
+258
−17
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
d1ca2b7
Let identity statements be the start point of a method, and add the l…
Hazem-Gamall 1a279ce
Do the same in the Opal scope: identity statements are start points, …
Hazem-Gamall 2f2cbc5
Merge branch 'develop' into fix/identity-stmts-as-start-points
swissiety File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
boomerangPDS/src/test/java/test/cases/basic/StartPointTest.java
This file contains hidden or 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,41 @@ | ||
| /** | ||
| * ***************************************************************************** | ||
| * Copyright (c) 2018 Fraunhofer IEM, Paderborn, Germany | ||
| * <p> | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0. | ||
| * <p> | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| * <p> | ||
| * Contributors: | ||
| * Johannes Spaeth - initial API and implementation | ||
| * ***************************************************************************** | ||
| */ | ||
| package test.cases.basic; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
| import org.junit.jupiter.api.extension.ExtendWith; | ||
| import test.core.BoomerangTestRunnerInterceptor; | ||
| import test.core.QueryMethods; | ||
|
|
||
| /** Where the analysis enters and leaves a method that has no identity statements. */ | ||
| @ExtendWith(BoomerangTestRunnerInterceptor.class) | ||
| public class StartPointTest { | ||
|
|
||
| @Test | ||
| public void callIsTheFirstStatementOfAStaticMethod() { | ||
| Object alias = delegate(); | ||
| QueryMethods.queryFor(alias); | ||
| } | ||
|
|
||
| // no identity statements: the call is the first statement, and the backward analysis enters | ||
| // allocate() only on the edge from the call's predecessor, which the leading nop provides | ||
| private static Object delegate() { | ||
| return allocate(); | ||
| } | ||
|
|
||
| private static Object allocate() { | ||
| return new BasicAlloc(); | ||
| } | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the first
Stmtis e.g. an AssignStmt I think the Nop is still needed to track the assignment