---
tags: comp-decomp
title: Getting started
---
# Overview
This document summarizes how to get started.
## Docker.
First off you need docker to access the containers.
1. Download the docker environment here: https://virginia.app.box.com/folder/165347824142?s=mmhimih7a9e4d5mk7yhn43ea4eyc5z3i
2. Run `source build.sh` in the directory
This should essentially install all docker containers. To run the docker container, use the following command:
```
docker run -it --rm -v ${PWD}:/code/decompiler py3.8 /bin/bash
```
The command should open container and link your current folder to the docker container.
Within the container run `cd decompiler` to find all files and folders in the directory from which you instantiated the docker container.
:::info
`py3.8` will open container with python 3.8 environment. You can change that in command to `py2.7`, `py3.6`, and `py3.7` for the respective python version.
:::
## Getting started:
Two scripts to quickly get started:
1. For database lookup:
```
./run_02_Database_lookup.sh
```
2. For mutation strategies:
```
./run_03_Mutation_Perturbation.sh
```
## Github repo (outdated)
The structure of the repo is as follows:

Link to github repo: https://github.com/aliahad97/py-synthesis
> Will need access. So ask me for it.
The following directories are as follows:
- `bin`: Contains all executable python code and the core of the implementation.
- `lib` : Consists of general lib functions.
- `test` : Consists of python source, bytecodes and human-readable disassemblies. It should have `compile.sh` file to recompile the two source files `initial.py` and `original.py`.
If you want to get your hands dirty, start from `bin/main.py`. Use the following command:
```
python bin/main.py --test
```
Try understanding the `main.py` to understand what is and what is not done. And also look into `bin/perturb_manually.py`.
```
python bin/perturb_manually.py
```
> You may need to read code to understand the interactive inputs.
## Other commands to help
Run uncompyle6:
```
uncompyle6 -o <outputfilename.py> <inputfilebytecode.pyc>
```
Run decompyle3:
```
decompyle3 -o <outputfilename.py> <inputfilebytecode.pyc>
```