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

Package "refactor"

Title:Refactoring Tools for SWI-Prolog
Rating:
(1/1)
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

Write a review or add a rating.

Great stuff! I managed to rewrite Ciao lpdoc documentation into PlDoc quite easily. It would be great to have some more documentation though!

Had to manually install the assertions pack.

Tuesday 13 July 2021, Jan Wielemaker

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.30901b90fb535479063a20bfac8f81d9a27718f491https://github.com/edisonm/refactor.git
0f5ecd9e7f509edddc64b9f5d95134ee00ae3a391https://github.com/edisonm/refactor.git
11612f5c6cf828d6c3ecb420af2dcdf3d362d3132https://github.com/edisonm/refactor.git
190b15c6e507a7490d31462766097247db74325d2https://github.com/edisonm/refactor.git
22ff1a0873dcb785e76fbc5aee596644cec19e411https://github.com/edisonm/refactor.git
23932efe2e653286d2415875fc727df24ecb999e2https://github.com/edisonm/refactor.git
241026a8d037805ab70b6642608ea31870e8d3751https://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
510cc3bf16e89a6eb9e726b1313457b998d248711https://github.com/edisonm/refactor.git
57cf29f8814a24f3d220648a2530cdbceb2517a41https://github.com/edisonm/refactor.git
738e77ee49caa95f07842af8cece5498775cb5812https://github.com/edisonm/refactor.git
761367eeca5989cd999c1873f615b00d978288cf1https://github.com/edisonm/refactor.git
7d86afc213d248323e371da782f86349fa7f88b61https://github.com/edisonm/refactor.git
83072f8bb852309416af5dd075974b9297fe97871https://github.com/edisonm/refactor.git
84463925008750981bb500b16c932f13110c70c51https://github.com/edisonm/refactor.git
948989572b301c7e1be6718fdaf21034d56ca6ef2https://github.com/edisonm/refactor.git
96aba7014ed9f4ebf537aba674195dcda88db7fb1https://github.com/edisonm/refactor.git
9e5b0b08aad212004402f6647ff5d9594c6966194https://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
f224c99dad7bb870014f6d0f2bea681659e892292https://github.com/edisonm/refactor.git
f4fa0f0d53c0e8f5f1b69d17772af7a53992434d1https://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 142 files holding a total of 255K bytes.