Clones in Logic Programs and How to Detect Them

Research output: Contribution in Book/Catalog/Report/Conference proceedingConference contribution

Abstract

In this paper, we propose a theoretical framework that allows us to capture, by program analysis, the notion of code clone in the context of logic programming. Informally, two code fragments are considered as cloned if they implement the same functionality. Clone detection can be advantageous from a software engineering viewpoint, as the presence of code clones inside a program reveals redundancy, broadly considered a “bad smell”. In the paper, we present a detailed definition of a clone in a logic program and provide an efficient detection algorithm able to identify an important subclass of code clones that could be used for various applications such as program refactoring and plagiarism recognition. Our clone detection algorithm is not tied to a particular logic programming language, and can easily be instantiated for different such languages.
Original languageEnglish
Title of host publicationLogic-Based Program Synthesis and Transformation
Subtitle of host publication21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers
DOIs
Publication statusPublished - 2012

Fingerprint

Logic programming
Computer programming languages
Redundancy
Software engineering

Keywords

  • logic programming languages
  • code clone
  • code duplication
  • clone detection algorithm

Cite this

Dandois, C., & Vanhoof, W. (2012). Clones in Logic Programs and How to Detect Them. In Logic-Based Program Synthesis and Transformation: 21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers https://doi.org/10.1007/978-3-642-32211-2_7
Dandois, Céline ; Vanhoof, Wim. / Clones in Logic Programs and How to Detect Them. Logic-Based Program Synthesis and Transformation: 21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers. 2012.
@inproceedings{f853e6dda18940bc98f8d792a52d228f,
title = "Clones in Logic Programs and How to Detect Them",
abstract = "In this paper, we propose a theoretical framework that allows us to capture, by program analysis, the notion of code clone in the context of logic programming. Informally, two code fragments are considered as cloned if they implement the same functionality. Clone detection can be advantageous from a software engineering viewpoint, as the presence of code clones inside a program reveals redundancy, broadly considered a “bad smell”. In the paper, we present a detailed definition of a clone in a logic program and provide an efficient detection algorithm able to identify an important subclass of code clones that could be used for various applications such as program refactoring and plagiarism recognition. Our clone detection algorithm is not tied to a particular logic programming language, and can easily be instantiated for different such languages.",
keywords = "logic programming languages, code clone, code duplication, clone detection algorithm, logic programming languages, code clone, code duplication, clone detection algorithm",
author = "C{\'e}line Dandois and Wim Vanhoof",
year = "2012",
doi = "10.1007/978-3-642-32211-2_7",
language = "English",
booktitle = "Logic-Based Program Synthesis and Transformation",

}

Dandois, C & Vanhoof, W 2012, Clones in Logic Programs and How to Detect Them. in Logic-Based Program Synthesis and Transformation: 21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers. https://doi.org/10.1007/978-3-642-32211-2_7

Clones in Logic Programs and How to Detect Them. / Dandois, Céline; Vanhoof, Wim.

Logic-Based Program Synthesis and Transformation: 21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers. 2012.

Research output: Contribution in Book/Catalog/Report/Conference proceedingConference contribution

TY - GEN

T1 - Clones in Logic Programs and How to Detect Them

AU - Dandois, Céline

AU - Vanhoof, Wim

PY - 2012

Y1 - 2012

N2 - In this paper, we propose a theoretical framework that allows us to capture, by program analysis, the notion of code clone in the context of logic programming. Informally, two code fragments are considered as cloned if they implement the same functionality. Clone detection can be advantageous from a software engineering viewpoint, as the presence of code clones inside a program reveals redundancy, broadly considered a “bad smell”. In the paper, we present a detailed definition of a clone in a logic program and provide an efficient detection algorithm able to identify an important subclass of code clones that could be used for various applications such as program refactoring and plagiarism recognition. Our clone detection algorithm is not tied to a particular logic programming language, and can easily be instantiated for different such languages.

AB - In this paper, we propose a theoretical framework that allows us to capture, by program analysis, the notion of code clone in the context of logic programming. Informally, two code fragments are considered as cloned if they implement the same functionality. Clone detection can be advantageous from a software engineering viewpoint, as the presence of code clones inside a program reveals redundancy, broadly considered a “bad smell”. In the paper, we present a detailed definition of a clone in a logic program and provide an efficient detection algorithm able to identify an important subclass of code clones that could be used for various applications such as program refactoring and plagiarism recognition. Our clone detection algorithm is not tied to a particular logic programming language, and can easily be instantiated for different such languages.

KW - logic programming languages

KW - code clone

KW - code duplication

KW - clone detection algorithm

KW - logic programming languages

KW - code clone

KW - code duplication

KW - clone detection algorithm

U2 - 10.1007/978-3-642-32211-2_7

DO - 10.1007/978-3-642-32211-2_7

M3 - Conference contribution

BT - Logic-Based Program Synthesis and Transformation

ER -

Dandois C, Vanhoof W. Clones in Logic Programs and How to Detect Them. In Logic-Based Program Synthesis and Transformation: 21st International Symposium, LOPSTR 2011, Odense, Denmark, July 18-20, 2011. Revised Selected Papers. 2012 https://doi.org/10.1007/978-3-642-32211-2_7