swipl: how to reload file
11,333
Solution 1
SWI-Prolog has a predicate make/0 for this purpose:
?- make.
Note that SWI-Prolog has a handy feature for searching the manual for keywords:
?- apropos(reload).
Points you (among other things) to Section 3.3 of the manual: "The test-edit-reload cycle", which mentions this.
Solution 2
Make will reload all source files that have been changed since they were loaded, but if you need to reload an specific file you can use reload_file:
?- make:reload_file(source_file).
Related videos on Youtube
Author by
Rahn
Updated on June 04, 2022Comments
-
Rahn 7 monthsFirst I load the file with
SWI-Prolog$ swipl file.plthen I modify the file and save.
Now how do I reload the file like
?- reloadfor this modified
file.pl?