ConfigTuneX: Interpretable Configuration Optimization for Static Program Verification via Rule-Based and Counterfactual Reasoning
This repository contains implementation results for the ConfigTuneX as described in the following paper:
Paper: Interpretable Configuration Optimization for Static Program Verification via Rule-Based and Counterfactual Reasoning
- ConfigTuneX: Interpretable Configuration Optimization for Static Program Verification via Rule-Based and Counterfactual Reasoning
- Table of Contents
- ConfigTuneX
- Prerequisites
- Usage
ConfigTuneX, a novel rule-based machine learning approach that optimizes configuration settings in static program verification tools through composite FOLD-SE rules. Artifacts for the results can be downloaded from here
This application is written for Python=3.11.10. All requirements are listed in requirements.txt, and they are installed by pip with the following command.
pip install -r requirements.txtNext, you will have to download the artifacts (configtunex_artifact.tgz) from here and decompress it with the following command.
tar -xvzf configtunex_artifact.tgz- Go to the directory
{PROJ_DIR}/src/python/tools/jayhorn - Open
jayhornbash file - At line 20, replace
/home/jason/projects/satunewith{PROJ_DIR}/
- Go to the directory
{PROJ_DIR}/src/python/tools/cbmc - Open
cbmcbash file - At lines 3, 14, 20, replace
/home/jason/projects/satunewith{PROJ_DIR}/
- Go to the directory
{PROJ_DIR}/src/python/tools/cbmc - Open
cbmcbash file - At line 178, replace
/home/jason/projects/satunewith{PROJ_DIR}/
No need to change path for executing it.
This step is to generate FOLD-SE composite rules. The rules are generated with the following command:
cd configtunex_artifact
python -m src.python.main \
--run foldse_sota_composite \
--asp_method foldseOutput after running the command are in the result directories of {PROJ_DIR}/_results/satune/foldse_sota_ver_composite/rf/{TOOL_NAME}.
For each verification tool and its result directory, the following files are generated:
_results/
|- satune/foldse_sota_ver_composite/rf/{TOOL_NAME}/
| |- foldse_fp_fn_model_raw_2labels_{FOLD_NUM}.txt
| |- foldse_fp_fn_rules_raw_2labels_{FOLD_NUM}.json
| |- foldse_unk_model_raw_2labels_{FOLD_NUM}.txt
| |- foldse_unk_rules_raw_2labels_{FOLD_NUM}.json
Where {TOOL_NAME} and {FOLD_NUM} represent name of verification tool and an index of fold of test data, respectively.
-
The
foldse_fp_fn_model_raw_2labels_{FOLD_NUM}.txtcontains features of the FOLD-SE rules for incorrect-outcome result. -
The
foldse_fp_fn_rules_raw_2labels_{FOLD_NUM}.jsoncontains FOLD-SE rules for incorrect-outcome result in json format. -
The
foldse_unk_model_raw_2labels_{FOLD_NUM}.txtcontains features of the FOLD-SE rules for unresolved result. -
The
foldse_unk_rules_raw_2labels_{FOLD_NUM}.jsoncontains FOLD-SE rules for unresolved result in json format.
This step is to run ConfigTuneX. Over verification tools (JayHorn, CBMC, JBMC and Symbiotic) You can run it by executing the following command:
cd configtunex_artifact
python -m src.python.main \
--run configtunex_composite_rules_{TOOL_NAME} \
--asp_method foldseOutput files in the result directories (the result directories of {PROJ_DIR}/_results/configtunex/rf/compositerules are the following:
_results/
|- configtunex/rf/compositerules/
| |- foldse_{TOOL_NAME}_2labels_{FOLD_NUM}/
| | |- execution_log_{FOLD_NUM}.txt
| | |- execution_results_{FOLD_NUM}.csv
| | |- rf_label_encoders.pkl
| | |- rf_model_summray.json
| | |- rf_model.pkl
| | |- rf_test_accuracy.txt
| | |- scasp_output/
| | | |- scasp_output_{CKSUM}.txt
| | |- scasp_script
| | | |- scasp_{CKSUM}.plWhere {TOOL_NAME}, {FOLD_NUM} and {CKSUM} represent name of verification tool, an index of fold of test data and the checksum value of a input program in test data, respectively.
- The
execution_log_{FOLD_NUM}.txtcontains log of running ConfigTuneX. - The
execution_results_{FOLD_NUM}.csvcontains execution results of verification tool using ConfigTuneX. - The
rf_model.pklis random forest model used to evaluate counterfactual configurations generated by the composite FOLD-SE rules. - The
rf_model_summray.jsoncontains performance summary of the random forest model. - The
rf_label_encoders.pklis encoder model for the random forest model. - The
rf_test_accuracy.txtcontains test accuracy of the random forest model. - The
scasp_output/scasp_output_{CKSUM}.txtcontains execution results of s(CASP) code for a specific input program. - The
scasp_script/scasp_{CKSUM}.plis s(CASP) code for a specific input program to generate counterfactual configurations.
The results of running verification tool using ConfigTuneX are at the directory {PROJ_DIR}/_results/configtunex/rf/compositerules/foldse_{TOOL_NAME}_2labels_{FOLD_NUM}/