forked from amespi22/code_rewrite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (35 loc) · 1.9 KB
/
README
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Copyright (C) 2022 Pemma Reiter and Antonio Espinoza, Center for Biocomputing, Security and Society at ASU
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
# README
The file, set_env.sh is only used if you need to re-generate the grammar files.
## If you need to regenerate the grammar files:
- Make sure to setup the environment
- `source set_env.sh`
- Make the python files.
- `antlr4 -Dlanguage=Python3 <GRAMMARFILE>`
- This all assumes that you have antlr4 properly installed.
## File Naming
- Please name your generated files `new_<filename>.c`.
- The .gitignore file will ignore all things named in this way.
## To run PREP evaluation on CodeFlaws:
- `source ./set_env.sh`
- Install the APR tools looking to evaluate with Codeflaws
- cd $CODE_EXPAND_PATH/prep-eval/Codeflaws
- `source ./setup.bash` which
1. Clones the Codeflaws dataset from git
2. Generates infrastructure to evaluate both original and PREP-enabled APR tool results
3. Applies PREP-transforms to this dataset and tests each transform
4. Copies baseline and PREP scripts for Codeflaws run and validation.
- To evaluate PREP on Codeflaws
1. As a user, you need to install GenProg, f1x, and Prophet
2. And then manually update 'run-version*.sh' scripts to account for these tool paths in the `codeflaws_repo/all-script/` subdirectory
-