Back to search

University of Manitoba

The design and implementation of implicit parameters to support function polymorphism

Abstract

dc:description.abstract

In a programming language, functions that can be invoked with different numbers of arguments, different types of arguments, or can return results of different types are called polymorphic functions. An overview of polymorphism in modern languages is given. Partial valuation is a program optimization process which exploits values known at compile-time with the goal of producing a faster and sometimes smaller program. In the Safer$\sb{-}$C language, variables, parameters, and functions can be assigned an evaluation time by the programmer. When one or more parameters of a function have an evaluation time of compile-time, the function may be specialized for their values. Function specialization is one of the means through which Safer$\sb{-}$C will support function polymorphism. This thesis describes three new developments in this area: (1) Syntax for declaring implicit formal parameters, (2) Boolean conditions for type inference, and (3) Type manipulation functions. An extension of function specialization has been developed which allows functions to be specialized for types, as well as for values. Compile-time type and value information may be provided explicitly by the programmer, or it may be described abstractly in an implicit formal parameter list. An implicit parameter passing mechanism obtains the types and values described in such lists from the site of each function invocation. The programmer may place constraints on the specialization process by defining a conditional type matching expression for any explicit parameter. Such constraints provide a means to validate type-specific aspects of each function invocation. They also give the compiler a mechanism to support function overloading. Conditional type matching expressions and the implicit parameter passing mechanism were made possible through the creation of a set of compile-time type manipulation functions. These functions accept types as parameters and return a type or value as their result.

Degree

thesis:*
Level thesis:degree_level
Master of Science (M.Sc.)
Discipline thesis:degree_discipline
Computer Science
Year dc:date.issued
1997

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Dueck, Jason O.

Rights

Language dc:language.iso
eng

Identifiers

dc:identifier.*
Handle dc:identifier.uri
http://hdl.handle.net/1993/1076

Chain of custody

source
Harvested from
University of Manitoba
Base URL
mspace.lib.umanitoba.ca/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
citation

Dueck, Jason O.. The design and implementation of implicit parameters to support function polymorphism. Master of Science (M.Sc.) thesis, 1997. http://hdl.handle.net/1993/1076