|
ABSTRACT
Statically typed programming languages allow earlier error
checking, better enforcement of diciplined programming styles, and the
generation of more efficient object code than languages where all type
consistency checks are performed at run time. However, even in
statically typed languages, there is often the need to deal with data
whose type cannot be determined at compile time. To handle
such situations safely, we propose to add a type
Dynamic whose values are pairs of a value
v and a type tag
T where v
has the type denoted by T. Instances of
Dynamic are built with an explicit
tagging construct and inspected with a type safe
typecase construct.
This paper explores the syntax, operational semantics, and
denotational semantics of a simple language that includes the type
Dynamic. We give examples of how
dynamically typed values can be used in programming. Then we discuss an
operational semantics for our language and obtain a soundness theorem. We
present two formulations of the denotational semantics of this language
and relate them to the operational semantics. Finally, we consider the
implications of polymorphism and some implementation issues.
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
|
ATKINSON, M. P., AND MORRISON, R. Polymorphic names and iterations. Draft article, Sept. 1987.
|
| |
3
|
BARENDREGT, H.P. The Lambda Calculus. Rev. ed. North-Holland, Amsterdam, 1984.
|
 |
4
|
|
| |
5
|
BmTWISTLE, G. M., DAHL, 0. J., MYHRHAUG, B., AND NYGAARD, K. S~mula Begin. Studentlitteratur, Lund, Sweden, 1979.
|
 |
6
|
P. Borras , D. Clement , Th. Despeyroux , J. Incerpi , G. Kahn , B. Lang , V. Pascual, Centaur: the system, Proceedings of the third ACM SIGSOFT/SIGPLAN software engineering symposium on Practical software development environments, p.14-24, November 28-30, 1988, Boston, Massachusetts, United States
|
| |
7
|
|
| |
8
|
CARDELLI, L., AND MACQUEEN, D. Persistence and type abstraction. In Proceedings of the Persistence and Datatypes Workshop (St. Andrews, Scotland, Aug. 1985). Dept. of Computational Science, Univ. of St. Andrews, 1985 (Persistent Program. Res. Rep. 16).
|
 |
9
|
|
 |
10
|
L. Cardelli , J. Donahue , M. Jordan , B. Kalsow , G. Nelson, The Modula–3 type system, Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.202-212, January 11-13, 1989, Austin, Texas, United States
[doi> 10.1145/75277.75295]
|
| |
11
|
CARDELLI, L., DONAHUE, J., GLASSMAN, L., JORDAN, M., KALSOW, B., AND NELSON, G. Modula-3 report (revised). Res. rep. 52, DEC Systems Research Center, Palo Alto, Calif., Nov. 1989.
|
| |
12
|
CHURCH, A. A formulation ofthe simple theory of types. J Symbohc Logic 5 (1940), 56-68.
|
| |
13
|
CL~MENT, D., DESPEYROUX, J., DESPEYROUX, T., HASCOET, L., AND KAHN, G. Natural semantics on the computer. Tech. Rep. RR 416, INRIA, Sophia-Antipolis June 1985.
|
| |
14
|
DESPEYROUX, T. Typoh A formalism to implement natural semanties. Teeh. Rep. 94, INRIA, Mar. 1988.
|
| |
15
|
HARPER, R. Introduction fo Standard ML. Teeh. Rep. ECS-LFCS-86-14, Lab. for the Foundations of Computer Science, Edinburgh Univ., Edinburgh, Scotland, Sept. 1986.
|
| |
16
|
|
| |
17
|
|
| |
18
|
LAMPSON, B.. A description of the Cedar language. Tech. Rep. CSL-8345, Xerox Pale Alto Research Center, Palo Alto, Calif., 1983.
|
| |
19
|
B Liskov , E Moss , A Snyder , R Atkinson , J C. Schaffert , T Bloom , R Scheifler, CLU reference manual, Springer-Verlag New York, Inc., New York, NY, 1984
|
| |
20
|
|
| |
21
|
MARTIN-L"F, P. Intitutionistic Type Theory. Bibliopolis, Naples, 1984.
|
| |
22
|
McDONALD, D. B., FAHLMAN, S. E., AND WHOLEY, S. Internal design of CMU Common Lisp un the IBM RT PC. Tech. Rep. CMU-CS-87-157, Carnegie-Mellon Univ., School of Computer Science, Pittsburgh, Pa., Apr. 1988.
|
| |
23
|
MILNER, R. A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17 (Aug. 1978), 348-375.
|
| |
24
|
|
 |
25
|
|
| |
26
|
MYCROFT, A. Dynamic types in ML. Draft article, 1983.
|
 |
27
|
|
| |
28
|
PLOTKIN, G. Call-by-name, call-by-value, and the X-calculus. Theor. Comput. Sci. I (1975), 125-159.
|
| |
29
|
PLOTKIN, G.D. A structural approach to operational semantics. Tech. Rep. DAIMI FN-19, Computer Science Dept., Aarhus Univ., Aarhus, Denmark, 1981.
|
| |
30
|
|
| |
31
|
ROVNER, P. On extending Modula-2 to build large, integrated systems IEEE Softw. 3, 6 (Nov. 1986), 46-57.
|
| |
32
|
SCHAFFERT, J. C. A formal definition of CLU. Master's thesls, MIT, Dept. of Computer Science, Cambridge, Mass., Jan. 1978 (Tech. Rep. MIT/LCS/TR-193).
|
| |
33
|
|
 |
34
|
|
| |
35
|
TOFTE, M. Operational semantics and polymorphic type inference. Ph.D. thesis, Computer Science Dept., Edinburgh Univ., Edinburgh, Scotland, 1988 (Tech. Rep. CST-52-88).
|
| |
36
|
WEm, P., APO~TE, M.-V., LAWLLE, A., MAUXY, M., A~D SU~REZ, A. The CAML reference manual, Version 2.6. Tech. Rep., Projet Formel, INRIA-ENS, Paris, 1989.
|
CITED BY 49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mark Shields , Tim Sheard , Simon Peyton Jones, Dynamic typing as staged type inference, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.289-302, January 19-21, 1998, San Diego, California, United States
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
André Pang , Don Stewart , Sean Seefried , Manuel M. T. Chakravarty, Plugging Haskell in, Proceedings of the 2004 ACM SIGPLAN workshop on Haskell, September 22-22, 2004, Snowbird, Utah, USA
|
|
|
|
|
|
|
|
|
Dimitrios Vytiniotis , Geoffrey Washburn , Stephanie Weirich, An open and shut typecase, Proceedings of the 2005 ACM SIGPLAN international workshop on Types in languages design and implementation, p.13-24, January 10-10, 2005, Long Beach, California, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Paolo Manghi , Fabio Simeoni , David Lievens , Richard Connor, Hybrid applications over XML: integrating the procedural and declarative approaches, Proceedings of the 4th international workshop on Web information and data management, November 08-08, 2002, McLean, Virginia, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Catherine Dubois , François Rouaix , Pierre Weis, Extensional polymorphism, Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.118-129, January 23-25, 1995, San Francisco, California, United States
|
|
|
Sam Tobin-Hochstadt , Matthias Felleisen, Interlanguage migration: from scripts to programs, Companion to the 21st ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
|
|
|
|
|
|
|
|
|
|
|
|
John Billings , Peter Sewell , Mark Shinwell , Rok Strniša, Type-safe distributed programming for OCaml, Proceedings of the 2006 workshop on ML, September 16-16, 2006, Portland, Oregon, USA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
REVIEW
"Ramaswamy Ramanujam : Reviewer"
Checking type correctness of operations often becomes
necessary at runtime: consider, for example, the
read operation. In this paper, the authors propose the use of a data
type called Dynamic. Values of this type are pai
more...
|