This seems like what you want, checking+inference, but requires intersection types to find minimal types:

Decidable Higher Order Subtyping
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.144.3182

An uncommon but incredibly useful paper for the question of subtyping:

Is Structural Subtyping Useful? An Empirical Study
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.150.3105

I'm actually not sure if this includes bounded quantification, and it doesn't discuss type inference at all, but seems like an interesting point in the design space:

Integrating Nominal and Structural Subtyping
http://www.cs.cmu.edu/~donna/public/ecoop08.pdf

On 25/02/2015 12:15 PM, Sandro Magi wrote:
After a quick search:

Simple, Decidable Type Inference with Subtyping
http://arxiv-web3.library.cornell.edu/pdf/1104.3116v1.pdf

Type inference with Bounded Quantification:
http://www.lfcs.inf.ed.ac.uk/reports/98/ECS-LFCS-98-403/

Type Inference with Structural Subtyping: A faithful formalization of an efficient constraint solver
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.2.5790

On 25/02/2015 10:56 AM, Jonathan S. Shapiro wrote:
As I think we've discussed, I am planning to introduce subclassing (or something similar) and checked dynamic downcast into BitC.

As much as I like qualified types, there are some problems that they do not handle. Sometimes you need to manage heterogeneous things under a single type.

In abstract we could handle this with the "capsules" idea from BitC v0, but the capsule mechanism there tends to incur an allocation.

First question: My understanding is that inference for bounded quantification is in general undecidable, but if we limit subtyping to nominal subclassing it remains decidable. Is this still the state of things?

Second question: What else should I be considering as an alternative? I don't especially like subclassing, but there is a strong desire to migrate code from some existing programs to BitC, so being able to translate the idioms (or not needing to) is a consideration.


shap


_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev



_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev



_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to