From: Jeff H. <he...@cs...> - 2001-01-02 22:39:13
|
Hello, I have been playing with XSB for a while a now, and have discovered some things that seem odd to me, and which might be bugs in XSB. For reference, I am using XSB v. 2.2 on Solaris 2.6. 1) I cannot consult a program which contains a dynamic clause and individual facts about the same predicate. For example, the program below: :- dynamic(p/1). p(a). p(b). results in the error "++Error: Not permitted to assert to static predicate p/1." However, if I load the same program with load_dyn, it works fine. Of course a work-around is to use assert for the facts, but I'd rather not clutter my program with them, or to load the program with load_dyn, but this won't work with what I want to do because of Issue #3 below. 2) I cannot use assert and ordinary clauses in the same program. For example, when I consult the program below: :- assert(r(a)). r(b). I get the message "++Error: Not permitted to assert to static predicate r/1." I load it with load_dyn, then it loads fine, but doesn't return the right answers, i.e., the query r(X) returns only b as its binding. Even stranger, if I reverse the order of the clauses in the program, using load_dyn WILL return the correct answers (a and b) for the query. 3) I can't use auto_table in a program loaded with load_dyn. For example, when I load the following program with load_dyn: :- auto_table. s(X,Z) :- s(X,Y), s(Y,Z). s(a,b). s(b,c). s(a,d). s(d,e) I get the error "++Error: Undefined predicate: auto_table / 0," although it loads fine with consult. Furthermore, if I replace the auto_table with ":- table s/2", then load_dyn works okay. So, if tabling works with load_dyn, then why isn't the auto_table predicate recognized? Could someone please tell me if these are bugs or features? If they are bugs, when might patches be available? Thank you! Jeff Heflin University of Maryland, College Park |