Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Matching

Hi Christian.


the rules should be designed in such a way that a match is not applicable anymore after the rule application. Otherwise the loop won't terminate in your set up.

Yes, I know this. In my setting, a rule is applicable to a number of matches. The meta model is: A <--1..1 ----- 0..* --> B. The instance consists of several As (a1, ..., an) and several Bs (b1, ..., bm). The rule creates links between the ai and bj. However, each time the rule matches to node bm such that each ai is linked to bm and no other bj is linked to any ai ;-(

By default, the pattern matcher is deterministic. You can change this behavior programmatically by setting the option Engine.OPTION_DETERMINISTIC = false.

Thank you for this explanation. Setting this option (engine.getOptions().put(Engine.OPTION_DETERMINISTIC, false);) solves the problem ;-)

Best regards,
Thorsten
--
Dipl.-Inf. Thorsten Arendt, Dr. rer. nat.
Philipps-Universität Marburg
Fachbereich Mathematik und Informatik
Hans-Meerwein-Str.
D-35032 Marburg
Office: 05D18
Phone : +49-6421-2821540
Email : arendt@xxxxxxxxxxxxxxxxxxxxxxxxx
--

Back to the top