Difference between revisions of "Interfacing the Debugger"
| m | m | ||
| Line 2: | Line 2: | ||
| {{Warning|'''Warning''': Article under development}} | {{Warning|'''Warning''': Article under development}} | ||
| − | ==== | + | ==Introduction== | 
| + | This article discusses issues recently discovered for the following two validity rules: | ||
| + | |||
| + | 8.15.7 Validity: ''Conversion Procedure rule'', Validity code: '''VYCP'''<br> | ||
| + | 8.15.8 Validity: ''Conversion Query rule'', Validity code: '''VYCQ''' | ||
| + | |||
| + | ==Examples== | ||
| + | For the following examples eweasel tests have been created. Their named  | ||
| + | ====Example 1==== | ||
| + | eweasel test: convert-to-current-type | ||
| + | <code>[eiffel,N] | ||
| + | class A[G] | ||
| + | convert | ||
| + |    to_a: {A[G]} | ||
| + | feature | ||
| + |    to_a: A[G] | ||
| + | end | ||
| + | </code> | ||
| + | The conversion to '''A[G]''' should indeed not be valid because they are conform. | ||
| + | |||
| + | The only rule that matters in our case is '''VYCQ(3)'''. | ||
| + | |||
| + | What VYCQ(3) asks is the following | ||
| + | |||
| + |  Is A[ANY] conform to A[G]? | ||
| + | |||
| + | As we answer this question clearly with '''no''', the conversion is valid because all the other rules do not object either. | ||
| + | |||
| + | ====Example 2==== | ||
| + | eweasel test: convert-to-current-type | ||
| + | <code>[eiffel,N] | ||
| + | class A[G] | ||
| + | convert | ||
| + |    to_a: {A[STRING]} | ||
| + | feature | ||
| + |    to_a: A[STRING] | ||
| + | end | ||
| + | </code> | ||
| + | In the case where G is actual type parameter is a subtype of STRING to two types are conform again. | ||
| + | |||
| + | The intresting rule is again '''VYCQ(3)''': | ||
| + | |||
| + |  Is A[ANY] conform to A[G]? | ||
| + | |||
| + | This question is answered with '''no''' too. Therefore the conversion is valid. | ||
Revision as of 19:12, 18 January 2007
 Warning: Warning: Article under development
 Warning: Warning: Article under development
Introduction
This article discusses issues recently discovered for the following two validity rules:
8.15.7 Validity: Conversion Procedure rule, Validity code: VYCP
8.15.8 Validity: Conversion Query rule, Validity code: VYCQ
Examples
For the following examples eweasel tests have been created. Their named
Example 1
eweasel test: convert-to-current-type
class A[G] convert to_a: {A[G]} feature to_a: A[G] end
The conversion to A[G] should indeed not be valid because they are conform.
The only rule that matters in our case is VYCQ(3).
What VYCQ(3) asks is the following
Is A[ANY] conform to A[G]?
As we answer this question clearly with no, the conversion is valid because all the other rules do not object either.
Example 2
eweasel test: convert-to-current-type
class A[G] convert to_a: {A[STRING]} feature to_a: A[STRING] end
In the case where G is actual type parameter is a subtype of STRING to two types are conform again.
The intresting rule is again VYCQ(3):
Is A[ANY] conform to A[G]?
This question is answered with no too. Therefore the conversion is valid.


