Back to search

Monterey, California. Naval Postgraduate School

A type inference algorithm and transition semantics for polymorphic C

Abstract

dc:description.abstract

In an attempt to bring the ML-style type inference to the C programming language, Smith and Volpano developed a type system for a dialect of C, called PolyC SmV96a SmV95b. PolyC extends C with ML-style polymorphism and a limited form of higher-order function. Smith and Volpano proved a type soundness theorem that basically says that evaluation of a well-typed PolyC program cannot fail due to a type mismatch. The type soundness proof is based on an operational characterization of a special kind of semantic formulation called a natural semantics. This thesis presents an alternative semantic formulation, called a transition semantics, that could be used in place of the natural semantics to prove type soundness. The primary advantage of the transition semantics is that it eliminates the extra operational level, but the disadvantage is that it consists of many more evaluation rules than the natural semantics. Thus it is unclear whether it is a suitable alternative to the two-level approach of Smith and Volpano. Further, the thesis gives the first full type inference algorithm for the type system of PolyC. Despite implicit variable dereferencing found in PolyC, the algorithm turns out to be a rather straight-forward extension of Damas and Milner's algorithm W DaM82. The algorithm has been implemented as an attribute grammar in Grammatech's SSL and a complete source code listing is given in the Appendix

Degree

thesis:*
Name thesis:degree_name
M.S. in Computer Science
Level thesis:degree_level
Masters
Discipline thesis:degree_discipline
Computer Science
Department dc:contributor.department
Computer Science
Grantor dc:publisher
Monterey, California. Naval Postgraduate School
Year dc:date.issued
1996

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Özgen, Mustafa
Advisor dc:contributor.advisor
  • Volpano, Dennis
Committee member dc:contributor.committeemember
  • Rasmussen, Craig W.

Rights

dc:rights
Statement dc:rights
  • Approved for public release; distribution is unlimited.

Identifiers

dc:identifier.*
Handle dc:identifier.uri
https://hdl.handle.net/10945/9097

Chain of custody

source
Harvested from
Naval Postgraduate School
Base URL
calhoun.nps.edu/server/oai/request
Last updated
2026-11-21
Source record
OAI-PMH GetRecord
related terms
citation

Özgen, Mustafa. A type inference algorithm and transition semantics for polymorphic C. Masters thesis, Monterey, California. Naval Postgraduate School, 1996. https://hdl.handle.net/10945/9097