Share

IRIS - Integrated Rule Inference System

Tracker: Bugs

5 Extra rules generated by magic sets algorithm. - ID: 2840953
Last Update: Tracker Item Submitted ( bazbishop237 )

The magic sets optimisation of the following program;

triple(?y, ?a, ?z) :- triple(?x, '88', ?y), triple(?x, ?a, ?z),
NOT_EQUAL(?a, '88'), NOT_EQUAL(?x, ?y).
triple(?z, ?a, ?y) :- triple(?x, '88', ?y), triple(?z, ?a, ?x),
NOT_EQUAL(?a, '88'), NOT_EQUAL(?x, ?y).
?- triple('184', ?p, ?o).

includes the production of rules that can never fire:

label_xXx_prefix_xXx_triple_2_fbf(?a) :-
magic_xXx_prefix_xXx_triple_fbf(?a).
triple(?y, ?a, ?z) :- magic_xXx_prefix_xXx_triple_fbf(?a), triple(?x, '88',
?y), triple(?x, ?a, ?z), NOT_EQUAL(?a, '88'), NOT_EQUAL(?x, ?y).
label_xXx_prefix_xXx_triple_1_fbf(?a) :-
magic_xXx_prefix_xXx_triple_fbf(?a).
triple(?z, ?a, ?y) :- magic_xXx_prefix_xXx_triple_fbf(?a), triple(?x, '88',
?y), triple(?z, ?a, ?x), NOT_EQUAL(?a, '88'), NOT_EQUAL(?x, ?y).

because predicate magic_xXx_prefix_xXx_triple_fbf does not appear anywhere
else.

The algorithm should not generate these unnecessary rules.


baz bishop ( bazbishop237 ) - 2009-08-20 09:50

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.