Single level call rule implementation
Introduction
The single-level call rule is a validity rule which guarantees that a system is catcall free. It defines that every call must be valid for all possible values at runtime.
Current implementation
EiffelStudio has currently a simple implementation which can be set to check for every feature call if the call is valid for all possible descendants. This is straight-forward in the non-generic case as you just have to check the feature call for all descendants of the target type. In the case of generics it is a bit more difficult. If for example you have to check a feature call on a type LIST [ANY]
and you want to check the call on all possible descendants, you can create an unlimited number of generics by instantiating the descendant as LIST [LIST [ANY]
, LIST [LIST [LIST [...]]]
and so on.
Another problem is dynamic loading of classes. If this is possible than the check does not cover all possible runtime values and is thus not complete.