Mining library specifications using inductive logic programming

Sriram Sankaranarayanan, Franjo Ivančić, Aarti Gupta

Research output: Chapter in Book/Report/Conference proceedingConference contribution

27 Scopus citations


Software libraries organize useful functionalities in order to promote modularity and code reuse. A typical library is used by client programs through an application programming interface (API) that hides its internals from the client. Typically, the rules governing the correct usage of the API are documented informally. In many cases, libraries may have complex API usage rules and unclear documentation. As a result, the behaviour of the library under some corner cases may not be well understood by the programmer. Formal specifications provide a precise understanding of the API behaviour. We propose a methodology for learning interface specifications using Inductive Logic Programming (ILP). Our technique runs several unit tests on the library in order to generate relations describing the operation of the library. The data collected from these tests are used by an inductive learner to obtain rich Datalog/Prolog specifications. Such specifications capture essential properties of interest to the user. They may be used for applications such as reverse engineering the library internals or constructing checks on the application code to enforce proper API usage along with other properties of interest.

Original languageEnglish (US)
Title of host publicationICSE'08
Subtitle of host publicationProceedings of the 30th International Conference on Software Engineering 2008
Number of pages10
StatePublished - 2008
Event30th International Conference on Software Engineering 2008, ICSE'08 - Leipzig, Germany
Duration: May 10 2008May 18 2008

Publication series

NameProceedings - International Conference on Software Engineering
ISSN (Print)0270-5257


Other30th International Conference on Software Engineering 2008, ICSE'08

All Science Journal Classification (ASJC) codes

  • Software


  • Datalog
  • Inductive logic programming
  • Machine learning
  • Software specification
  • Verification


Dive into the research topics of 'Mining library specifications using inductive logic programming'. Together they form a unique fingerprint.

Cite this