Skip to content

Commit

Permalink
adapt doc
Browse files Browse the repository at this point in the history
  • Loading branch information
swissiety committed Jul 4, 2024
1 parent 23356f9 commit f7144b6
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions docs/qilin.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# Incorporate Qilin Pointer Analysis

### Dependencies

=== "Maven"
```maven
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.sourcecode</artifactId>
<version>{{ git_latest_release }}</version>
</dependency>
```
```maven
<dependency>
<groupId>org.soot-oss</groupId>
<artifactId>sootup.java.sourcecode</artifactId>
<version>{{ git_latest_release }}</version>
</dependency>
```

=== "Gradle"

Expand All @@ -17,6 +19,8 @@

### How to create a pointer analysis

!!! note "WIP: Beware most likely the API will change so you only need to specify SootUp objects!"

One can create an Andersen's context-insensitive analysis with following code:

=== "Java"
Expand Down Expand Up @@ -44,19 +48,19 @@ Second, we can use it to get the points-to results for some interested local var

```java
PointsToSet pts0 = pta.reachingObjects(method, v0);
PointsToSet pts1 = pta.reachingObjects(method, v1, f); // PTS(v1.f)
PointsToSet pts1 = pta.reachingObjects(method, v1, f); // PTS(v1.f)
```

Third, we can check whether two variables, `a` and `b`, are aliases by checking
whether there is an object that exists in both of their points-to sets.

Qilin does not currently offer a `isMayAlias` API within the PTA class. However, a similar functionality can be found
in `qilin.test.util.AliasAssertion` with the method:
```boolean isMayAlias(PTA pta, Value va, Value vb)```.
This method allows users to check for potential aliasing between two values
given a PTA instance.
Qilin does not currently offer a `isMayAlias` API within the PTA class.
However, a similar functionality can be found in `qilin.test.util.AliasAssertion` with the method:
```boolean isMayAlias(PTA pta, Value va, Value vb)```
This method allows to check for potential aliasing between two values given a PTA instance.

### A Full list of Pointer Analyses

### A Full list of Point Analyses
[Qilin](https://github.com/QilinPTA/Qilin)'s toolbox includes a rich set of pointer analyses, which are given below:

Note that the symbol **k** used in the table should be replaced with a concrete small constant like 1 or 2.
Expand Down

0 comments on commit f7144b6

Please sign in to comment.