Code sharing and reuse is a widespread use practice in software engineering. Although a vast amount of open-source Python code is accessible on many online platforms, programmers often find it difficult to restore a successful runtime environment. Previous studies validated automatic inference of Python dependencies using pre-built knowledge bases. However, these studies do not cover sufficient knowledge to accurately match the Python code and also ignore the potential conflicts between their inferred dependencies, thus resulting in a low success rate of inference. In this paper, we propose PyCRE, a new approach to automatically inferring Python compatible runtime environments with domain knowledge graph (KG). Specifically, we design a domain-specific ontology for Python third-party packages and construct KGs for over 10,000 popular packages in Python 2 and Python 3. PyCRE discovers candidate libraries by measuring the matching degree between the known libraries and the third-party resources used in target code. For the NP-complete problem of dependency solving, we propose a heuristic graph traversal algorithm to efficiently guarantee the compatibility between packages. PyCRE achieves superior performance on a real-world dataset and efficiently resolves nearly half more import errors than previous methods.
PCREQ: Automated Inference of Compatible Requirements for Python Third-party Library Upgrades
Nanjing University of Aeronautics and Astronautics(南京航空航天大学);Nanjing University(南京大学);Southern University of Science and Technology(南方科技大学);Beihang University(北京航空航天大学)
Concurrent model synchronization is the task of restoring consistency between two correlated models after they have been changed concurrently and independently. To determine whether such concurrent model changes conflict with each other and to resolve these conflicts taking domain- or user-specific preferences into account is highly challenging. In this paper, we present a framework for concurrent model synchronization algorithms based on Triple Graph Grammars (TGGs). TGGs specify the consistency of correlated models using grammar rules; these rules can be used to derive different consistency …
On the worldwide web, not only are webpages connected but source code is too. Software development is becoming more accessible to everyone and the licensing for software remains complicated. We need to know if software licenses are being maintained properly throughout their reuse and evolution. This motivated the development of the Sourcerer's Apprentice, a webservice that helps track clone relicensing, because software typically employ software licenses to describe how their software may be used and adapted. But most developers do not have the legal expertise to sort out license conflicts. In…
Co-Evolution of Types and Dependencies: Towards Repository-Level Type Inference for Python Code
Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所软件工程中心);Key Laboratory of System Software (Chinese Academy of Sciences), Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所系统软件重点实验室)
EZInput: A Cross-Environment Python Library for Easy UI Generation in Scientific Computing
Instituto de Tecnologia Química e Biológica António Xavier, Universidade Nova de Lisboa(里斯本新大学安东尼奥·阿瓦罗化学与生物理工学院);Faculty of Science and Engineering, Cell Biology, Åbo Akademi University(奥布学术院科学与工程学院细胞生物学系);InFLAMES Research Flagship Center, University of Turku(图卢大学InFLAMES旗舰研究中心);Turku Bioscience Centre, University of Turku and Åbo Akademi University(图卢大学生物科学中心(图卢大学与奥布学术院联合));Foundation for the Finnish Cancer Institute(芬兰癌症研究所基金会);UCL Laboratory for Molecular Cell Biology, University College London(伦敦大学学院分子细胞生物学实验室)