-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bef681d
commit ac7bb65
Showing
26 changed files
with
13,345 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,68 @@ | ||
# PyCRE | ||
Conflict-aware Inference of Python Compatible Runtime Environments with Domain Knowledge Graph, ICSE 2022 | ||
|
||
## Dependencies | ||
|
||
This project is developed using Python 3.6.9 on Ubuntu 18.04 LTS. | ||
|
||
| Name | Version | | ||
| -------------- | ------- | | ||
| Docker | 20.10.8 | | ||
| Docker Compose | 1.23.2 | | ||
|
||
## Python Package Knowledge Graph | ||
We have opened our knowledge graphs in [releases](https://github.com/nju-websoft/PyCRE/releases). If you need to create a new knowledge graph, follow the instructions below: | ||
|
||
First, you need to install Neo4j 4.1.1 and its required Java version (Java SE 11). | ||
|
||
Install extra Python dependencies: | ||
|
||
``` | ||
pip install -r build_KG/requirements.txt | ||
``` | ||
|
||
Automatically acquire knowledge and build KG for specific Python packages: | ||
|
||
``` | ||
python build_KG/run.py <packages_file> <neo4j_HOME> <Python_version> | ||
``` | ||
|
||
Load data from CSV files into an unused Neo4j database and dump the database into a single-file archive: | ||
|
||
``` | ||
./build_KG/data/Pythonxxx/csv-data/run.sh | ||
NEO4J_HOME/bin/neo4j-admin dump --database=neo4j --to=neo4j.dump | ||
``` | ||
|
||
## Inference | ||
|
||
Move the dump files to the specific folder: | ||
|
||
``` | ||
mv py2.dump py3.dump docker_env/neo4j | ||
``` | ||
|
||
Build the docker images and start the deamon service: | ||
|
||
``` | ||
cd docker_env | ||
./build_images.sh | ||
docker-compose up --detach | ||
``` | ||
|
||
Install extra Python dependencies: | ||
|
||
``` | ||
pip install -r bin/requirements.txt | ||
``` | ||
|
||
Compile [CryptoMiniSat SAT solver](https://github.com/msoos/cryptominisat). | ||
|
||
Then you can use PyCRE to infer a compatible runtime environment to a Python code: | ||
|
||
``` | ||
python bin/run.py <snippet_path> <dependencies_dir> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
docker | ||
neo4j | ||
packaging |
Oops, something went wrong.