Book Details

Logic Based Program Synthesis and Transformation (vol. # 3573)

Publication year: 2005

ISBN: 978-3-540-31683-1

Internet Resource: Please Login to download book


In this work, we devise an analysis that searches for semantically equivalent code fragments within a given logic program. The presence of duplicated code (or functionality) is a primary indication that the design of the program can be improved by performing a so-called refactoring transformation. Within the framework of our analysis, we formally characterize three situations of duplicated functionality and their associated refactorings: the extraction of a duplicated goal into a new predicate, the removal of equivalent predicates and the generalization of two predicates into a higher-order predicate. The resulting analysis detects in a completely automatic way what program fragments are suitable candidates for the considered refactoring transformations.


Subject: Computer Science, computational logic, constraint programming, formal methods, functional programming, imperative programming, logic, logic program manipulation, logic programming, program analysis, program syntesis, program transformation, program verification, programming theor, semantics, verification