Type inference

From Liberty Eiffel Wiki
Revision as of 12:57, 11 July 2005 by Cadrian (talk | contribs) (creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Type inference is an algorithm allowing SmartEiffel to statically compute the true type of the objects at run time.

Usually this algorithm allows to simplify the generated code by deleting dynimic binding sites when the static type is computed to be reduced to a unic dynamic type. This simplification is summed up and displayed by the compiler when using the -verbose flag. It's called type inference score; it is the fraction of simplified binding sites over the total number of sites.

One should note that a 100% score is usually not possible, nor desirable; else your project is not really written in an OO spirit...