Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337564 - CountedUnit should return false when a negative count is set
Summary: CountedUnit should return false when a negative count is set
Status: RESOLVED FIXED
Alias: None
Product: EMFT.Henshin
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 08:51 EST by Felix Rieger CLA
Modified: 2011-07-07 07:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Rieger CLA 2011-02-18 08:51:49 EST
Executing a countedUnit with count < -1 currently results in no Rule being applied, but the execution returns true nonetheless. Compare this with specifying too large a count, where no Rule will be applied and the execution returns false. 

Therefore, executing countedUnits with count < -1 should always return false. (Count can not be set via a Parameter, so specifying negative values clearly is a user error, i.e. returning false and applying no Rules makes sense.)
Comment 1 Enrico Biermann CLA 2011-02-24 05:36:53 EST
A count < -1 is not valid. Proper values are N+ and "-1" (as long as possible). Executing a counted unit with -1 should always return true, because the subunit was executed "as long as possible" no matter how often this was.
A proper value of N+ or -1 should be ensured by model constraints for correct Henshin diagrams or the different editors.
Comment 2 Stefan Jurack CLA 2011-07-07 07:58:06 EDT
ocl constraint added