Getting F-Bounded Polymorphism into Shape Ben Greenman, Fabian
Getting F-Bounded Polymorphism into Shape Ben Greenman, Fabian Muehlboeck, and Ross Tate Cornell University Typesafe Equality + Generic Lists? (Typesafe) Equality @override
{Hello,World!} .equalTo {Ahoi,World!} {inc,} .equalTo {,id} List (read-only) Eq
List Eq List Eq
contravariant :> :> covariant Eq
interface List extends Eq>> interface List extends Eq>> List <: Eq>
Eq <: Eq> Eq> Eq >> >> List List <: > List>
> Strin Eq g > Done! Ross Tate, Alan Leung,
and SorinC.Lerner Andrew J. Kennedy and Benjamin Pierce Taming in Java's Type , PLDI 2011 On Decidability
ofWildcards Nominal Subtyping withSystem Variance, FOOL-WOOD 2007 List extends Nested
Contravariance! Eq> > List List> List extends Eq>> extends Eq> Expansive
Inheritance! > Trees class Tree extends List Are trees equatable? Are Trees equatable? Are Trees equatable?
Tree <: List> List List <: List> List> Tree Tree <: <: Eq Eq List <:
Eq List <: Eq Eq>> <: Eq Eq>> Eq>> <: Eq Eq Tree <: List> Tree Tree <: List> List>
Meh! interface List extends Eq>> WHY?
interface List extends List> Eq>> How do we use Eq<>? as type arguments! List
List> WithNOT F-bounded polymorphism! classNOT String extends Eq for parameters! class Set
extends Eq> NOT for return types! NOT for fields! NOT for local variables! Shapes
Used in Recursive inheritance definitions Recursive type variable constraints Eq Comparable Clonable Summable
Materials Used for Type arguments
Method parameters Return types Fields Variables String List Throwable FileStream
All Sheep in Scotland are black Read these 13 million lines of Code! Can I script it? NO! I mean YES! Survey 13.5 million lines of open-source generic Java code
from 60 projects taken primarily from the Qualitas Corpus* No class was ever both a shape and a material Recursive - inheritance definitions - type variable constraints *http://qualitascorpus.com - Type arguments
- Method parameters - Return types - Fields & Variables Material-Shape Separation Thou shalt not mix shapes and materials!
Shapes Used in Recursive inheritance definitions Recursive type variable constraints Recursive inheritance only through Shapes
Materials Used for Type arguments Method parameters Fields
Variables Well-founded inheritance Well-founded Material Inheritance Materials class A extends B, D {} Inheritance hierarchies defined
independent of A Well-founded Material Inheritance class A extends B {} class B extends A {} class A extends List {} class B extends List {} Decidable Subtyping
With nave algorithms Proven with a simple measure Decidable Subtyping material interface Pred material interface Matrix extends List> Pred> <: Pred> Matrix <: List
List> <: List Decidable Subtyping Pred> <: Pred> Matrix <: List List> <: List List <: Object Done!
Decidable Subtyping Pred> < Pred> Matrix < List : List> < List :
List < Object : Decidable Subtyping A extends B> max { | | ||
Visakha Puja Day. Full moon of May. Believed to be day of birth, enlightenment and death of Buddha. People gather at monasteries with flowers, candles and incense while reciting the 3 refuges
Recordkeeping . Training Objectives. Describe the types of records that . ... Planning Cycle Menus lesson in the . ... **Institutions may not meet the 25% requirement by combining the number of enrollees who qualify under Title XX with the...
Meffe, Filomena Ministry of Health and Long Term Care $27,755 2019 - 2021 Title: "Resident perceptions of midwifery in obstetrical care: Just in time inter-professional education" Montalban, Xavier Biogen MA Inc. $180,000 2019 - 2027 Title: "A randomized, controlled, open-label,...
A project management appraisal should be viewed as a useful, constructive and necessary diagnostic tool available for augmenting the capability of the sponsoring organization's project management team Project Management Appraisal PMA can therefore be used to: Identify the strengths of...
Cal State Fullerton Digital Print Services. California State University. Results. Integrated workflow improved turnaround times and number of jobs produced. The EFI M500 provides information to manage a copier operation.
Software Quality Assurance. Software quality assurance consists of a means of monitoring the software engineering processes and methods used to ensure quality. Every software developers will agree that high-quality software is an important goal.
People rely on their caregivers to cook and prepare food, to provide medical care, companionship and support. These are services that cannot be easily replaced by technology. This means that investing and staying within the field of aging services is...
Download Presentation
Ready to download the document? Go ahead and hit continue!