1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    2%
    3% FILE: lib/er1-actions.pl
    4%
    5%    WRITTEN BY: Sebastian Sardina (ssardina@cs.toronto.edu)
    6%    Time-stamp: <03/05/04 12:47:48 ssardina>
    7%    TESTED    : ECLiPSe 5.4 on RedHat Linux 6.2-7.2
    8%    TYPE CODE : system independent predicates 
    9%
   10% DESCRIPTION: mapping between ER1 low-level actions and ER1 IndiGolog actions
   11%
   12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   13%
   14%                             July 9, 2002
   15%
   16% This software was developed by the Cognitive Robotics Group under the
   17% direction of Hector Levesque and Ray Reiter.
   18%
   19%        Do not distribute without permission.
   20%        Include this notice in any copy made.
   21%
   22%
   23%         Copyright (c) 2000 by The University of Toronto,
   24%                        Toronto, Ontario, Canada.
   25%
   26%                          All Rights Reserved
   27%
   28% Permission to use, copy, and modify, this software and its
   29% documentation for non-commercial research purpose is hereby granted
   30% without fee, provided that the above copyright notice appears in all
   31% copies and that both the copyright notice and this permission notice
   32% appear in supporting documentation, and that the name of The University
   33% of Toronto not be used in advertising or publicity pertaining to
   34% distribution of the software without specific, written prior
   35% permission.  The University of Toronto makes no representations about
   36% the suitability of this software for any purpose.  It is provided "as
   37% is" without express or implied warranty.
   38% THE UNIVERSITY OF TORONTO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
   39% SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
   40% FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF TORONTO BE LIABLE FOR ANY
   41% SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
   42% RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
   43% CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
   44% CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   45% 
   46%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   47%
   48% The following definition of constants are provided:
   49%
   50% -- actionNum(ER1-HighLevelAction, ER1-LowLevelAction)
   51%
   52%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   53% type_prolog(swi).
   54% set_debug_level(_).
   55% report_message(A,B):-writeq(report_message(A,B)),nl.
   56%:- ensure_loaded('lib/common').
   57
   58% load_device(Env, Command, Address)
   59:-multifile(load_device/3).   60:-multifile(device_manager/4).   61
   62:-use_module(library(process)).   63
   64:- current_prolog_flag(windows,true)->
   65   setenv('PATH_INDIGOLOG','t:/devel/logicmoo/src_modules/indigolog');
   66   setenv('PATH_INDIGOLOG','/devel/logicmoo/src_modules/indigolog').   67
   68user:file_search_path(library,ATLIB):-getenv('PATH_INDIGOLOG',AT),atom_concat(AT,'/lib',ATLIB).
   69user:file_search_path(indigolog,AT):-getenv('PATH_INDIGOLOG',AT).
   70
   71win_fork(G,SERVIO,PID):-atom_concat('swipl-win.exe ',G,AC),writeq(win_fork(AC,SERVIO)),nl,
   72      win_exec(AC,showdefault),PID = 0.
   73
   74% win_fork(" -t  start -f t:/devel/logicmoo/src_incoming/indigolog/Env/env_wumpus.pl 
   75%  host=localhost port=47853  debug=1 ipwumpus=127.0.0.1 portwumpus=9002 ppits=10 nogolds=1 size=8 idrun='indigolog(default)' idscenario='random' ; exit").
   76%
   77
   78
   79:- current_prolog_flag(windows,true)->
   80   asserta((fork(G):-win_fork(G)));
   81   use_module(library(unix)).   82
   83:- use_module(eclipse_swi).   84%:- ensure_loaded('common').
   85:- ensure_loaded(tools_swi).   86
   87% fork(G):-writeq(fork(G)),nl.
   88
   89% type_prolog(swi).
   90 %set_debug_level(_).
   91 %report_message(A,B):-writeq(report_message(A,B)),nl.
   92
   93%Load the TCP Library
   94/*
   95:- use_module(library(socket)).
   96%:- use_module(library(unix)).
   97:-use_module(library(system)).
   98:- use_module(library(readutil)).
   99:-use_module(library(listing)).
  100:- use_module(library(shell)).
  101:- use_module(library(shlib)).
  102:- use_module(library(url)).
  103:- use_module(library(quintus)).
  104:- use_module(library(qsave)).
  105:- use_module(library(sgml)).
  106:- use_module(library(occurs)).
  107%:-use_module(library(rdf)).
  108*/