Results 1 
3 of
3
Programming Languages and Dimensions
, 1996
"... Scientists and engineers must ensure that the equations and formulae which they use are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This thesis investigates the extension of programming languages to support the notion of physical dimension. ..."
Abstract

Cited by 42 (3 self)
 Add to MetaCart
(Show Context)
Scientists and engineers must ensure that the equations and formulae which they use are dimensionally consistent, but existing programming languages treat all numeric values as dimensionless. This thesis investigates the extension of programming languages to support the notion of physical dimension. A type system is presented similar to that of the programming language ML but extended with polymorphic dimension types. An algorithm which infers most general dimension types automatically is then described and proved correct. The semantics of the language is given by a translation into an explicitlytyped language in which dimensions are passed as arguments to functions. The operational semantics of this language is specified in the usual way by an evaluation relation defined by a set of rules. This is used to show that if a program is welltyped then no dimension errors can occur during its evaluation. More abstract properties of the language are investigated using a denotational semantics: these include a notion of invariance under changes in the units of measure used, analogous to parametricity in the polymorphic lambda calculus. Finally the dissertation is summarised and many possible directions for future research in dimension types and related type systems are described. i ii
Dimension Inference under Polymorphic Recursion
 In Proc. 7th Conf. Functional Programming Languages and Computer Architecture
, 1995
"... Numeric types can be given polymorphic dimension parameters, in order to avoid dimension errors and unit errors. The most general dimensions can be inferred automatically. It has been observed that polymorphic recursion is more important for the dimensions than for the proper types. We show that, un ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
(Show Context)
Numeric types can be given polymorphic dimension parameters, in order to avoid dimension errors and unit errors. The most general dimensions can be inferred automatically. It has been observed that polymorphic recursion is more important for the dimensions than for the proper types. We show that, under polymorphic recursion, type inference amounts to syntactic semiunification of proper types, followed by equational semiunification of dimensions. Syntactic semiunification is unfortunately undecidable, although there are procedures that work well in practice, and proper types given by the programmer can be checked. However, the dimensions form a vector space (provided that their exponents are rational numbers). We give a polynomialtime algorithm that decides if a semiunification problem in a vector space can be solved and, if so, returns a most general semiunifier. 1 Introduction We will combine three good things as far as possible: dimension types, polymorphic recursion, and aut...
An Extension of Baaz's Algorithm to Esemiunification with One Inequality
"... In this paper we present a preliminary research report on the problem of nding procedures to solve some cases of the Uniform ESemi unication Problem, where E is a set of equations dening an equational theory. The problem in general is undecidable, but for certain theories, as is the case wit ..."
Abstract
 Add to MetaCart
In this paper we present a preliminary research report on the problem of nding procedures to solve some cases of the Uniform ESemi unication Problem, where E is a set of equations dening an equational theory. The problem in general is undecidable, but for certain theories, as is the case with EUnication, there may be theories for which it is decidable. 1 Introduction The SemiUnication problem has applications in areas of computer science like programming languages, computational linguistics, term rewriting, and automated deduction. Despite this, the body of knowledge on Semiunication is not comparable to that of Unication, which has been for a long time an ongoing branch of study in computer science. The general problem of semiunication (see below for denitions) has been shown to be undecidable, but there are a number of restrictions andor generalizations that can be shown to be decidable. In this paper we present an introduction and a preliminary research rep...