Skip to main content

An Algorithm for Sophisticated Code Matching in Logic Programs

  • Conference paper
Logic Programming (ICLP 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5366))

Included in the following conference series:

Abstract

In this work in progress, we develop a program analysis capable of efficiently detecting duplicated functionality within a logic program or a set of logic programs. Our main motivation is to provide an analysis that allows to automatically spot those locations in a program where a transformation could be applied that removes the duplication from the source code.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Fowler, M., Beck, K., Brant, J., Opdyke, W., Roberts, D.: Refactoring: Improving the Design of Existing Code. Objet Technology Series. Addison-Wesley, Reading (1999)

    Google Scholar 

  2. Serebrenik, A., Schrijvers, T., Demoen, B.: Improving Prolog programs: Refactoring for Prolog. Theory and Practice of Logic Programming 8(2), 201–215 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  3. Vanhoof, W.: Searching semantically equivalent code fragments in logic programs. In: Etalle, S. (ed.) LOPSTR 2004. LNCS, vol. 3573, pp. 1–18. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  4. Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms. In: String Processing and Information Retrieval, pp. 39–48. IEEE, Los Alamitos (2000)

    Google Scholar 

  5. Schleimer, S., Wilkerson, D., Aiken, A.: Winnowing: Local algorithms for document fingerprinting. In: Proceedings of the 2003 ACM SIGMOD international conference on Management of Data, San Diego, CA (2003)

    Google Scholar 

  6. Horwitz, S.: Identifying the semantic and textual differences between two versions of a program. ACM SIGPLAN Notices 25(6), 234–245 (1990)

    Article  Google Scholar 

  7. Yang, W.: Identifying syntactic differences between two programs. Software Practice and Experience 21(7), 739–755 (1991)

    Article  Google Scholar 

  8. Winstead, J., Evans, D.: Towards differential program analysis. In: Proceedings of the 2003 Workshop on Dynamic Analysis (2003)

    Google Scholar 

  9. Degrave, F., Vanhoof, W.: Towards a normal form for Mercury programs. In: King, A. (ed.) LOPSTR 2007. LNCS, vol. 4915, pp. 43–58. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Vanhoof, W., Degrave, F. (2008). An Algorithm for Sophisticated Code Matching in Logic Programs. In: Garcia de la Banda, M., Pontelli, E. (eds) Logic Programming. ICLP 2008. Lecture Notes in Computer Science, vol 5366. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-89982-2_77

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-89982-2_77

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-89981-5

  • Online ISBN: 978-3-540-89982-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics