From 9f67b3426f0713c74fbdc2417cd109f843066449 Mon Sep 17 00:00:00 2001 From: "M.Schmidt" Date: Tue, 18 Jun 2024 15:55:12 +0200 Subject: [PATCH] progress --- docs/bodyinterceptors.md | 9 ++++----- docs/builtin-analyses.md | 7 ++++--- docs/callgraphs.md | 11 +++++++---- docs/examples.md | 25 ++++++++++++++++--------- docs/faq.md | 6 ++++-- docs/jimple.md | 3 +-- mkdocs.yml | 14 ++++++-------- 7 files changed, 42 insertions(+), 33 deletions(-) diff --git a/docs/bodyinterceptors.md b/docs/bodyinterceptors.md index 4f98e8e1fac..4039ee4508e 100644 --- a/docs/bodyinterceptors.md +++ b/docs/bodyinterceptors.md @@ -9,7 +9,8 @@ The "raw" generated Jimple from the Bytecodefrontend needs a lot improvements - - The Locals we get from the Java bytecode are typically untyped. Therefore we have to augment the Local types which is done by the TypeAssigner. - t.b.c. -Method scoped optimisations: +Optimizations (method scope) + - ConditionalBranchFolder: removes tautologic ifs that are always true/false - if we can determine it in the scope of the method. - EmptySwitchEliminator: removes switches that are not really switching - ConstantPropagatorAndFolder: calculates constant values before runtime @@ -17,16 +18,14 @@ Method scoped optimisations: - UnreachableCodeEliminator: speaks for itself. - TrapTightener -Make Local names standardized: +Standardize Jimple appearance + - LocalNameStandardizer: numbers Locals with the scheme: type-initial + number of type occurence !!! info "Soot Equivalent" - [BodyTransformer](https://github.com/soot-oss/soot/blob/develop/src/main/java/soot/BodyTransformer.java) -Below, we show how these BodyInterceptors work for the users who are interested in their internal workings. - ### LocalSplitter LocalSplitter is aBodyInterceptorthat attempts to identify and separate uses of a local variable (as definition) that are independent of each other by renaming local variables. diff --git a/docs/builtin-analyses.md b/docs/builtin-analyses.md index 273912b3b93..6878e646810 100644 --- a/docs/builtin-analyses.md +++ b/docs/builtin-analyses.md @@ -1,6 +1,7 @@ -# Functionalities and Utilities +# BuiltIn Analyses +More to come! -#### LocalLivenessAnalyser +### LocalLivenessAnalyser LocalLivenessAnalyser is used for querying for the list of live local variables before and after a given Stmt. @@ -10,7 +11,7 @@ Example: The live local variables before and after each Stmt will be calculated after generating an instance of LocalLivenessAnalyser as shown the example above. They can be queried by using the methods getLiveLocalsBeforeStmt and getLiveLocalsAfterStmt. -#### DominanceFinder +### DominanceFinder DomianceFinder is used for querying for the immediate dominator and dominance frontiers for a given basic block. diff --git a/docs/callgraphs.md b/docs/callgraphs.md index e589b5736c9..dbfb503481d 100644 --- a/docs/callgraphs.md +++ b/docs/callgraphs.md @@ -10,8 +10,9 @@ Below, we show how to create a type hierarchy: === "SootUp" ```java + String cpString = "src/test/resources/Callgraph/binary"; List inputLocations = new ArrayList(); - inputLocations.add(new JavaClassPathAnalysisInputLocation("src/test/resources/Callgraph/binary")); + inputLocations.add(new JavaClassPathAnalysisInputLocation(cpStr)); inputLocations.add(new DefaultRTJarAnalysisInputLocation()); JavaView view = new JavaView(inputLocations); @@ -61,7 +62,9 @@ All the call graph construction algorithms require an entry method to start with === "SootUp (alternative)" ```java - MethodSignature entryMethodSignature = view.getIdentifierFactory().parseMethodSignature(" \ No newline at end of file diff --git a/docs/faq.md b/docs/faq.md index f9c75c88b54..e7f2efa5e51 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -42,12 +42,14 @@ or create a convenient link with the exported stmtgraph as HTTP GET Parameter DotExporter.createUrlToWebeditor( stmtgraph ); ``` +### The Sourcecodefrontend... +is in a experimental state! If you wish to use it, please consider to contribute. ### Is there a way to use code exploration and syntax highlighting features in my IDE for .jimple files? -Try [JimpeLsp](https://github.com/swissiety/JimpleLsp). +Try [JimpeLsp](https://github.com/swissiety/JimpleLsp) or the [vscode plugin](https://marketplace.visualstudio.com/items?itemName=swissiety.jimplelsp) ### Is there a way to use syntax highlighting of .jimple in my paper, thesis, ...? -Have a look at [LspLexer4Pygments](https://github.com/swissiety/LspLexer4Pygments). +Have a look at [LspLexer4Pygments](https://github.com/swissiety/LspLexer4Pygments). Its the same syntax highlighting you see here in the documentation. You can export it to LaTex as well. ### How to ... add an entry in this list? i.e. Your question is not answered here? Feel free to start a [Discussion](https://github.com/soot-oss/SootUp/discussions). diff --git a/docs/jimple.md b/docs/jimple.md index 8b86014413f..74ad683fdec 100644 --- a/docs/jimple.md +++ b/docs/jimple.md @@ -6,8 +6,7 @@ Therefore, Jimple aims to bring the best of both worlds, a non-stack-based and f For this purpose Jimple was designed as a representation of JVM bytecode which is human readable. !!! info - - To learn more about jimple, refer to the [thesis](https://courses.cs.washington.edu/courses/cse501/01wi/project/sable-thesis.pdf) by Raja Vallee-Rai. + To learn more about jimple, refer to the [thesis](https://courses.cs.washington.edu/courses/cse501/01wi/project/sable-thesis.pdf) by Raja Vallee-Rai. Lets have a look at the following Jimple code representing Java code of a `HelloWorld` class. diff --git a/mkdocs.yml b/mkdocs.yml index c2cf7395a97..0ed35eb015f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -10,14 +10,14 @@ nav: - Examples: examples.md - Configure your Inputs: analysisinputlocations.md - - Basics I: + - Basics: - Jimple IR: jimple.md - Jimple Body: jimple-body.md - Jimple Statements: jimple-stmts.md - Jimple Types: jimple-types.md - Jimple Values: jimple-values.md - - Basics II: + - Advanced Topics: - BodyInterceptors: bodyinterceptors.md - Callgraphs: callgraphs.md - BuiltIn Analyses: builtin-analyses.md @@ -31,12 +31,10 @@ nav: # - Implement an AnalysisTool: write_analysis_tool.md # - From Prototype to Tool: tool_setup.md - - Misc: - - Announcements: announcement.md - - Design Decisions: whatsnew.md - - Migration Help: migrating.md - - - More information: + - Misc & More information: + - Announcements: announcement.md + - Design Decisions: whatsnew.md + - Migration Help: migrating.md - Latest Javadoc: /SootUp/apidocs - Troubleshooting & FAQ: faq.md # - Based on SootUp: tools.md