| Automatic type inference via partial evaluation |
| Full text |
Pdf
(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 |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 2, Downloads (12 Months): 17, Citation Count: 1
|
|
|
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
|
Cormac Flanagan , K. Rustan M. Leino , Mark Lillibridge , Greg Nelson , James B. Saxe , Raymie Stata, Extended static checking for Java, Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation, June 17-19, 2002, Berlin, Germany
|
 |
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
|
Susan Horwitz , Thomas Reps , Mooly Sagiv, Demand interprocedural dataflow analysis, Proceedings of the 3rd ACM SIGSOFT symposium on Foundations of software engineering, p.104-115, October 12-15, 1995, Washington, D.C., United States
|
| |
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
|
Matthew W. Moskewicz , Conor F. Madigan , Ying Zhao , Lintao Zhang , Sharad Malik, Chaff: engineering an efficient SAT solver, Proceedings of the 38th conference on Design automation, p.530-535, June 2001, Las Vegas, Nevada, United States
[doi> 10.1145/378239.379017]
|
| |
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
|
|
|