{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,9,29]],"date-time":"2025-09-29T08:19:34Z","timestamp":1759133974644},"reference-count":19,"publisher":"Cambridge University Press (CUP)","issue":"5-6","license":[{"start":{"date-parts":[[2016,10,14]],"date-time":"2016-10-14T00:00:00Z","timestamp":1476403200000},"content-version":"unspecified","delay-in-days":43,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Theory and Practice of Logic Programming"],"published-print":{"date-parts":[[2016,9]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p>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 <jats:italic>semantic<\/jats:italic> 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.<\/jats:p>","DOI":"10.1017\/s1471068416000417","type":"journal-article","created":{"date-parts":[[2016,10,15]],"date-time":"2016-10-15T17:28:20Z","timestamp":1476552500000},"page":"721-737","source":"Crossref","is-referenced-by-count":5,"title":["Semantic code browsing"],"prefix":"10.1017","volume":"16","author":[{"given":"ISABEL","family":"GARC\u00cdA-CONTRERAS","sequence":"first","affiliation":[]},{"given":"JOS\u00c9 F.","family":"MORALES","sequence":"additional","affiliation":[]},{"given":"MANUEL V.","family":"HERMENEGILDO","sequence":"additional","affiliation":[]}],"member":"56","published-online":{"date-parts":[[2016,10,14]]},"reference":[{"key":"S1471068416000417_ref4","first-page":"599","volume-title":"Proc. of ICLP'94","author":"Gallagher","year":"1994"},{"key":"S1471068416000417_ref8","first-page":"848","volume-title":"Proceedings of the 34th International Conference on Software Engineering","author":"McMillan","year":"2012"},{"key":"S1471068416000417_ref14","first-page":"234","volume-title":"Program Development in Computational Logic","author":"Puebla","year":"2004"},{"key":"S1471068416000417_ref7","doi-asserted-by":"publisher","DOI":"10.1109\/32.83915"},{"key":"S1471068416000417_ref18","volume-title":"16th Int'l. ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP'14)","author":"Stulova","year":"2014"},{"key":"S1471068416000417_ref10","first-page":"49","volume-title":"International Conference on Logic Programming (ICLP 1991)","author":"Muthukumar","year":"1991"},{"key":"S1471068416000417_ref19","first-page":"102","volume-title":"SAS'02","author":"Vaucheret","year":"2002"},{"key":"S1471068416000417_ref9","first-page":"27","article-title":"Hoogle overview","volume":"12","author":"Mitchell","year":"2008","journal-title":"The Monad.Reader"},{"key":"S1471068416000417_ref6","doi-asserted-by":"publisher","DOI":"10.1017\/S1471068411000457"},{"key":"S1471068416000417_ref1","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(91)80001-T"},{"key":"S1471068416000417_ref17","first-page":"173","volume-title":"Proceedings of the Eighth International Conference on Logic Programming","author":"Rollins","year":"1991"},{"key":"S1471068416000417_ref2","first-page":"131","volume-title":"International Conference CL 2000","author":"Cabeza","year":"2000"},{"key":"S1471068416000417_ref11","doi-asserted-by":"publisher","DOI":"10.1016\/0743-1066(92)90035-2"},{"key":"S1471068416000417_ref13","doi-asserted-by":"publisher","DOI":"10.1007\/10720327_16"},{"key":"S1471068416000417_ref16","first-page":"243","volume-title":"Proceedings of the 31st International Conference on Software Engineering","author":"Reiss","year":"2009"},{"key":"S1471068416000417_ref3","doi-asserted-by":"publisher","DOI":"10.1145\/512950.512973"},{"key":"S1471068416000417_ref15","first-page":"279","article-title":"Abstract multiple specialization and its application to program parallelization.","volume":"41","author":"Puebla","year":"1999","journal-title":"J. of Logic Programming. Special Issue on Synthesis, Transformation and Analysis of Logic Programs"},{"key":"S1471068416000417_ref12","doi-asserted-by":"publisher","DOI":"10.1007\/10722311_2"},{"key":"S1471068416000417_ref5","doi-asserted-by":"publisher","DOI":"10.1016\/j.scico.2005.02.006"}],"container-title":["Theory and Practice of Logic Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S1471068416000417","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2019,4,18]],"date-time":"2019-04-18T20:35:58Z","timestamp":1555619758000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068416000417\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2016,9]]},"references-count":19,"journal-issue":{"issue":"5-6","published-print":{"date-parts":[[2016,9]]}},"alternative-id":["S1471068416000417"],"URL":"https:\/\/doi.org\/10.1017\/s1471068416000417","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"value":"1471-0684","type":"print"},{"value":"1475-3081","type":"electronic"}],"subject":[],"published":{"date-parts":[[2016,9]]}}}