Semantic code browsing

被引:5
|
作者
Garcia-Contreras, Isabel [1 ]
Morales, Jose F. [1 ]
Hermenegildo, Manuel V. [1 ,2 ]
机构
[1] IMDEA Software Inst, Madrid, Spain
[2] Tech Univ Madrid UPM, Sch Comp Sci, Madrid, Spain
关键词
Semantic Code Search; Abstract Interpretation; Assertions; CONSTRAINT LOGIC PROGRAMS; ABSTRACT INTERPRETATION; SYSTEM; CIAO;
D O I
10.1017/S1471068416000417
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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.
引用
收藏
页码:721 / 737
页数:17
相关论文
共 50 条
  • [21] Image browsing:: Semantic analysis of NNk networks
    Heesch, D
    Rüger, S
    IMAGE AND VIDEO RETRIEVAL, PROCEEDINGS, 2005, 3568 : 609 - 618
  • [22] Designing for semantic access: a video browsing system
    GMD - Integrated Publication and, Information Systems Inst , Darmstadt, Germany
    Int Conf Multimedia Comput Syst Proc, (394-399):
  • [23] Magpie: Experiences in supporting semantic web browsing
    Dzbor, Martin
    Motta, Enrico
    Domingue, John
    JOURNAL OF WEB SEMANTICS, 2007, 5 (03): : 204 - 222
  • [24] Semantic Browsing of Sound Databases without Keywords
    Lafay, Gregoire
    Misdariis, Nicolas
    Lagrange, Mathieu
    Rossignol, Mathias
    JOURNAL OF THE AUDIO ENGINEERING SOCIETY, 2016, 64 (09): : 628 - 635
  • [25] Designing for semantic access: a video browsing system
    Silvia H.
    Everts A.
    Thiel U.
    Multimedia Tools and Applications, 2000, 11 (3) : 281 - 293
  • [26] SEMANTIC CODE TODAY
    MELTON, JL
    AMERICAN DOCUMENTATION, 1962, 13 (02): : 176 - &
  • [27] Exploiting semantic annotation to supporting user browsing on the web
    Jung, Jason J.
    KNOWLEDGE-BASED SYSTEMS, 2007, 20 (04) : 373 - 381
  • [28] Extracting and visualizing semantic structures in retrieval results for browsing
    Borner, Katy
    Proceedings of the ACM International Conference on Digital Libraries, 2000, : 234 - 235
  • [29] CONFOTO: Browsing and annotating conference photos on the Semantic web
    Nowack, Benjamin
    JOURNAL OF WEB SEMANTICS, 2006, 4 (04): : 263 - 266
  • [30] User profiling for semantic browsing in medical digital libraries
    Kostkova, Patty
    Diallo, Gayo
    Jawaheer, Gawesh
    SEMANTIC WEB: RESEARCH AND APPLICATIONS, PROCEEDINGS, 2008, 5021 : 827 - 831