Skip to content
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

JVM language frontend based on SootUp #1402

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

JVM language frontend based on SootUp #1402

wants to merge 25 commits into from

Conversation

oxisto
Copy link
Member

@oxisto oxisto commented Jan 1, 2024

This PR adds a new language frontend for the JVM, based on the new version of Soot: SootUp (https://soot-oss.github.io/SootUp/). It currently features loading code from compiled Java class files. In the future, we might extend it to Jimple and/or Java source, depending on how things progress in SootUp.

Meta-Tasks

Edit tasklist title
Beta Give feedback Tasklist Meta-Tasks, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. Switch back to maven central release of SootUp. See Migrate dex2jar to Maven Central soot-oss/SootUp#768
    Options
  2. Decide, whether we should retire the old JavaParser-based Java frontend
    Options

Supported Declarations

Edit tasklist title
Beta Give feedback Tasklist Supported Declarations, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. SootClass
    Options
  2. SootMethod
    Options
  3. SootField
    Options
  4. Local
    Options

Supported Expressions

Edit tasklist title
Beta Give feedback Tasklist Supported Expressions, more options

Delete tasklist

Delete tasklist block?
Are you sure? All relationships in this tasklist will be removed.
  1. JArrayRef
    Options
  2. JCaughtExceptionRef
    Options
  3. JInstanceFieldRef
    Options
  4. JParameterRef
    Options
  5. JStaticFieldRef
    Options
  6. JThisRef
    Options
  7. Constants, i.e., BooleanConstant, DoubleConstant, FloatConstant, IntConstant, LongConstant, NullConstant, StringConstant
    Options
  8. ClassConstant,
    Options
  9. EnumConstant, only seems to be used in annotations
    Options
  10. MethodHandle, MethodType
    Options
  11. Binary operators, all derived from AbstractBinopExpr
    Options
  12. JCastExpr
    Options
  13. JPhiExpr
    Options
  14. JDynamicInvokeExpr at least partially
    Options
  15. JInstanceOfExpr
    Options
  16. JInterfaceInvokeExpr
    Options
  17. JLengthExpr
    Options
  18. JNewArrayExpr
    Options
  19. JNewExpr
    Options
  20. JNewMultiArrayExpr
    Options
  21. JSpecialInvokeExpr
    Options
  22. JVirtualInvokeExpr
    Options

@oxisto oxisto changed the title jvm sootup Experimental JVM language frontend based on SootUp Jan 1, 2024
@oxisto oxisto changed the title Experimental JVM language frontend based on SootUp JVM language frontend based on SootUp Jan 6, 2024
Copy link

sonarcloud bot commented Jan 10, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

5 New issues
0 Security Hotspots
89.4% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@@ -10,6 +10,7 @@ val enablePythonFrontend: Boolean by rootProject.extra
val enableLLVMFrontend: Boolean by rootProject.extra
val enableTypeScriptFrontend: Boolean by rootProject.extra
val enableRubyFrontend: Boolean by rootProject.extra
val enableJVMFrontend: Boolean by rootProject.extra
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaFrontend and JVMFrontend could be confused. Not sure what could be a better naming. Maybe JavaSource and JVM?

@@ -18,5 +19,5 @@ dependencies {
if (enablePythonFrontend) api(project(":cpg-language-python"))
if (enableLLVMFrontend) api(project(":cpg-language-llvm"))
if (enableTypeScriptFrontend) api(project(":cpg-language-typescript"))
if (enableRubyFrontend) api(project(":cpg-language-ruby"))
if (enableJVMFrontend) api(project(":cpg-language-jvm"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally remove Ruby?

@@ -5,6 +5,8 @@ log4j = "2.22.0"
sonarqube = "4.4.1.3373"
spotless = "6.23.2"
nexus-publish = "1.3.0"
#sootup = "5f72ac96f3cb230c438d038975c88ba2acc86d23"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#sootup = "5f72ac96f3cb230c438d038975c88ba2acc86d23"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants