Simple, Efficient Object Encoding using Intersection Types
Author(s) -
Karl Crary
Publication year - 1999
Publication title -
ecommons (cornell university)
Language(s) - English
Resource type - Reports
DOI - 10.21236/ada360971
Subject(s) - subtyping , computer science , intersection (aeronautics) , encoding (memory) , simple (philosophy) , closure (psychology) , object (grammar) , theoretical computer science , typing , algorithm , programming language , artificial intelligence , speech recognition , philosophy , epistemology , economics , engineering , market economy , aerospace engineering
I present a type-theoretic encoding of objects that interprets method dispatch by self-application (i.e., method functions are applied to the objects containing them) but still validates the expected subtyping relationships. The naive typing of self-application fails to validate the expected subtyping relationships because it is too permissive and allows application to similarly typed objects that are not self. This new encoding solves this problem by constraining methods to be applied only to self using existential and intersection types. Using this typing, I give a full account of objects including self types and method update. I also present another application of this object encoding to fully abstract, closure-passing closure conversion. The typing constructs used in this encoding appear to be quite rich, but they may be axiomatized in a novel, restricted fashion that is metatheoretically simple.
Accelerating Research
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom
Address
John Eccles HouseRobert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom