{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2023,1,11]],"date-time":"2023-01-11T20:15:21Z","timestamp":1673468121583},"reference-count":27,"publisher":"Cambridge University Press (CUP)","issue":"2","license":[{"start":{"date-parts":[[2008,3,1]],"date-time":"2008-03-01T00:00:00Z","timestamp":1204329600000},"content-version":"unspecified","delay-in-days":0,"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":[[2008,3]]},"abstract":"<jats:title>Abstract<\/jats:title><jats:p><jats:italic>Refactoring<\/jats:italic> is an established technique from the object-oriented (OO) programming community to restructure code: it aims at improving software readability, maintainability, and extensibility. Although refactoring is not tied to the OO-paradigm in particular, its ideas have not been applied to logic programming until now. This paper applies the ideas of refactoring to Prolog programs. A catalogue is presented listing refactorings classified according to scope. Some of the refactorings have been adapted from the OO-paradigm, while others have been specifically designed for Prolog. The discrepancy between intended and operational semantics in Prolog is also addressed by some of the refactorings. In addition, <jats:monospace>ViPReSS<\/jats:monospace>, a semi-automatic refactoring browser, is discussed and the experience with applying <jats:monospace>ViPReSS<\/jats:monospace> to a large Prolog legacy system is reported. The main conclusion is that refactoring is both a viable technique in Prolog and a rather desirable one.<\/jats:p>","DOI":"10.1017\/s1471068407003134","type":"journal-article","created":{"date-parts":[[2007,5,23]],"date-time":"2007-05-23T17:29:04Z","timestamp":1179941344000},"page":"201-215","source":"Crossref","is-referenced-by-count":7,"title":["Improving Prolog programs: Refactoring for Prolog"],"prefix":"10.1017","volume":"8","author":[{"given":"ALEXANDER","family":"SEREBRENIK","sequence":"first","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"TOM","family":"SCHRIJVERS","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"BART","family":"DEMOEN","sequence":"additional","affiliation":[],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"56","published-online":{"date-parts":[[2008,3,1]]},"reference":[{"key":"S1471068407003134_ref4","unstructured":"Fowler M. 2003. Refactorings in alphabetical order. URL: http:\/\/www.refactoring.com\/catalog\/. Accessed April 2, 2007."},{"key":"S1471068407003134_ref3","doi-asserted-by":"publisher","DOI":"10.1109\/6294.846201"},{"key":"S1471068407003134_ref1","unstructured":"1995. Information Technology\u2014Programming Languages\u2014Prolog\u2014Part 1: General Core. ISO\/IEC. ISO\/IEC 13211-1:1995."},{"key":"S1471068407003134_ref26","unstructured":"van Vliet, H. 2000. Software Engineering: Principles and Practice, 2nd ed. John Wiley & Sons."},{"key":"S1471068407003134_ref25","unstructured":"Tourw\u00e9 T. and Mens T. 2003. Identifying refactoring opportunities using logic meta programming. In 7th European Conference on Software Maintenance and Reengineering, Proceedings. IEEE Computer Society, 91\u2013100."},{"key":"S1471068407003134_ref27","unstructured":"Vanhoof W. 2004. Searching semantically equivalent code fragments in logic programs. In Logic-based Program Synthesis and Transformation. 14th International Workshop, LOPSTR 2004, Verona, Italy, August 26\u201328, 2004, Pre-Proceedings, Etalle S. , Ed. 1\u201318."},{"key":"S1471068407003134_ref11","first-page":"83","volume-title":"Proceedings of the 6th International Workshop on Logic Program Synthesis and Transformation","author":"Leuschel","year":"1996"},{"key":"S1471068407003134_ref20","unstructured":"Pitkow J. and Pirolli P. 1999. Mining longest repeating subsequences to predict World Wide Web surfing. In 2nd USENIX Symposium on Internet Technologies and Systems, Boulder, CO, 1\u201312."},{"key":"S1471068407003134_ref21","first-page":"253","article-title":"A refactoring tool for {S}malltalk","volume":"3","author":"Roberts","year":"1997","journal-title":"Theory and {P}ractice of {O}bject{S}ystems ({TAPOS})"},{"key":"S1471068407003134_ref2","unstructured":"Crow D. and Smith B. 1992. DB_HABITS: Comparing minimal knowledge and knowledge-based approaches to pattern recognition in the domain of user\u2013computer interactions. In Neural Networks and Pattern Recognition in Human\u2013Computer Interaction, Beale R. and Finley J. , Eds. Horwood Ellis , 39\u201363."},{"key":"S1471068407003134_ref19","doi-asserted-by":"publisher","DOI":"10.1145\/361598.361623"},{"key":"S1471068407003134_ref14","first-page":"61","article-title":"Maintaining the competitive edge","volume":"36","author":"Moad","year":"1990","journal-title":"Datamation"},{"key":"S1471068407003134_ref5","unstructured":"Fowler M. , Beck K. , Brant J. , Opdyke W. and Roberts D. 1999. Refactoring: Improving the design of existing code. Object Technology Series. Addison-Wesley."},{"key":"S1471068407003134_ref6","doi-asserted-by":"crossref","unstructured":"Garrido A. and Johnson R. 2003. Refactoring C with conditional compilation. In 18th IEEE International Conference on Automated Software Engineering, Kirchner H. & Ringeissen C. , Eds. IEEE, 323\u2013326.","DOI":"10.1109\/ASE.2003.1240330"},{"key":"S1471068407003134_ref7","first-page":"1255","volume-title":"Computational Logic \u2013 CL 2000, First International Conference, London, UK, July 2000, Proceedings","author":"Hermenegildo","year":"2000"},{"key":"S1471068407003134_ref24","unstructured":"Steinke D. 2003. Refactoring von Logischen {P}rogrammen. M.S. thesis, Universit\u00e4t Rostock. URL: http:\/\/e-lib.informatik.uni-rostock. http:\/\/de\/fulltext\/2003\/diploma\/ http:\/\/SteinkeDirk-2003.ps.gz. Accessed September 20, 2006."},{"key":"S1471068407003134_ref8","unstructured":"Intelligent Systems Laboratory. 2003a. Quintus Prolog User's Manual. P.O. Box 1263, SE-164 29 Kista, Sweden."},{"key":"S1471068407003134_ref9","unstructured":"Intelligent Systems Laboratory. 2003b. SICStus Prolog User's Manual. P.O. Box 1263, SE-164 29 Kista, Sweden."},{"key":"S1471068407003134_ref10","unstructured":"IT Masters. 2000. MasterProLog Programming Environment. URL: http:\/\/www.itmasters.com. Accessed September 19, 2006."},{"key":"S1471068407003134_ref12","doi-asserted-by":"crossref","unstructured":"Li H. , Reinke C. and Thompson S. 2003. Tool support for refactoring functional programs. In Haskell Workshop 2003, Jeuring J. , Ed. Association for Computing Machinery.","DOI":"10.1145\/871895.871899"},{"key":"S1471068407003134_ref13","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2004.1265817"},{"key":"S1471068407003134_ref17","volume-title":"The {C}raft of {P}rolog","author":"O'Keefe","year":"1994"},{"key":"S1471068407003134_ref18","unstructured":"Opdyke W. F. 1992. Refactoring Object-Oriented Frameworks. Ph.D. thesis, University of Illinois at Urbana\u2013Champaign."},{"key":"S1471068407003134_ref22","unstructured":"Schrijvers T. , Serebrenik A. and Demoen B. 2003.Refactoring {P}rolog Programs. Tech. Rep. CW 373, Department of Computer Science, Katholieke Universiteit Leuven, Leuven, Belgium."},{"key":"S1471068407003134_ref23","unstructured":"Seipel D. , Hopfner M. and Heumesser B. 2003. Analysing and visualizing {P}rolog programs based on {XML} representations. In Proceedings of the 13th International Workshop on Logic Programming Environments, Mesnard F. & Serebrenik A. , Eds. 31\u201345. Published as technical report {CW}371 of {K}atholieke {U}niversiteit {L}euven."},{"key":"S1471068407003134_ref15","first-page":"45","article-title":"Applying complexity measures to rule-based Prolog programs","volume":"44","author":"Moores","year":"1998","journal-title":"The {J}ournal of {S}ystems and {S}oftware"},{"key":"S1471068407003134_ref16","doi-asserted-by":"publisher","DOI":"10.1002\/smr.4360020303"}],"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\/S1471068407003134","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2019,4,1]],"date-time":"2019-04-01T15:09:26Z","timestamp":1554131366000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S1471068407003134\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2008,3]]},"references-count":27,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2008,3]]}},"alternative-id":["S1471068407003134"],"URL":"https:\/\/doi.org\/10.1017\/s1471068407003134","relation":{},"ISSN":["1471-0684","1475-3081"],"issn-type":[{"value":"1471-0684","type":"print"},{"value":"1475-3081","type":"electronic"}],"subject":[],"published":{"date-parts":[[2008,3]]}}}