| --- | --- |
| Bugzilla Link | 289290 |
| Status | CLOSED DUPLICATE of bug 196873 |
| Importance | P3 normal |
| Reported | Sep 13, 2009 03:35 EDT |
| Modified | Jun 26, 2010 10:17 EDT |
| Version | 1.3.0 |
| Reporter | Ed Willink |
Description
Built-in operations such as oclIsNew, were resolved by
a magic constant in PredefinedType\
special treatment in the grammar\
special treatment in the analyzer\
no treatment at all in the validator\
special treatment in the evaluator
This makes for some massive ifs and buts code.
Attachment 146988 to Bug 184048 eliminates the special parsing treatment and slightly simplifies the special anlyzer treatment.
Suggest that each magic constant be replaced by a derived PredefinedOperation class where analyzer, validator and evaluator helper functions can realise the operation-specific semantics. Shared functionality can be provided by AbstractPredefinedOperation.
This should also make it much easier for derived languages to add further PredefinedOperations.
| --- | --- | | Bugzilla Link | 289290 | | Status | CLOSED DUPLICATE of bug 196873 | | Importance | P3 normal | | Reported | Sep 13, 2009 03:35 EDT | | Modified | Jun 26, 2010 10:17 EDT | | Version | 1.3.0 | | Reporter | Ed Willink |
Description
Built-in operations such as oclIsNew, were resolved by
a magic constant in PredefinedType\ special treatment in the grammar\ special treatment in the analyzer\ no treatment at all in the validator\ special treatment in the evaluator
This makes for some massive ifs and buts code.
Attachment 146988 to Bug 184048 eliminates the special parsing treatment and slightly simplifies the special anlyzer treatment.
Suggest that each magic constant be replaced by a derived PredefinedOperation class where analyzer, validator and evaluator helper functions can realise the operation-specific semantics. Shared functionality can be provided by AbstractPredefinedOperation.
This should also make it much easier for derived languages to add further PredefinedOperations.