-
Notifications
You must be signed in to change notification settings - Fork 7
Home
Welcome to the PCART documentation!
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.
- 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
| Dictionary Key | Type Name | Description | Support |
|---|---|---|---|
delete |
Deletion | Parameter removed | ✅ Full |
typeChange |
Type Change | Parameter type altered | |
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:typeChangeonly checks if the old type is identical to or a subset of the new type for complex annotations (Union/Optional/|).
- Quick-Start: Get started with PCART in 5 minutes
- Configuration-Guide: Complete configuration file reference
- Troubleshooting: Common issues and solutions
- Examples: Real-world usage examples
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 |
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}
}