From Low-Level Pointers to High-Level Containers
Kamil Dudka, Luk\'a\v{s} Hol\'ik, Petr Peringer, Marek Trt\'ik,, Tom\'a\v{s} Vojnar

TL;DR
This paper introduces a method to automatically convert low-level pointer manipulations in C programs into high-level container operations, improving understandability and analysis suitability.
Contribution
It presents a novel approach that transforms annotated C code with shape invariants into high-level container operation code, enhancing program analysis capabilities.
Findings
Successful implementation and testing on list-based containers
Improved program analysis by separating shape and data analysis
Enhanced code understandability and maintainability
Abstract
We propose a method that transforms a C program manipulating containers using low-level pointer statements into an equivalent program where the containers are manipulated via calls of standard high-level container operations like push_back or pop_front. The input of our method is a C program annotated by a special form of shape invariants which can be obtained from current automatic shape analysers after a slight modification. The resulting program where the low-level pointer statements are summarized into high-level container operations is more understandable and (among other possible benefits) better suitable for program analysis. We have implemented our approach and successfully tested it through a number of experiments with list-based containers, including experiments with simplification of program analysis by separating shape analysis from analysing data-related properties.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Software Engineering Research · Logic, programming, and type systems
