ACM Home Page
Please provide us with feedback. Feedback
Automatic type inference via partial evaluation
Full text PdfPdf (193 KB)
Source International Conference on Principles and Practice of Declarative Programming archive
Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming table of contents
Lisbon, Portugal
Pages: 106 - 116  
Year of Publication: 2005
ISBN:1-59593-090-6
Authors
Aaron Tomb  University of California, Santa Cruz, Santa Cruz, CA
Cormac Flanagan  University of California, Santa Cruz, Santa Cruz, CA
Sponsors
ACM: Association for Computing Machinery
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 2,   Downloads (12 Months): 17,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1069774.1069784
What is a DOI?

ABSTRACT

Type checking and type inference are fundamentally similar problems. However, the algorithms for performing the two operations, on the same type system, often differ significantly. The type checker is typically a straightforward encoding of the original type rules. For many systems, type inference is performed using a two-phase, constraint-based algorithm.We present an approach that, given the original type rules written as clauses in a logic programming language, automatically generates an efficient, two-phase, constraint-based type inference algorithm. Our approach works by partially evaluating the type checking rules with respect to the target program to yield a set of constraints suitable for input to an external constraint solver. This approach avoids the need to manually develop and verify a separate type inference algorithm, and is ideal for experimentation with and rapid prototyping of novel type systems.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
 
2
S.-J. Craig and M. Leuschel. LIX: an effective self-applicable partial evaluator for prolog. In Proceedings of the 7th International Symposium on Functional and Logic Programming, FLOPS'04, Apr. 2004.
 
3
R. F. Crew. ASTLOG: A language for examining abstract syntax trees. In Proceedings of the USENIX Conference on Domain-Specific Languages, Oct. 1997.
4
 
5
C. Flanagan and S. N. Freund. Type inference against races. In Proceedings of the 2004 Static Analysis Symposium, SAS'04, Aug. 2004.
6
7
 
8
T. Frühwirth, E. Shapiro, M. Vardi, and E. Yardeni. Logic programs as types for logic programs. In Proceedings of the 6th Annual IEEE Symposium on Logic in Computer Science (LICS), pages 300--309, 1991.
 
9
T. W. Frühwirth. Type inference by program transformation and partial evaluation. In Proceedings of the Workshop on Meta-Programming in Logic (META'88), pages 263--282, 1988.
 
10
Y. Futamura. Partial evaluation of computation process---an approach to a compiler-compiler. Systems, Computers, Controls, 2(5):45--50, 1971.
11
 
12
B. Joy, G. Steele, J. Gosling, and G. Bracha. The Java™ Language Specification, Second Edition. Addison-Wesley, 2000.
 
13
J. Kodumal. Banshee, a toolkit for building constraint-based analyses. PhD thesis, University of California at Berkeley, 2002.
 
14
 
15
M. Leuschel. The ECCE partial deduction system. In Proceedings of the ILPS'97 Workshop on Tools and Environments for (Constraint) Logic Programming, 1997.
 
16
17
 
18
 
19
C. Schürmann. Towards practical functional programming with logical frameworks, July 2003.
20
 
21
 
22
Z. Somogyi, F. Henderson, and T. Conway. Mercury: an efficient purely declarative logic programming language. In Proceedings of the Australian Computer Science Conference, Feb. 1995.
 
23
24


Collaborative Colleagues:
Aaron Tomb: colleagues
Cormac Flanagan: colleagues