Bug 415931 - add scoped conflict set support for EVM
Summary: add scoped conflict set support for EVM
Status: RESOLVED FIXED
Alias: None
Product: Viatra
Classification: Modeling
Component: Query (show other bugs)
Version: oldinquery   Edit
Hardware: PC Windows 8
: P3 normal
Target Milestone: M3   Edit
Assignee: Abel Hegedus CLA
QA Contact: Istvan Rath CLA
URL:
Whiteboard:
Keywords:
Depends on: 403825 412018
Blocks: 415869
  Show dependency tree
 
Reported: 2013-08-27 05:00 EDT by Abel Hegedus CLA
Modified: 2014-04-03 10:51 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abel Hegedus CLA 2013-08-27 05:00:17 EDT
In order to support transformation development, the EVM should allow the creation of conflict sets that only include the activations of selected rules. Such conflict sets are used for adding As-long-as-possible and similar execution primitives.
Comment 1 Abel Hegedus CLA 2013-08-27 05:08:49 EDT
This is now supported similarly to the global conflict set of the agenda:
- the user provides a conflict resolver and a set of rule specification-filter pairs in a multimap (RuleEngine.createConflictingActivationSet)
- the rule engine creates a conflict set and a wrapper class that stores the conflict set, the multimap and the listener that is used for updating the contents of the confict set (the listener is registered with the rule instances)
- the user can access the activations through the wrapper (ConflictingActivationSet.getNextActivation)
- the wrapper can be disposed which will remove the listeners from the rule instances

Note: the naming of the participating classes and methods are not final, suggestions are welcome.
Comment 2 Zoltan Ujhelyi CLA 2013-08-27 05:47:14 EDT
The implementation seems nice, but I don't like the naming. As the goal of this is to fire a subset of the rules similar to firing all enabled rules, I would suggest the naming should also reflect this, instead of the conflict-handling nature of the code.

What about RuleEngine.orderRuleSpecifications for the method name and using OrderedActivationSet as the implementation class name, and IOrderedActivationSet for the interface?



Additional question: is the conflict resolver strictly required for EVM? I think, it would make sense to re-use the default resolver (or just keep it unspecified) for this reason, and a shorthand method would be nice.
Comment 3 Gabor Bergmann CLA 2013-08-27 06:05:00 EDT
I think the rule systems terminology is "conflict set", not "conflicting activation set" - it's also much shorter.

> OrderedActivationSet 

I don't like this, ordering is just one possible way of conflict resolution

> orderRuleSpecifications 

I like this even less; the rule specifications do not have to be ordered, even when their activations are.

> Additional question: is the conflict resolver strictly required for EVM? I think, it would make sense to re-use the default resolver (or just keep it unspecified) for this reason, and a shorthand method would be nice.

I'm not sure I get the question - do you mean that EVM by default should not have a global conflict set (only store activation states), and that all conflict sets (even if they are not scoped for a limited set of rules) should be created on-demand instead?
Comment 4 Abel Hegedus CLA 2013-08-27 09:37:36 EDT
- Conflict resolution related classes moved to their own package
- ConflictSet provides methods like nextActivation and getConflictResolver
- ChangeableConflictSet provides the methods add/removeActivation towards the Agenda
- ScopedConflictSet is a conflictSet for a given list of rule specifications and filters.
- ScopedConflictSet is created with RuleEngine.createScopedConflictSet methods (currently only one shorthand for one rule, one filter is given, which uses the resolver of the agenda)
Comment 5 Istvan Rath CLA 2013-09-12 06:17:18 EDT
Pushing to 0.8,assigning to Abel.
Comment 6 Istvan Rath CLA 2014-04-03 10:47:11 EDT
Moving simpler issues to 0.8-M3. please discuss if feasible, or needs to be pushed to future.
Comment 7 Abel Hegedus CLA 2014-04-03 10:51:04 EDT
This feature is already completed.