We passed Occam's razor on a few "features" of Prolog that are obsolete in modern programming environments and on some others that are, in our opinion, bad software practice.
Only one file at a time can be compiled in the interactive environment:
?-[myfile].
or
?- compile(myfile).
Now BinProlog supports an include directive:
:-[include1]. :-[include2]. ....
This suggest to make a project (*.pro)
file using a set of
include directives each refereing to a *.pl
file.
When compiled to a file (by using the
?-make(MyProject)
command) a make-like memoing facility will avoid useless recompilation
of the included (*.pl)
files by creation of precompiled
(*.pl_wam)
files. For large projects this is the recommended technique.
Creation of C-ified standalone files is also possible
(see the pl2c
directory).
New programs can be loaded in the interactive environment. When they
work well, they migrate to the kernel. You can prepare a good Makefile
to do the job of ensure_loaded
of other Prolog's. When everything is OK you can deliver it as a run-time-only application.
Programs are searched with suffixes "", ".pl", ".pro" in the directories ., ./progs and ./myprogs.
There's no limit on the number of files you can compile to disk:
?- compile(wam,[file1,file2,...],'application.bp').
Now BinProlog does implement consult/1, reconsult/1 and listing/0 for interpreted code but use of compile/1 is highly recommended instead. See the file extra.pl for the implementation. Faster than asserted code is so called assumed code (see the next sections) i.e. intuitionistic and linear implication.
?- interactive(no).
?- interactive(yes).