Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] "temporaryDomain=null" bug

Hi Enrico,

thanks a lot for the analysis. You only made a tiny mistake in your patch. It should be:

    public void reset(Variable sender) {
        if (sender == owner) {
            temporaryDomain = null;
        }
        clear(sender);       
    }

instead of

    public void reset(Variable sender) {
        clear(sender);       
        if (sender == owner) {
            temporaryDomain = null;
        }
    }

because clear(sender) will set owner=null.

It looks like this fixes the problem. I will do some more testing and commit the patch if everything is ok. Thanks again for your debugging.

Cheers,
Christian

On 06/14/2012 07:09 PM, Enrico Biermann wrote:
Hi,

In think I understand the problem, however I still have trouble fixing it:
The fixed variable was evaluated which reduced the temporary domains of the other slots.
The other slots where cleared after one of their instanciations failed (which also removed the temporary domain). The problem is that it also removed the restrictions of the fixed domain slot and the reinitialization of the other slots was completly free to assign any value to the domain slot.

The fix should be to distinguish between resetting the domain slots after a full graph match (including the temporary domain) and keeping the temporary domain during backtracking. However if I apply the patch, the CombBenchmark runs into its infinite loop again. I attached the patch which should have fixed the problem. Maybe someone else can have a look.

The basic goal is: Keep the temporary domain during backtracking, delete the temporary domain after you are done with the variables of a graph.

Cheers,
Enrico

On 13.06.2012 14:19, Christian Krause wrote:
Hi Enrico,

I think I know what is going on. It seems like that partial matches (or "prematches") are destroyed by the "temporaryDomain=null". I attached an example where this occurs (execute it in the java2statemachine folder). If you enable the "temporaryDomain=null" you will get for every partial match always the set of *all* matches, which should not be the case (compare with the version without "temporaryDomain=null"). Can you fix this?

Cheers,
Christian


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top