How to make Prolog on terminal notice the new changes added to a Prolog source file?

Viewed 236

I open a SWI-Prolog through terminal with Swipl -s prolog_file . However, each time I add new facts to the Prolog source file and save, I have to restart SWI-Prolog on terminal to make it notice the changes.

I thought using CTRL + s on the Prolog source file is enough to let SWI-Prolog notice the changes but it doesn't.

On windows there is a Prolog editor with compile button, when you compile the file, SWI-Prolog will notice the changes, but I'm using Kali Linux, so I'm writing on text editor.

How can I make SWI-Prolog notice the changes ?

1 Answers

When you get the ?- prompt, type make.

This is a built-in in SWI, it can be simulated in SICStus.

For complex projects including a lot of preprocessing and modules this feature may not work.

Related