Using types as search keys in function libraries

Author:

Rittri Mikael

Abstract

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.

Publisher

Cambridge University Press (CUP)

Subject

Software

Reference35 articles.

1. Uddeborg G. O. 1988. A functional parser generator. Licentiate thesis, Dept. of Comp. Sci., Chalmers Univ. of Tech., S-412 96 Göteborg, Sweden. Also as PMG Report 43 (without source code).

2. Miranda: A non-strict functional language with polymorphic types

3. The category of finite sets and Cartesian closed categories

4. Unification theory

5. Fast Probabilistic Algorithms for Verification of Polynomial Identities

Cited by 43 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. The exp-log normal form of types: decomposing extensional equality and representing terms compactly;ACM SIGPLAN Notices;2017-05-11

2. The exp-log normal form of types: decomposing extensional equality and representing terms compactly;Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages;2017-01

3. Axioms and decidability for type isomorphism in the presence of sums;Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic (CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science (LICS);2014-07-14

4. Isomorphisms of types in the presence of higher-order references (extended version);Logical Methods in Computer Science;2012-08-10

5. ISOMORPHISMS OF TYPES IN THE PRESENCE OF HIGHER-ORDER REFERENCES;LOG METH COMPUT SCI;2012

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3