Results 1 -
2 of
2
Retrieving Re-Usable Software Components By Polymorphic Type
, 1991
"... Polymorphic types are labels classifying both (a) defined components in a library and (b) contexts of free variables in partially written programs. We propose to help programmers make better use of software libraries by providing a system that, given (b), identifies candidates from (a) with matching ..."
Abstract
-
Cited by 30 (1 self)
- Add to MetaCart
Polymorphic types are labels classifying both (a) defined components in a library and (b) contexts of free variables in partially written programs. We propose to help programmers make better use of software libraries by providing a system that, given (b), identifies candidates from (a) with matching types. Assuming at first that matching means unifying (ie having a common instance) we discuss efficient ways of implementing such a retrieval system, and also indicate its likely effectiveness based on a quantitative study of currently available libraries. Later we introduce the applicative instance relation between types, which captures some intuitions about generalisation/specialisation, and discuss its use as the basis of a more flexible system. 1. INTRODUCTION Much programming effort can be saved by making good use of libraries of pre-defined components. In a functional language the majority of such components are functions and many of them are higher order functions, extensive use o...
Embedding prolog in haskell
- Department of Computer Science, University of Utrecht
, 1999
"... The distinctive merit of the declarative reading of logic programs is the validity ofallthelaws of reasoning supplied by the predicate calculus with equality. Surprisingly many of these laws are still valid for the procedural reading � they can therefore be used safely for algebraic manipulation, pr ..."
Abstract
-
Cited by 16 (4 self)
- Add to MetaCart
The distinctive merit of the declarative reading of logic programs is the validity ofallthelaws of reasoning supplied by the predicate calculus with equality. Surprisingly many of these laws are still valid for the procedural reading � they can therefore be used safely for algebraic manipulation, program transformation and optimisation of executable logic programs. This paper lists a number of common laws, and proves their validity for the standard (depth- rst search) procedural reading of Prolog. They also hold for alternative search strategies, e.g. breadth- rst search. Our proofs of the laws are based on the standard algebra of functional programming, after the strategies have been given a rather simple implementation in Haskell. 1

