Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/96709.96747acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

Quasi-static typing

Published: 01 December 1989 Publication History

Abstract

We present a new approach to dynamic typing in a static framework. Our main innovation is the use of structural subtyping for dynamic types based on the idea that possible dynamic typing as a property should be inherited by objects of all types. Two properties of our system set it apart from existing systems which combine static and dynamic typing: all tagging and checking takes place via implicit coercions, and the semantics of dynamic typing is representation independent. The latter property leads to a significant increase in expressive power—for instance it allows us to define a general call-by-value fixpoint operator.
The resulting system—which we call quasi-static typing—is a seamless merger of static and dynamic typing. The system divides programs into three categories: well-typed, ill-typed and ambivalent programs. Ill-typed programs contain expressions that are guaranteed to go wrong. Run-time checking is limited to doubtful function applications in ambivalent programs. Conceptually, quasi-static typing takes place in an unusual two-phase process—a first phase infers types and coercions and a second plausibility checking phase identifies ill-typed programs. The typing rules allow minimal typing judgements and plausibility checking can be characterized as simplification via a canonical set of rewrite rules. The two phase process can therefore be implemented with a one pass algorithm.

References

[1]
M.P. Atkinson, P.J. Bailey, K.J. Chisholm, P.W. Cockshott, and R. Morrison. An approach to persistent programming. The Computer Journal, 26(4):360-365, 1983.
[2]
Martin Abadi, Luea Cardelli, Benjamin Pierce, and Gordon Plotkin. Dynamic typing in a statically typed language. In Proc. of Sixteenth POPL Symposium. ACM, January 1989.
[3]
V. Breazu-Tannen, T. Coquand, C. Gunter, and A. Scedrov. Inheritance and explicit coercion. In Proc. of Fourth LICS Symposium. IEEE, June 1989.
[4]
Luca Cardelli. Amber. In Guy Cousineau, Pierre-Louis Curien, and Bernard Robinet, editors, Combinators and Functional Programming Languages. Springer Verlag, 1986. Lecture Notes in Computer Science, Vol. 242.
[5]
Luca Cardelli, January 1989. Personal Communication.
[6]
Luca Cardelli, James Donahue, Mick Jordan, Bill Kaslow, and Greg Nelson. The modula-3 type system. In Proc. of Sixteenth POPL Symposium. ACM, January 1989.
[7]
L. Cardelti and P. Wegner. On understanding types, data abstraction and polymorphism. Computing Surveys, 17(4), 1985.
[8]
G. Huet. Confluent reductions: Abstract properties and applications to term rewriting. J. Assoc. Comp. Mach., 27(4):797- 821, 1980.
[9]
Edmund Robinson and Robert Tennent, October 1988. Note sent to "Types" E- mail forum.
[10]
Satish R. Thatte. Type inference with partial types. In Timo Lepisto and Arto Salomaa, editors, Automata, languages and programming : 15th International Cok loquium, pages 615-629. Springer-Verlag, July 1988. Lecture Notes in Computer Science, Vol. 317.
[11]
Satish R. Thatte. Type inference and implicit scaling, 1989. To Appear.
[12]
C. Wadsworth. The relation between computational and denotational properties for Scott's Do~ models of the )~-calculus. SIAM J. Camput., 5(3):488-520, 1976.

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '90: Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
December 1989
401 pages
ISBN:0897913434
DOI:10.1145/96709
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 December 1989

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)135
  • Downloads (Last 6 weeks)19
Reflects downloads up to 18 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Type-directed operational semantics for gradual typingJournal of Functional Programming10.1017/S095679682400007834Online publication date: 26-Sep-2024
  • (2023)Typed–Untyped Interactions: A Comparative AnalysisACM Transactions on Programming Languages and Systems10.1145/357983345:1(1-54)Online publication date: 5-Mar-2023
  • (2022)Static type checking without downcast operatorInformation Processing Letters10.1016/j.ipl.2022.106285(106285)Online publication date: May-2022
  • (2019)Complete monitors for gradual typesProceedings of the ACM on Programming Languages10.1145/33605483:OOPSLA(1-29)Online publication date: 10-Oct-2019
  • (2019)A verified, efficient embedding of a verifiable assembly languageProceedings of the ACM on Programming Languages10.1145/32903763:POPL(1-30)Online publication date: 2-Jan-2019
  • (2019)A calculus for Esterel: if can, can. if no can, no can.Proceedings of the ACM on Programming Languages10.1145/32903743:POPL(1-29)Online publication date: 2-Jan-2019
  • (2019)Weak-consistency specification via visibility relaxationProceedings of the ACM on Programming Languages10.1145/32903733:POPL(1-28)Online publication date: 2-Jan-2019
  • (2019)Decoupling lock-free data structures from memory reclamation for static analysisProceedings of the ACM on Programming Languages10.1145/32903713:POPL(1-31)Online publication date: 2-Jan-2019
  • (2019)StkTokens: enforcing well-bracketed control flow and stack encapsulation using linear capabilitiesProceedings of the ACM on Programming Languages10.1145/32903323:POPL(1-28)Online publication date: 2-Jan-2019
  • (2019)Dynamic type inference for gradual Hindley–Milner typingProceedings of the ACM on Programming Languages10.1145/32903313:POPL(1-29)Online publication date: 2-Jan-2019
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media