Skip to content
PCART Bot edited this page Apr 23, 2026 · 9 revisions

PCART Wiki

Welcome to the PCART documentation!

What is PCART?

PCART is an automated tool designed to detect and repair Python API parameter compatibility issues. It is the first to achieve a fully automated process (end-to-end) that includes API extraction, code instrumentation, mapping, compatibility analysis, and repair and validation. PCART specializes in addressing API compatibility issues arising from parameter addition, removal, renaming, reordering, and the conversion of positional parameters to keyword parameters.

Features

  • Fully Automated: End-to-end automation from API extraction to repair validation
  • Comprehensive Detection: Detects 10 types of parameter change types
  • Multi-Platform: Supports Linux and Windows
  • Multi-Library: Works with PyTorch, NumPy, SciPy, Pillow, scikit-learn, and more

Supported Parameter Change Types

Dictionary Key Type Name Description Support
delete Deletion Parameter removed ✅ Full
typeChange Type Change Parameter type altered ⚠️ Partial
rename Renaming Parameter name changed ✅ Full
posChange Position Change Parameter position altered ✅ Full
replace Replacement Parameter replaced at same position ✅ Full
pos2key Positional to Keyword Positional-only changed to keyword-only ✅ Full
addPos Add Positional New positional parameter added ✅ Full
addKey Add Keyword New keyword parameter added ✅ Full
key2pos Keyword to Positional Keyword changed to positional ✅ Full
value Default Value Change Parameter default value changed ❌ Not implemented

Total: 10 parameter change types

⚠️ Note: typeChange only checks if the old type is identical to or a subset of the new type for complex annotations (Union/Optional/|).

Quick Navigation

Architecture

PCART uses a three-environment architecture:

Environment Purpose Requirements
PCART Runs the PCART tool itself Python 3.9 + dill
currentEnv Dynamic API signature mapping for current library version Python 3.x + library (current version) + dill
targetEnv Dynamic API signature mapping and post-repair validation for target library version Python 3.x + library (target version) + dill

Citation

If you use PCART in your research, please cite:

@article{PCART_TSE2025,
  author={Zhang, Shuai and Xiao, Guanping and Wang, Jun and Lei, Huashan and He, Gangqiang and Liu, Yepang and Zheng, Zheng},
  journal={IEEE Transactions on Software Engineering},
  title={PCART: Automated Repair of Python API Parameter Compatibility Issues},
  year={2026},
  volume={52},
  number={3},
  pages={723-753},
  doi={10.1109/TSE.2025.3646150}
}

Links

Clone this wiki locally