• Documents
  • Authors
  • Tables
  • Log in
  • Sign up
  • MetaCart
  • DMCA
  • Donate

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

DMCA

Variance and Generalized Constraints

Cached

  • Download as a PDF

Download Links

  • [www.research.microsoft.com]
  • [research.microsoft.com]
  • [research.microsoft.com]
  • [research.microsoft.com]
  • [research.microsoft.com]
  • [research.microsoft.com]
  • [www.microsoft.com]

  • Save to List
  • Add to Collection
  • Correct Errors
  • Monitor Changes
by For C Generics , Burak Emir , Andrew Kennedy , Claudio Russo , Dachuan Yu
  • Summary
  • Citations
  • Active Bibliography
  • Co-citation
  • Clustered Documents
  • Version History

BibTeX

@MISC{Generics_varianceand,
    author = {For C Generics and Burak Emir and Andrew Kennedy and Claudio Russo and Dachuan Yu},
    title = {Variance and Generalized Constraints},
    year = {}
}

Share

Facebook Twitter Reddit Bibsonomy

OpenURL

 

Abstract

Abstract. Generic types in C ♯ behave invariantly with respect to subtyping. We propose a system of type-safe variance for C ♯ that supports the declaration of covariant and contravariant type parameters on generic types. To support more widespread application of variance we also generalize the existing constraint mechanism with arbitrary subtype assertions on classes and methods. This extension is useful even in the absence of variance, and subsumes equational constraints proposed for Generalized Algebraic Data Types (GADTs). We formalize the subtype relation in both declarative and syntax-directed style, and describe and prove the correctness of algorithms for constraint closure and subtyping. Finally, we formalize and prove a type safety theorem for a featherweight language with variant classes and generalized constraints. 1

Keyphrases

generalized constraint    generic type    type-safe variance    constraint closure    contravariant type parameter    widespread application    variant class    arbitrary subtype assertion    equational constraint    type safety theorem    featherweight language    constraint mechanism    generalized algebraic data type    syntax-directed style    subtype relation   

Powered by: Apache Solr
  • About CiteSeerX
  • Submit and Index Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2019 The Pennsylvania State University