| Summary: | QvtOperationalEvaluationEnv has hard-coded maximum stack depth of 300 | ||
|---|---|---|---|
| Product: | [Modeling] QVTo | Reporter: | Dennis Hendriks <dh_tue> |
| Component: | Engine | Assignee: | Project Inbox <mmt-qvt.operational-inbox> |
| Status: | NEW --- | QA Contact: | |
| Severity: | critical | ||
| Priority: | P3 | CC: | christopher.gerking, ed, serg.boyko2011 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Dennis Hendriks
In Juno, MDT OCL introduces Workspace/Project preference pages for a number of options. This functionality could be cloned to provide QVTo options. Too late for Juno now. Using workspace-based preference pages, the problem remains for deployed transformations. Maybe a global option (affecting all workspace/deployed transformations) is a better solution in the first place? (In reply to comment #0) > 71 public static final int MAX_STACK_DEPTH = 300; This is an arbitrary constant used in just one place: static void EvaluationUtil.checkCurrentStackDepth(QvtOperationalEvaluationEnv env) throws QvtStackOverFlowError { to protect against infinite recursions. This constant could easily be moved to a QvtOperationalEvaluationEnv option since QvtOperationalEvaluationEnv inherits the ability to have configurable option from AbstractEvaluationEnvironment. A user can then set a better value programmatically. Since a user has hit 300, perhaps we should change the default to 1000. The OCL UI preference pages operate on options, so cloning an OCL UI plugin would provide an interactive capability. [Examine org.eclipse.ocl.options.EvaluationOptions.DYNAMIC_DISPATCH to see how OCL supports options.] Any chance to get this blocker fixed for Luna? (In reply to Ed Willink from comment #3) > (In reply to comment #0) > > 71 public static final int MAX_STACK_DEPTH = 300; > > This is an arbitrary constant used in just one place: > > static void > EvaluationUtil.checkCurrentStackDepth(QvtOperationalEvaluationEnv env) > throws QvtStackOverFlowError { > > to protect against infinite recursions. > > This constant could easily be moved to a QvtOperationalEvaluationEnv option > since QvtOperationalEvaluationEnv inherits the ability to have configurable > option from AbstractEvaluationEnvironment. > > A user can then set a better value programmatically. This seems really easy. > Since a user has hit 300, perhaps we should change the default to 1000. Still seems like a good idea. > The OCL UI preference pages operate on options, so cloning an OCL UI plugin > would provide an interactive capability. > > [Examine org.eclipse.ocl.options.EvaluationOptions.DYNAMIC_DISPATCH to see > how OCL supports options.] This is quite a bit of work. I recommend you do at least the first two of the ideas above. I'm afraid I don't have time before Luna. Patch was committed which turns MAX_STACK_DEPTH into configurable setting. Patch only allows to externally control this setting with org.eclipse.m2m.qvt.oml.ExecutionContext interface when running transformation via TransformationExecutor. UI integration TBD. Pushed to master for M7. commit d7102d08a42671bcc289267f0965b1403bedd5b2 |