Semantic code browsing
From MaRDI portal
Abstract: Programmers currently enjoy access to a very high number of code repositories and libraries of ever increasing size. The ensuing potential for reuse is however hampered by the fact that searching within all this code becomes an increasingly difficult task. Most code search engines are based on syntactic techniques such as signature matching or keyword extraction. However, these techniques are inaccurate (because they basically rely on documentation) and at the same time do not offer very expressive code query languages. We propose a novel approach that focuses on querying for semantic characteristics of code obtained automatically from the code itself. Program units are pre-processed using static analysis techniques, based on abstract interpretation, obtaining safe semantic approximations. A novel, assertion-based code query language is used to express desired semantic characteristics of the code as partial specifications. Relevant code is found by comparing such partial specifications with the inferred semantics for program elements. Our approach is fully automatic and does not rely on user annotations or documentation. It is more powerful and flexible than signature matching because it is parametric on the abstract domain and properties, and does not require type definitions. Also, it reasons with relations between properties, such as implication and abstraction, rather than just equality. It is also more resilient to syntactic code differences. We describe the approach and report on a prototype implementation within the Ciao system. Under consideration for acceptance in TPLP.
Recommendations
Cites work
- scientific article; zbMATH DE number 1615263 (Why is no real title available?)
- scientific article; zbMATH DE number 1696792 (Why is no real title available?)
- scientific article; zbMATH DE number 1948391 (Why is no real title available?)
- A practical framework for theabstract interpretation of logic programs
- Abstract multiple specialization and its application to program parallelization
- An overview of Ciao and its design philosophy
- Compile-time derivation of variable dependency using abstract interpretation
- Integrated program debugging, verification, and optimization using abstract interpretation (and the Ciao system preprocessor)
Cited in
(7)- CScout: a refactoring browser for C
- Predicting program properties from ``big code
- Symbolic automata for representing big code
- Automatic derivation of domain terms and concept location based on the analysis of the identifiers
- scientific article; zbMATH DE number 2086749 (Why is no real title available?)
- Computing abstract distances in logic programs
- Fifty Years of Prolog and Beyond
This page was built for publication: Semantic code browsing
Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q4593054)