| Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. Technical Report 2-184, Rice University, 31 March 1992. |
....from erroneous accesses by the user code. User code is simply less likely to make erroneous accesses to the separated tag space, and if better guarantees are required, memory protecting hardware can be used to shield the tag space during the execution of user code. The concept of soft typing [8, 9] was introduced in an e#ort to combine the benefits of static and dynamic typing for functional style languages. In this approach, static typing is employed to identify program statements that do not statically type check. These statements are subsequently instrumented to be dynamically ....
....e#ort to combine the benefits of static and dynamic typing for functional style languages. In this approach, static typing is employed to identify program statements that do not statically type check. These statements are subsequently instrumented to be dynamically type checked. The earlier work [8] concentrates on presenting a framework for soft typing on a restricted class of programming languages; the latter work [9] extends this work to handle realistic languages like Scheme. By addressing a traditionally dynamically typed language, the emphasis was put on the application of soft typing ....
M. Fagan. Soft typing: An approach to type checking for dynamically typed languages. Technical Report TR92-184, Department of Comp. Sci., Rice Univ., Houston, TX, USA, March 1998.
....it doesn t handle ADTs in the same manner that [3] does. Instead it uses facilities for defining record structures. There, however, are more suited for more advanced programmers, not students learning about ADTs. Its handling of recursive types and intersection types is based on the work of Fagan [12] and is richer, yet more complicated, than ours. The complexity of the types presented to the users is comparable with those of PLEAT. 6 FUTURE DIRECTIONS Future work for this system involves a treatment of union types and ad hoc polymorphism. This would allow coverage of more of the Scheme code ....
Michael Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, 1992.
....is more efficient than the left hand side. Applying another checkand untag, such as procedure to [boolean ] #t results in a run time error. We assume a Hindley Milner style polymorphic type language enriched with regular recursive types and discriminative sums, in the style of soft typing [Fag90,CF91,Wri94, WC94]; in addition, we introduce the notion of coercive types: ff j tc (n) 1 ; n ) j ff: j P tc tc( j ( oe : j 8ff:oe Here tc (n) ranges over type tags of arity n. We treat the procedure tag as a binary constructor, and we write 0 for ....
.... pair( 0 ) Recursive type abstractions of the form ff: are finite notations for possibly infinite, regular trees, as in [CC91] Types of the form P tc tc( are discriminative sums, where the top level type constructors of the summands are required to be distinct (see [Reh95] and also [Fag90] for more details. In this paper, we generally assume that tc ranges over the whole type constructor alphabet (denoted T ) in a sum. 1 We use k as a parameter for the number of constructors. Moreover, we assume a fixed ordering of the type constructors in T such that the summands are always ....
[Article contains additional citation context not shown here]
Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, 1990.
....ADTs in the same manner that [SpF89] does. It does, however, have facilities for defining and using structures. These, however, are more suited for more advanced programmers, not students learning about ADTs. Its handling of recursive types and intersection types is based on the work of Fagan [Fa90] and is richer, yet more complicated, than ours. The implementation of Soft Scheme is available via ftp from the Scheme repository (ftp.cs.indiana.edu in pub scheme repository imp) A working implementation consists of nearly 7000 lines of Scheme code, using many of the more advanced constructs ....
M. Fagan, Soft Typing: An Approach to Type Checking for Dynamically Typed Languages, PhD thesis, Rice University, 1992.
....that do not meet the stringent requirements of the type checker are ineligible for execution. In rejecting untypable programs, the type checker also rejects meaningful programs that it cannot prove are safe. Equivalent typable programs are often longer and more complicated. Soft type systems [4, 6] provide the benefits of static typing for dynamically typed languages. Like a static type checker, a soft type checker infers types for variables and expressions. But rather than reject programs containing untypable fragments, a soft type checker inserts explicit run time checks to transform ....
....inserts only 10 of the run time checks that are necessary for safe execution without soft typing. We have observed consequent speedups of up to 70 over a high quality Scheme compiler. Soft Scheme is based on a soft type system designed by Cartwright and Fagan for an idealized functional language [4, 6]. Their type system extends Hindley Milner typing with union types, recursive types, and a modicum of subtyping as subset on union types. Soft Scheme includes several major extensions to their technical results. First, we use a different representation for types that integrates polymorphism ....
[Article contains additional citation context not shown here]
Fagan, M. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, October 1990.
....of researchers working independently in surprisingly disparate contexts. The idea arises in several different ways: 1. as the dual of intersection types [1, 18, 38, and this report] 2. from logical or semantic considerations [25] 3. as a generalization of disjoint unions or variant records [11, 17]. Intuitively, union types stand in the same relation to disjoint union types (also called sum types or variant records) as ordinary set theoretic union does to set theoretic disjoint union. 1 Operationally: 1. The injections inl : 1 ( 1 2 ) and inr : 2 ( 1 2 ) are replaced by ....
....suggested by Leivant s work on infinitary intersections [27] In their paper they present several intruguing examples of encodings of algebraic datatypes, including the Berarducci numerals, which can be shown to have no uniform type in the second order polymorphic calculus. Fagan and Cartwright [11, 17] have developed an extension of the ML type system [20, 30] that includes both recursive types and a notion of true union of disjoint types. This is not quite the same as the union types described in this report, since for Fagan and Cartwright oe is defined only when oe and have different ....
Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, December 1990.
....Jones Wadler 1992) or Standard ML (Harper, Milner Tofte 1989) all necessary type checks are performed at runtime. This leads to the great expressiveness of Scheme but also makes programs hard to debug. Dynamically typed programming languages are more expressive than statically typed languages (Fagan 1992) and therefore cannot be typed statically at compile time in general. But because only small parts of typical Scheme programs rely on dynamic typing, actually most program parts are statically typable. Untypable parts may be either caused by code relying on dynamic typing or by programming errors, ....
....run time type checking can be omitted. Soft Typing for Scheme distinguishes code which needs run time type checking (and thus may be correct) and code which is definitely ill typed (and thus wrong) It uses a Milner style polymorphic type system with recursive and union types based on the work of Fagan (1992). Whenever an object is used with two disjoint types it will be assigned the union of these types. This leads to a very expressive type system which produces very exact but complicated types which are hard to understand by the programmer. In figure 6 union types are denoted by ( t 1 t 2 : ....
Fagan, M. (1992): Soft Typing: An Approach to Type Checking for Dynamically Types Languages, PhD thesis, Rice University, Houston, Texas, USA.
....checks. Furthermore, since x consists only of numbers, the numbers in the list (1 2 3) do not need tags to distinguish them from non numbers. This thesis explores the issues involved in designing a practical soft type system to provide type information for languages like Scheme. Soft typing [10, 16] is a generalization of traditional static typing that accommodates both static and dynamic typing in one framework. To introduce and motivate soft typing, we begin with a discussion of traditional static and dynamic type systems. 3 1.1 Static Type Systems Static type systems like that of core ....
....as static type systems do. Finally, the type information inferred by a soft type system provides opportunities for compiler optimizations. In particular, soft type systems optimize the placement of run time checks and the representations of data. 1. 4 Practical Soft Typing Cartwright and Fagan [10, 16] pioneered soft typing in 1991. Their work, which we discuss in greater detail later, established the theoretical feasibility of soft typing for a idealized core language. They found a type inference algorithm that assigns reasonably precise types to all purely functional programs. They also ....
[Article contains additional citation context not shown here]
Fagan, M. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, October 1990.
....programs that do not meet the stringent requirements of the type checker are ineligible for execution. In rejecting untypable programs, the type checker also rejects meaningful programs that it cannot prove are safe. Equivalent typable programs are often longer and more complicated. Soft typing [5, 7] is a generalization of static type checking that accommodates both dynamic typing and static typing in one framework. Like a static type checker, a soft type checker infers syntactic types for identifiers and expressions. The first author was supported by a National Defense Science and ....
....without soft typing. We have observed soft typed programs to run up to 3.3 times faster than ordinary dynamically typed programs. The type system underlying Soft Scheme is a refinement and extension of a soft type system designed by Cartwright and Fagan for an idealized functional language [5, 7]. Their system extends Hindley Milner typing with limited union types, recursive types, and a modicum of subtyping as subset on union types. Soft Scheme includes several major extensions to their technical results. First, we use a different representation for types that integrates polymorphism ....
[Article contains additional citation context not shown here]
Fagan, M. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, October 1990.
....doesn t handle ADTs in the same manner that [SpF89] does. Instead it uses facilities for defining record structures. These, however, are more suited for more advanced programmers, not students learning about ADTs. Its handling of recursive types and intersection types is based on the work of Fagan [Fa90] and is richer, yet more complicated, than ours. The complexity of the types presented to the user are comparable with those of PLEAT. 5. FUTURE DIRECTIONS Future work for this system involves a treatment of union types and ad hoc polymorphism. This would allow coverage of more of the Scheme ....
M. Fagan, Soft Typing: An Approach to Type Checking for Dynamically Typed Languages, PhD thesis, Rice University, 1992.
.... [88] the dual notion of union types [4, 73, 105, 107] and the relationship between intersection types and models of polymorphism [81, 104, 136] Some related extensions to ML style type inference systems are represented by the notions of refinement types [60, 72, 107] and soft typing [36, 59]. Reynolds provided the first demonstration that intersection types can be used as the basis for practical programming languages [118, 121] A primary goal of this thesis is to extend Reynolds work by studying the interaction of intersection types with other important type theoretic principles, ....
.... to express, say, that the type Bool is completely partitioned by True and False (as opposed to knowing only that True and False are both contained in Bool) Calculi incorporating various formulations of this notion have been proposed by the present author [107] and a number of other researchers [4, 60, 122, 36, 59, 73, 72], but their practicality and tractability remain unclear. A related extension of F arises from dualizing the upper bound of the bounded quantifier so that each variable is introduced with both an upper and a lower bound: 8oe 1 ff oe 2 : A fragment of this calculus with double bounded ....
Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, December 1990.
.... to Lisp [17] and Gomard has developed an algorithm specifically for partial inference of otherwise untypable functional programs [13] There is also the algorithm of Mishra and Reddy, which can deal with recursive structures [27] Closest in spirit to my work is soft typing (Cartwright and Fagan [11, 9]) Both a type inference system and a languagedesign manifesto, soft typing supports both recursive types and partial typing (the latter by inserting explicit type restrictions as part of type inference, which are then turned into run time type checks) The work of Aiken and Wimmers [2] is similar ....
Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. PhD thesis, Rice University, December 1990.
No context found.
Mike Fagan. Soft Typing: An Approach to Type Checking for Dynamically Typed Languages. Technical Report 2-184, Rice University, 31 March 1992.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC