Skip to content

Tabling access through parameterized objects #171

Answered by pmoura
yrashk asked this question in Q&A
Discussion options

You must be logged in to vote

The issue here is that the message sender is a different term when you give a different parameter (e.g. tab1(0) and tab1(1)). The sender is part of the implicit execution context and that difference means that one table will be constructed fro which different sender. Solving this issue would require the backend Prolog implementation of tabling to provide a solution to ignore the implicit execution context argument when constructing the table. But that solution doesn't exist currently.

A workaround is to send tabled predicate messages from a non-parametric objects. E.g.

:- object(tab1(_X)).

	:- public(test/0).
	test :- {tab1::test}.

:- end_object.

As you mentioned, moving the tabled pred…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@yrashk
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by yrashk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants