Eloy Retamino wrote: > Hello, I'd like your advice in the next error. I'm trying to compile an > interpreter of golog > (http://www.cs.toronto.edu/cogrobo/main/systems/index.html), it's > intented to be a language for programming agents and it's written for > eclipse prolog. The question is that when I compile it in eclipse 5.10 > everything goes fine, but in 6.0 a receve the next compilation error: > > unimplemented functionality in set_flag(all_dynamic, on) > ERROR: gologinterpreter.pl:40: > Query exited (abort): :- set_flag(all_dynamic, on) > > I've been looking around and it seems that predicate is not implemented > in 6.0, but I don't know what it's for and what happens if I supress it. > Could someone help me? As far as I can tell from a brief look at the code, the all_dynamic directive is used only because there are a few predicates with non-consecutive clauses. Remove these two old directives: :- dynamic(proc/2). /* Compiler directives. Be sure */ :- set_flag(all_dynamic, on). /* that you load this file first! */ and replace them with: :- discontiguous(primitive_action/1). :- discontiguous(proc/2). :- discontiguous(poss/2). :- discontiguous(holds/2). :- discontiguous(restoreSitArg/3). > > I'm also not sure about the best way of using this interpreter. It's > thinked for writting programs in this "dialect" based on situation > calculus and executing them on prolog. So, should I compile both the > interpreter and the program everytime I load a program written in golog? > I've tried to load it as a module, but eclipse tells me that there is no > module in the file. I haven't explore yet how it works the modules > structure, maybe they have to have an special syntaxis. It is not designed for modules. The way it is written, you should always compile interpreter and program together. A simple way to do that is to put your own program into a separate file, and include the interpreter at the start of that file, using :- include(gologinterpreter). The ECLiPSe 6.0 compiler will also generate a number of "Singleton variable" warnings on this code - these are ok. You can suppress them using :- pragma(nowarnings). % at the beginngin of gologinterpreter.pl Cheers, JoachimReceived on Sun Jul 17 2011 - 10:42:21 CEST
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET