Using types as search keys in function libraries

1991 ◽  
Vol 1 (1) ◽  
pp. 71-89 ◽  
Author(s):  
Mikael Rittri

AbstractA method is proposed to search for an identifier in a functional program library by using its Hindley–Milner type as a key. This can be seen as an approximation of using the specification as a key.Functions that only differ in their argument order or currying are essentially the same, which is expressed by a congruence relation on types. During a library search, congruent types are identified. If a programmer is not satisfied with the type of a found value, he can use a conversion function (like curry), which must exist between congruent types, to convert the value into the type of his choice.Types are congruent if they are isomorphic in all cartesian closed categories. To put it more simply, types are congruent if they are equal under an arithmetical interpretation, with cartesian product as multiplication and function space as exponentiation. This congruence relation is characterized by seven equational axioms. There is a simple term-rewriting algorithm to decide congruence, using which a search system has been implemented for the functional language Lazy ML, with good performance.The congruence relation can also be used as a basis for other search strategies, e.g. searching for identifiers of a more general type, modulo congruence or allowing free type variables in queries.

Author(s):  
Norihiro Yamada ◽  
Samson Abramsky

Abstract The present work achieves a mathematical, in particular syntax-independent, formulation of dynamics and intensionality of computation in terms of games and strategies. Specifically, we give game semantics of a higher-order programming language that distinguishes programmes with the same value yet different algorithms (or intensionality) and the hiding operation on strategies that precisely corresponds to the (small-step) operational semantics (or dynamics) of the language. Categorically, our games and strategies give rise to a cartesian closed bicategory, and our game semantics forms an instance of a bicategorical generalisation of the standard interpretation of functional programming languages in cartesian closed categories. This work is intended to be a step towards a mathematical foundation of intensional and dynamic aspects of logic and computation; it should be applicable to a wide range of logics and computations.


2015 ◽  
Vol 594 ◽  
pp. 143-150 ◽  
Author(s):  
Xiaodong Jia ◽  
Achim Jung ◽  
Hui Kou ◽  
Qingguo Li ◽  
Haoran Zhao

2004 ◽  
Vol 143 (1-3) ◽  
pp. 105-145 ◽  
Author(s):  
Martín Escardó ◽  
Jimmie Lawson ◽  
Alex Simpson

1976 ◽  
Vol 15 (3) ◽  
pp. 461-465 ◽  
Author(s):  
R.S. Lee

This paper first assigns specific uniform convergence structures to the products and function spaces of pairs of uniform convergence spaces, and then establishes a bijection between corresponding sets of morphisms which yields cartesian closedness.


2012 ◽  
Vol 154 (1) ◽  
pp. 153-192 ◽  
Author(s):  
NICOLA GAMBINO ◽  
JOACHIM KOCK

AbstractWe study polynomial functors over locally cartesian closed categories. After setting up the basic theory, we show how polynomial functors assemble into a double category, in fact a framed bicategory. We show that the free monad on a polynomial endofunctor is polynomial. The relationship with operads and other related notions is explored.


2009 ◽  
Vol 19 (5) ◽  
pp. 943-957 ◽  
Author(s):  
MATTHIAS SCHRÖDER

The compact-open topology on the set of continuous functionals from the Baire space to the natural numbers is well known to be zero-dimensional. We prove that the closely related sequential topology on this set is not even regular. The sequential topology arises naturally as the topology carried by the exponential formed in various cartesian closed categories of topological spaces. Moreover, we give an example of an effectively open subset of that violates regularity. The topological properties of are known to be closely related to an open problem in Computable Analysis. We also show that the sequential topology on the space of continuous real-valued functions on a Polish space need not be regular.


Sign in / Sign up

Export Citation Format

Share Document