xsb-users

 [Xsb-users] Tabling dynamic predicates From: K. A. - 2012-06-08 17:00:26 ```Greetings, I have a question regarding the combination of tabling with dynamic predicates. It seems that the point of a dynamic predicate p is to be able to change the definition of p on the fly. For instance, I may start with only two facts: p(a). p(b). so initially findall(X,p(X),Results) will return Results = [a,b]. Later, however, I might load some further fact(s) about p, e.g.: p(c). After that point I will expect findall(X,p(X),Results) to return Results = [a,b,c]. However, if I have tabled p, then this second invocation of findall(X,p(X),Results) will *again* return Results = [a,b], which seems incorrect (as it's not picking up the newly added c). In my case, I want to table p, but in such a way that each time a new batch of information comes in about p, that information should be taken into account properly in answering subsequent queries, i.e., in a sense, the tabling of p should start from scratch at that point. Is there any easy way to do that? Thanks, Konstantine ```
 Re: [Xsb-users] Tabling dynamic predicates From: K. A. - 2012-06-08 17:18:31 ```Please disregard this question. I just got hip on abolish_table_pred and the whole notion of incremental tabling. :) Thanks, K. --- On Fri, 6/8/12, K. A. wrote: > From: K. A. > Subject: [Xsb-users] Tabling dynamic predicates > To: xsb-development@... > Cc: xsb-users@... > Date: Friday, June 8, 2012, 1:00 PM > Greetings, > > I have a question regarding the combination of tabling > with dynamic predicates. It seems that the point of > a dynamic predicate p is to be able to change the > definition > of p on the fly. For instance, I may start with only two > facts: > > p(a). > p(b). > > so initially findall(X,p(X),Results) will return > Results = [a,b]. Later, however, I might load some > further fact(s) about p, e.g.: > > p(c). > > After that point I will expect findall(X,p(X),Results) > to return Results = [a,b,c]. However, if I have > tabled p, then this second invocation of > findall(X,p(X),Results) > will *again* return Results = [a,b], which seems incorrect > (as it's not picking up the newly added c). > > In my case, I want to table p, but in such a way > that each time a new batch of information comes in > about p, that information should be taken into > account properly in answering subsequent queries, > i.e., in a sense, the tabling of p should start from > scratch at that point. Is there any easy way to do that? > Thanks, > > Konstantine > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's > security and > threat landscape has changed and how IT managers can > respond. Discussions > will include endpoint security, mobile security and the > latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Xsb-users mailing list > Xsb-users@... > https://lists.sourceforge.net/lists/listinfo/xsb-users > ```