blob: ab99d4b264a262d9175763547b21d8edfbfb29a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# Program Analysis Example
This directory contains code for the Sifter demos presented in our Onward!
2020 paper. You can run the examples from the root of the Sifter repository
like
so:
```bash
bazel run examples/program_analysis:program_understanding
bazel run examples/program_analysis:transform_learning
bazel run examples/program_analysis:api_migration
```
Each example will run, then prompt you to visit `http://localhost:8001` in a
web browser which will show the result.
#### Files
* `program_understanding.py`: Section 3.1 demonstration of comparative program
understanding.
* `transform_learning.py`: Section 3.2 demonstration of learning to generalize
a program optimization.
* `api_migration.py`: Section 3.3 demonstration of learning to generalize
API migration examples.
* `lazy_structure.py`: Classes to interface between source code files and
triplet structures.
* `analyzelib.py`: Helper methods and tactics for the demos.
* `ui/`: Interactive UI for displaying the result of the analogy-making
demonstrations.
|