eMoflon / emoflon-neo

A Neo4j-based implementation of eMoflon
Eclipse Public License 2.0
6 stars 2 forks source link

Missing Corrs when combining rules with refinement and relabelling #294

Closed anthonyanjorin closed 4 years ago

anthonyanjorin commented 4 years ago

Hi Max,

in the attached zip there's a project with a tgg bag2bag. The abstract triple rule AddElement is used repeatedly to create more complex rules. Things seem to work in general, but the corr in AddElement is somehow not being repeated during the relabelling and refinement process. As corrs do not have names I'm not even sure if this is really a "bug"... but it is sort of undesirable how this corr seems to disappear.

Could you please take a look and tell me what you think? Would this be easy to fix?

problem.zip

Cheers and thanks, Tony

anthonyanjorin commented 4 years ago

A related problem: if you try to add the missing corrs manually, the proxy variables are flagged as being erroneous. I think this just requires a fix to a validation rule:

tripleRule HandleTwoElements : bag2bag ->
    HandleElement, 
    AddElement, 
    AddElement[selt1 -> selt2] {
    target {
        ++ telt:Element {
            .multiplicity := 2
        }
    }
    correspondence {
        ++ $selt2 <- :Elt2Elt -> telt
    }   
}