Download corpus following csv files before excuting any script in this folder.
./run.sh
shows a whole process of data reproduction, but please read through this document ahead of running it for how to use every script in a separated way.
Clang has to be installed, you can follow the doc. But make install
is needed after make
.
./tool-build.sh
Auxiliary tools include:
- a function prototype extractor
- a lexical tool
For direct use, you can use ./function_prototype/build/function-prototype file
and ./token_processor/build/token-processor file
respectively, but we automate this in other scripts.
The path of Python source that you want to extract API from should be given in python-path.txt
.
python3 pycapi.py
For comparing between two given release versions (functions defined in macro not included):
python3 pycapi_comp.py ../data/python/Python-3.7.0.capi.dat ../data/python/Python-3.6.0.capi.dat
You must install cloc.
The path of projects that you want to analyse should be given in corpus-path.txt
, and lines start with '#' will be ignored.
python3 base_statistic.py
For some special projects, we do this in an exhaustive way.
python3 base_statistic_ex.py
Using data generated in last step (base_statistic), you can do some advanced analysis.
python3 api_statistic.py
Check whether a project used some Python/C API out of given version of Python, provided by data generated in step before (pycapi).
python3 api_check.py ../data/PyAudio-0.2.11.capi.dat ../data/python/Python-3.7.0.capi.dat