Explaining Polymorphic Types

نویسندگان

  • Yang Jun
  • Greg J. Michaelson
  • Philip W. Trinder
چکیده

Polymorphic types in programming languages facilitate code reuse, increase reliability and reduce semantic errors in programs. Hindley-Milner type inference forms a strong basis for checking polymorphic types but is less well suited to explaining them, as it introduces intermediate constructs that relate poorly to a programmer's understanding of the program. We report an experiment into expert human type explanation, and uncover a simple set of rules for human-like explanations. We present a type explanation system based on these rules rather than Hindley-Milner inference. The system uses a new H inference algorithm to annotate types with explanations and is designed to produce succinct, non-repetitive explanations with minimal reference to artefacts of mechanised type inference .

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Molecular Characterization of Iraqi Local Goat Breeds Using Random Amplified Polymorphic DNA Markers

Cashmere is only produced from Maraz (Kurdi) goat breed in Iraqi Kurdistan Region. The objective of this study was to assess the genetic diversity of different Maraz color types, black goat and Shami breeds using random amplified polymorphic DNA (RAPD) markers. Fourteen primers were used and nine out of them were selected based on their number of bands (NB) and polymorphic characteristics. Thes...

متن کامل

Explaining the Types of Praiseworthy and Despicable Bigotry in the Words of Imam Ali (AS)

Although some think that “bigotry” is a moral vice, it is mentioned with two positive and negative functions in religious teachings; and to-the-point bigotry is praised and regarded as a moral virtue. Due to the importance of moral attributes and explaining their functions, an attempt has been made in this study to identify and explain the nature of the attribute “bigotry” and its types by refe...

متن کامل

Characterization of cellular infiltration in polymorphic eruption of pregnancy and pemphigoid gestationis in histopathological examinations

Background: Pregnancy-specific dermatoses represent a group of pruritic skin diseases unique to pregnancy and the most common types are polymorphic eruption of pregnancy and pemphigoid gestationis. It is difficult to obtain a histopathological diagnosis for polymorphic eruption of pregnancy and pemphigoid gestationis in the lack of immunofluorescence because of their similar clinical presentati...

متن کامل

Human and “human-like” type explanations

The behaviour of a “human-like” polymorphic type explanation system is analysed using the same categories as those used to characterise human expert type explanation behaviour. The results suggest that the computer system has a similar behaviour profile to that of a composite human expert. Introduction We have been investigating techniques for making mechanical polymorphic type inference more u...

متن کامل

The genericity theorem and parametricity in the polymorphic A-calculus

Longo, G., K. M&ted and S. Soloviev, The genericity theorem and parametricity in the polymorphic I-calculus, Theoretical Computer Science 121 (1993) 323-349. This paper focuses on how terms of the polymorphic I-calculus, which may take types as inputs, depend on types. These terms are generally understood, in all models, to have an “essentially” constant meaning on input types. We show how the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Comput. J.

دوره 45  شماره 

صفحات  -

تاریخ انتشار 2002