Skip to content

Commit

Permalink
add UPG doc into rap-book
Browse files Browse the repository at this point in the history
  • Loading branch information
DiuDiu777 committed Aug 3, 2024
1 parent f5e94a1 commit 610be76
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/5.3-unsafe.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# unsafety propogation and isolation graphs
The unsafety propogation graph(UPG) is a novel method to model the essential usage and encapsulation of unsafe code. UPG combines the traditional call graph with unsafe and dataflow information from Rust to capture the use and propagation of unsafe code across the project.

Within the UPG, there contains four major isolation types and nine structural patterns to split a UPG into several small self-contained subgraphs. These subgraphs called unsafety isolation graphs(UIGs) can serve as useful audit units for examining the soundness of unsafe code encapsulation.

We will continue to explore and investigate more effective applications of UIG in the encapsulation of unsafe code in our subsequent research.

**Before using this feature, make sure that `graphviz` is installed on your device**

## usage
Get into the same directory as cargo.toml and run the cmd below from the teminal. Then 'rap' will create a directory named 'UPG' in the same level, which contains several connected unsafety propogation graphs.
```
cargo rap -UI
```

## framework
The overall framework of this feature is consistent with rap's frontend framework. See the picture below for details.
![Framework of unsafe code propogation analysis.](figure/unsafe_code_propogation.png)
Binary file added src/figure/unsafe_code_propogation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 610be76

Please sign in to comment.