Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.87 KB

README.md

File metadata and controls

66 lines (41 loc) · 1.87 KB

How to reproduce the data

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.

Build the auxiliary tools

Clang has to be installed, you can follow the doc. But make install is needed after make.

./tool-build.sh

Auxiliary tools include:

  1. a function prototype extractor
  2. 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.

Python/C API evolution with Python versions

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

Identify interface files, LOC and API extraction

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

API statistic

Using data generated in last step (base_statistic), you can do some advanced analysis.

python3 api_statistic.py

API check

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