Menu

#171 SSBN#turnArgumentsForMFrag fails when MFrag has 2 input nodes referencing same resident node

closed
nobody
1
2016-02-03
2015-09-20
No

The method "public boolean turnArgumentsForMFrag(MFrag mFrag)" of "unbbayes.prs.mebn.ssbn.SSBN" is not considering cases when there is an MFrag with 2 or more input nodes referencing the same resident node. When this method is called, the arguments of the SSBN node will be set like if the SSBN node was instantiated only from one of the input nodes, never from the other input nodes.

Because of this, for the child (especially during LPD compilation) it looks like only one of the input node was instantiated (because the arguments of the other input node is not referenced in SSBN#turnArgumentsForMFrag).

For example, if an MFrag has a resident node caled Resident(x,y), with two parents (input nodes) called Parent(x) and Parent(y) (i.e. they are 2 input nodes, but they represent the same resident node in another MFrag), then SSBN#turnArgumentsForMFrag will cause all the parents of Resident(x,y) to be instances of Parent(x), and never of Parent(y) (or vice-versa).

Like previously stated, this is a problem especially when the LPD script of the child (Resident(x,y)) is written in a way that it makes strict distinction between the probability distribution given states (or combination of states) of Parent(x) and Parent(y), because if all parents' instances are virtually from Parent(x), then all declarations referencing Parent(y) will fail (thus, the LPD script will not generate the desired probability distribution).

See attached file. By running a debugger, loading the ontology (and the PLM file) and querying Location(N1), you'll see that parents of NodeDistance(N1,N2) will be instances only of IsLocatedIn(n1,r1), never from IsLocatedIn(n2,r2) (or vice-versa).

1 Attachments

Discussion

  • Shou Matsumoto

    Shou Matsumoto - 2015-12-10

    I'm including a much simpler ontology which can be used to verify the problem.

     
  • Laecio Lima dos Santos

    • status: open --> closed
     

Log in to post a comment.