Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "refactor"

Title:Refactoring Tools for SWI-Prolog
Rating:Not rated. Create the first rating!
Latest version:0.0.3
SHA1 sum:ffae25b6abe091fc9a8df54aa4a0af6b80a002cf
Author:Edison Mera Menendez http://www.edisonm.com/
Maintainer:Edison Mera Menendez http://www.edisonm.com/
Packager:Edison Mera Menendez http://www.edisonm.com/
Home page:https://github.com/edisonm/refactor
Download URL:https://github.com/edisonm/refactor.git
Requires:xlibrary
xtools

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.0.209e98519abb88ea6e7c2fad12d1d0ad8ea4293101https://github.com/edisonm/refactor.git
1027056ab13cc0607bd7fab3d2c2cbc0dccda1c51https://github.com/edisonm/refactor.git
10b1ebef4c7f9b0f75be7642eda37bf2a2aebebe1https://github.com/edisonm/refactor.git
1602d14c75dde0e0acce455abab822bfdaffac561https://github.com/edisonm/refactor.git
1996dbbf67c733075f48804185d47ae406ee928a1https://github.com/edisonm/refactor.git
1f726c65a9a063b5c10ee16a3bd1e266974d60f92https://github.com/edisonm/refactor.git
3b58ad0a453bf120feb422ba3dac9abb2157b3fd2https://github.com/edisonm/refactor.git
551e11896a3fe2a7e3224177277857a0535923de1https://github.com/edisonm/refactor.git
5f911e50cf41e91bebe626c6517fbac3a68a415c1https://github.com/edisonm/refactor.git
6c05b6318444cf3fee84589df066c37ca003a0d11https://github.com/edisonm/refactor.git
8518f54474a4625b99fc0134ef6d29325c37274d2https://github.com/edisonm/refactor.git
85b986ef461a32fa774e60a9ef2297d07f7ea2a51https://github.com/edisonm/refactor.git
bd607e78e481d0ce9d2257160a43f19c9ebcaa662https://github.com/edisonm/refactor.git
bde8495daf43c84d09cc66f7cb8586ca37c02c451https://github.com/edisonm/refactor.git
c21416045a74237456c04b0ef1aae0016883555f1https://github.com/edisonm/refactor.git
ccca58945bcd812f47b262a22070d85cd11e52951https://github.com/edisonm/refactor.git
f16019ef26161ee5f436828537da22ad9f6532c21https://github.com/edisonm/refactor.git
fa2eabcab73d36ca4f8ac7d6f2a3dd3bdeacb8c22https://github.com/edisonm/refactor.git
0.0.322ff1a0873dcb785e76fbc5aee596644cec19e411https://github.com/edisonm/refactor.git
3577663e93a7d10e0c2288530679532c284aeeb31https://github.com/edisonm/refactor.git
3cdfb68976d43f688a0ea762978a72073788581e5https://github.com/edisonm/refactor.git
3d84e38abc2c8cdd11beaf2eb31fb44b7b8de7c12https://github.com/edisonm/refactor.git
497e78359ed51b778634af03228673a1b6e3672c1https://github.com/edisonm/refactor.git
4f7da0583c48b1771b8cdf9bbd29235da866acaf1https://github.com/edisonm/refactor.git
503f3c8e06c3bdae4f4f2a189794b2d57400bdad2https://github.com/edisonm/refactor.git
57cf29f8814a24f3d220648a2530cdbceb2517a41https://github.com/edisonm/refactor.git
738e77ee49caa95f07842af8cece5498775cb5812https://github.com/edisonm/refactor.git
761367eeca5989cd999c1873f615b00d978288cf1https://github.com/edisonm/refactor.git
83072f8bb852309416af5dd075974b9297fe97871https://github.com/edisonm/refactor.git
948989572b301c7e1be6718fdaf21034d56ca6ef2https://github.com/edisonm/refactor.git
96aba7014ed9f4ebf537aba674195dcda88db7fb1https://github.com/edisonm/refactor.git
a5f9332dbc4b992784c34484096a8a9ce2be03932https://github.com/edisonm/refactor.git
acc9bdc44889d86eaff3a074007bd19595d285f01https://github.com/edisonm/refactor.git
bfb61314a67fe2c93b15e6335420f827bbdf23bc1https://github.com/edisonm/refactor.git
c4ef4ecfe28851de2f20eddcd1e43f5f26b9ba7b3https://github.com/edisonm/refactor.git
cf5b94ba03b2ef37caf83d22a96f91a2c07017791https://github.com/edisonm/refactor.git
ddc154f96073de53c82b949d52ab40a940979bbd2https://github.com/edisonm/refactor.git
ec2c0d7b12297558a54ce7ee0592760433fce1f81https://github.com/edisonm/refactor.git
fc807f48b637e659d628bfe37da9e83ac7dbdabe1https://github.com/edisonm/refactor.git
ffae25b6abe091fc9a8df54aa4a0af6b80a002cf1https://github.com/edisonm/refactor.git

refactor

Refactoring Tools for SWI-Prolog

Installation

To install the refactoring tools, just follow the next sequence of commands in your SWI-Prolog shell:

  $ swipl
  
  ?- pack_install('https://github.com/edisonm/refactor.git').
  true.

Usage

Although this library lacks documentation, due its alfa status and still changing, there are some tests in tests/refactor.plt where you can see useful examples about its usage. Some examples follows:

?- cd(tests).
true.

?- ['refactor.plt'].
% refactor.plt compiled 0.04 sec, 526 clauses
true.

?- run_tests.
% All 43 tests passed
true.
?- rreset.
true.

?- replace_term(a(B),aa(B),[module(conjex)]), rshow.
% Reading tests/conjex.pl
% 3 changes in tests/conjex.pl
% Saved changes in index 1
--- conjex.pl (source)
+++ conjex.pl (target)
@@ -1,15 +1,15 @@
 :- module(conjex, [conjex/0]).
 
 conjex :-
-    a(C),
+    aa(C),
     b(b),
     c(C),
     d(d).
 conjex :-
-    a(a),
+    aa(a),
     b(b).
 
-a(_).
+aa(_).
 b(_).
 c(_).
 d(_).
true.

Papers

Edison Mera, Jan Wielemaker: Porting and refactoring Prolog programs: the PROSYN case study. TPLP 13(4-5-Online-Supplement) (2013) http://journals.cambridge.org/downloadsup.php?file=/tlp2013003.pdf

Contents of pack "refactor"

Pack contains 75 files holding a total of 221K bytes.