state_space asserts and retracts dynamic predicates from other module

Description

I am not sure, if it is a good idea to do cross module asserts/retracts.

Beside that I am not sure if this is correct (line 573 ff):

transfer_state_packing_info :- retract(stored_value(X,Y)),
assert(state_packing:stored_value(X,Y)),fail.

Shouldn't this be retract(state_packing:stored_value(X,Y)) ?

Environment

None

Gliffy Diagrams

Activity

Show:

Jens Bendisposto July 28, 2015 at 7:25 PM

Jens Bendisposto July 28, 2015 at 7:23 PM

Probably importing won't solve the problem. I guess we have to fix that in the analysis, so I'm closing this ticket.

Jens Bendisposto July 28, 2015 at 4:44 PM

Yes, maybe. It was just infolog complaining that it cannot find the definition when loading and it's not declared as dynamic in this module. Maybe we should explicitly import the dynamic facts from state_packing?

Michael Leuschel July 28, 2015 at 4:29 PM

The code is correct. It relates to reading in stored state space information, which has to be read in some context and is then asserted into the appropriate modules.
One could think about a more elegant way of achieving this; but I am not sure it is worth the effort.

Won't Fix

Details

Assignee

Reporter

Priority

Created July 28, 2015 at 11:30 AM
Updated July 28, 2015 at 7:25 PM
Resolved July 28, 2015 at 7:23 PM