________________________________________________________________________

This file is part of Logtalk <https://logtalk.org/>  
SPDX-FileCopyrightText: 1998-2023 Paulo Moura <pmoura@logtalk.org>  
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
________________________________________________________________________


% create a GNU Prolog executable that includes the Logtalk compiler/runtime:

$ cd "$LOGTALKHOME/scripts/embedding/gprolog/"
$ ./gprolog_embed_logtalk.sh -c -d "$HOME"/collect -s none
$ ~/collect/logtalk


% create a GNU Prolog executable that includes the Logtalk compiler/runtime
% and the "searching" example:

$ cd "$LOGTALKHOME/scripts/embedding/gprolog/"
$ ./gprolog_embed_logtalk.sh -c -d "$HOME"/collect -l "$LOGTALKUSER/examples/searching/loader.lgt"
$ ~/collect/logtalk
| ?- farmer::initial_state(Initial), depth_first(10)::solve(farmer, Initial, Path), farmer::print_path(Path).


% create SWI-Prolog QLF files from the "spider" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/swipl/"
$ ./swipl_logtalk_qlf.sh -c -d "$HOME"/collect -l "$LOGTALKUSER/examples/adventure/spider.lgt"
$ cd ~/collect
$ swipl -g "[logtalk, application]"
?- spider::start.


% create a SWI-Prolog saved state from the "spider" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/swipl/"
$ ./swipl_logtalk_qlf.sh -c -x -d "$HOME"/collect -n spider -l "$LOGTALKUSER/examples/adventure/spider.lgt" -g "'::'(spider,start)"
$ ~/collect/spider


% create a SICStus Prolog pre-compiled version of the "sleepy" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/sicstus/"
$ ./sicstus_logtalk_po.sh -c -d "$HOME"/collect -l "$LOGTALKUSER/examples/adventure/sleepy.lgt"
$ cd ~/collect
$ sicstus --goal "load_files(['logtalk.po','application.po'])."
?- sleepy::start.


% create a SICStus Prolog saved state from the "sleepy" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/sicstus/"
$ ./sicstus_logtalk_po.sh -c -x -d "$HOME"/collect -n sleepy -l "$LOGTALKUSER/examples/adventure/sleepy.lgt" -g "'::'(sleepy,start)"
$ cd ~/collect
$ sicstus -r sleepy.sav


% create a YAP saved state from the "wumpus" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/yap/"
$ ./yap_logtalk_pl.sh -c -x -d "$HOME"/collect -n wumpus -l "$LOGTALKUSER/examples/adventure/wumpus.lgt" -g "'::'(wumpus,main)"
$ ~/collect/wumpus


% create XVM Prolog files for embedding the "wumpus" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/xvm/"
$ ./xvm_logtalk_pl.sh -c -d "$HOME"/collect -l "$LOGTALKUSER/examples/adventure/wumpus.lgt"
$ cd ~/collect/
$ xvmpl -f logtalk.pl -f application.pl
?- wumpus::main.


% create Trealla Prolog files for embedding the "wumpus" text adventure example:

$ cd "$LOGTALKHOME/scripts/embedding/trealla/"
$ ./trealla_logtalk_pl.sh -c -d "$HOME"/collect -l "$LOGTALKUSER/examples/adventure/wumpus.lgt"
$ cd ~/collect/
$ tpl -l logtalk.pl -l application.pl
?- wumpus::main.
