Dynamic Typing

14,000,000 Leading Edge Experts on the ideXlab platform

Scan Science and Technology

Contact Leading Edge Experts & Companies

Scan Science and Technology

Contact Leading Edge Experts & Companies

The Experts below are selected from a list of 4005 Experts worldwide ranked by ideXlab platform

Nick Benton - One of the best experts on this subject based on the ideXlab platform.

  • correctness of compiling polymorphism to Dynamic Typing
    Journal of Functional Programming, 2016
    Co-Authors: Kuenbang Hou, Nick Benton, Robert Harper
    Abstract:

    The connection between polymorphic and Dynamic Typing was originally considered by Curry et al. (1972, Combinatory Logic, vol. ii) in the form of “polymorphic type assignment” for untyped λ-terms. Types are assigned after the fact to what is, in modern terminology, a Dynamic language. Interest in type assignment was revitalized by the proposals of Bracha et al. (1998, OOPSLA) and Bank et al. (1997, POPL) to enrich Java with polymorphism (generics), which in turn sparked the development of other languages, such as Scala, with similar combinations of features. In such a setting, where the target language already has a monomorphic type system, it is desirable to compile polymorphism to Dynamic Typing in such a way that as much static Typing as possible is preserved, relying on Dynamics only insofar as genericity is actually required. The basic approach is to compile polymorphism using embeddings from each type into a universal “top” type, , and partial projections that go in the other direction. This scheme is intuitively reasonable, and, indeed, has been used in practice many times. Proving its correctness, however, is non-trivial. This paper studies the compilation of System F to an extension of Moggi's computational meta-language with a Dynamic type and shows how the compilation may be proved correct using a logical relation.

  • t h e o r e t i c a l p e a r l s correctness of compiling polymorphism to Dynamic Typing
    2015
    Co-Authors: Kuenbang Hou, Nick Benton, Robert Harper
    Abstract:

    The connection between polymorphic and Dynamic Typing was originally considered by Curry, et al. in the form of “polymorphic type assignment” for untyped l -terms. Types are assigned after the fact to what is, in modern terminology, a Dynamic language. Interest in type assignment was revitalized by the proposals of Bracha, et al. and Bank, et al. to enrich Java with polymorphism (generics), which in turn sparked the development of other languages, such as Scala, with similar combinations of features. In that setting it is desirable to compile polymorphism to Dynamic Typing in such a way that as much static Typing as possible is preserved, relying on Dynamics only insofar as genericity is actually required. The basic approach is to compile polymorphism using embeddings from each type into a universal ‘top’ type, dyn, and partial projections that go in the other direction. This scheme is intuitively reasonable, and, indeed, has been used in practice many times. Proving its correctness, however, is non-trivial. This paper studies the compilation of System F to an extension of Moggi’s computational metalanguage with a Dynamic type and shows how the compilation may be proved correct using a logical relation.

  • undoing Dynamic Typing declarative pearl
    International Symposium on Functional and Logic Programming, 2008
    Co-Authors: Nick Benton
    Abstract:

    We propose undoable versions of the projection operations used when programs written in higher-order statically-typed languages interoperate with Dynamically typed ones, localizing potential runtime errors to the point at which a Dynamic value is projected to a static type. The idea is demonstrated by using control operators to implement backtracking projections from an untyped Scheme-like language to ML.

  • undoing Dynamic Typing
    International Symposium on Functional and Logic Programming, 2008
    Co-Authors: Nick Benton
    Abstract:

    We propose undoable versions of the projection operations used when programs written in higher-order statically-typed languages interoperate with Dynamically typed ones, localizing potential runtime errors to the point at which a Dynamic value is projected to a static type. The idea is demonstrated by using control operators to implement backtracking projections from an untyped Scheme-like language to ML.

Miguel Garcia - One of the best experts on this subject based on the ideXlab platform.

  • Optimizing runtime performance of hybrid Dynamically and statically typed languages for the .Net platform
    Journal of Systems and Software, 2016
    Co-Authors: Jose Quiroga, Francisco Ortin, David Llewellyn-jones, Miguel Garcia
    Abstract:

    We optimize Dynamically typed operations of hybrid Typing languages for .Net.The optimizations are applied to binary files and included in an existing compiler.For short-running programs, average performance gains vary from 44.6% to 406%.For long-running applications, average performance gains vary from 224% to 1113%.Memory consumption increase goes from 6.2% to 64.5%. Dynamically typed languages have become popular in scenarios where high flexibility and adaptability are important issues. On the other hand, statically typed languages provide important benefits such as earlier type error detection and, usually, better runtime performance. The main objective of hybrid statically and Dynamically typed languages is to provide the benefits of both approaches, combining the adaptability of Dynamic Typing and the robustness and performance of static Typing. The Dynamically typed code of hybrid languages for the .Net platform typically use the introspection services provided by the platform, incurring a significant performance penalty. We propose a set of transformation rules to replace the use of introspection with optimized code that uses the services of the Dynamic Language Runtime. These rules have been implemented as a binary optimization tool, and included as part of an existing open source compiler. Our system has been used to optimize 37 programs in 5 different languages, obtaining significant runtime performance improvements. The additional memory resources consumed by optimized programs have always been lower than the corresponding performance gains obtained.

  • supporting Dynamic and static Typing by means of union and intersection types
    IEEE International Conference on Progress in Informatics and Computing, 2010
    Co-Authors: Francisco Ortin, Miguel Garcia
    Abstract:

    Although static Typing provides early type error detection, better legibility and abstraction, and more opportunities for compiler optimizations, Dynamic Typing supplies a high degree of runtime adaptiveness, providing an agile and interactive development suitable for rapid protoTyping. In this article, the minimal core type system of a programming language which main aim is to provide the benefits of both Dynamic and static Typing is presented. Keeping explicit Typing, implicit type inference is introduced to combine Dynamic and static Typing in the same programming language. Union and intersection types are customized to express the dynamism of implicitly typed references. The main benefits of our work are an early type error detection in Dynamic code, the integration of Dynamic and static code in the same programming language, and a notable optimization of the generated code.

  • including both static and Dynamic Typing in the same programming language
    IET Software, 2010
    Co-Authors: Francisco Ortin, Daniel Zapico, Jose Baltasar Garcia Perezschofield, Miguel Garcia
    Abstract:

    Dynamic languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid protoTyping or the construction of applications that require runtime adaptiveness. These languages are built on the idea of supporting reasoning about (and customising) program structure, behaviour and environment at runtime. The dynamism offered by Dynamic languages is, however, counteracted by two main limitations: no early type error detection and fewer opportunities for compiler optimisations. To obtain the benefits of both Dynamically and statically typed languages, the authors have designed the StaDyn programming language that provides both approaches. StaDyn keeps gathering-type information at compile time, even when Dynamic variables are used. This type information is used to offer early type error detection, direct interoperation between static and Dynamic codes and better runtime performance. Following the Separation of Concerns principle, it is possible to customise the trade-off between runtime flexibility of Dynamic Typing and safety, performance and robustness of static Typing. A runtime performance assessment is presented to show an estimate of the benefits of combining Dynamic and static Typing in the same programming language.

  • a programming language that combines the benefits of static and Dynamic Typing
    International Conference on Software and Data Technologies, 2010
    Co-Authors: Francisco Ortin, Miguel Garcia
    Abstract:

    Dynamically typed languages have recently turned out to be suitable for developing specific scenarios where Dynamic adaptability or rapid protoTyping are important issues. However, statically typed programming languages commonly offer more opportunities for compiler optimizations and earlier type error detection. Due to the benefits of both approaches, some programming languages such as C# 4.0, Boo, Visual Basic or Objective-C provide both static and Dynamic Typing. We describe the StaDyn programming language that supports both type systems in the very same programming language. The main contribution of StaDyn is that it keeps gathering type information at compile time even over Dynamically typed references, obtaining a better runtime performance, earlier type error detection, and an intuitive combination of statically and Dynamically typed code.

Francisco Ortin - One of the best experts on this subject based on the ideXlab platform.

  • Optimizing runtime performance of hybrid Dynamically and statically typed languages for the .Net platform
    Journal of Systems and Software, 2016
    Co-Authors: Jose Quiroga, Francisco Ortin, David Llewellyn-jones, Miguel Garcia
    Abstract:

    We optimize Dynamically typed operations of hybrid Typing languages for .Net.The optimizations are applied to binary files and included in an existing compiler.For short-running programs, average performance gains vary from 44.6% to 406%.For long-running applications, average performance gains vary from 224% to 1113%.Memory consumption increase goes from 6.2% to 64.5%. Dynamically typed languages have become popular in scenarios where high flexibility and adaptability are important issues. On the other hand, statically typed languages provide important benefits such as earlier type error detection and, usually, better runtime performance. The main objective of hybrid statically and Dynamically typed languages is to provide the benefits of both approaches, combining the adaptability of Dynamic Typing and the robustness and performance of static Typing. The Dynamically typed code of hybrid languages for the .Net platform typically use the introspection services provided by the platform, incurring a significant performance penalty. We propose a set of transformation rules to replace the use of introspection with optimized code that uses the services of the Dynamic Language Runtime. These rules have been implemented as a binary optimization tool, and included as part of an existing open source compiler. Our system has been used to optimize 37 programs in 5 different languages, obtaining significant runtime performance improvements. The additional memory resources consumed by optimized programs have always been lower than the corresponding performance gains obtained.

  • type inference to optimize a hybrid statically and Dynamically typed language
    The Computer Journal, 2011
    Co-Authors: Francisco Ortin
    Abstract:

    Dynamically typed languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid protoTyping or the construction of applications that require runtime adaptiveness. In contrast, statically typed languages have undeniable advantages such as early type error detection and more opportunities for compiler optimizations. Since both approaches offer different benefits, hybrid statically and Dynamically typed programming languages have emerged, and some statically typed languages have also incorporated Dynamic Typing capabilities. In this paper, we present the minimal core of StaDyn, a hybrid Typing language that performs static type inference of both statically and Dynamically typed references. The type information gathered by the compiler is used to generate efficient.NET code, obtaining a significant runtime performance improvement compared with C# 4.0 and Visual Basic 10.

  • supporting Dynamic and static Typing by means of union and intersection types
    IEEE International Conference on Progress in Informatics and Computing, 2010
    Co-Authors: Francisco Ortin, Miguel Garcia
    Abstract:

    Although static Typing provides early type error detection, better legibility and abstraction, and more opportunities for compiler optimizations, Dynamic Typing supplies a high degree of runtime adaptiveness, providing an agile and interactive development suitable for rapid protoTyping. In this article, the minimal core type system of a programming language which main aim is to provide the benefits of both Dynamic and static Typing is presented. Keeping explicit Typing, implicit type inference is introduced to combine Dynamic and static Typing in the same programming language. Union and intersection types are customized to express the dynamism of implicitly typed references. The main benefits of our work are an early type error detection in Dynamic code, the integration of Dynamic and static code in the same programming language, and a notable optimization of the generated code.

  • including both static and Dynamic Typing in the same programming language
    IET Software, 2010
    Co-Authors: Francisco Ortin, Daniel Zapico, Jose Baltasar Garcia Perezschofield, Miguel Garcia
    Abstract:

    Dynamic languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid protoTyping or the construction of applications that require runtime adaptiveness. These languages are built on the idea of supporting reasoning about (and customising) program structure, behaviour and environment at runtime. The dynamism offered by Dynamic languages is, however, counteracted by two main limitations: no early type error detection and fewer opportunities for compiler optimisations. To obtain the benefits of both Dynamically and statically typed languages, the authors have designed the StaDyn programming language that provides both approaches. StaDyn keeps gathering-type information at compile time, even when Dynamic variables are used. This type information is used to offer early type error detection, direct interoperation between static and Dynamic codes and better runtime performance. Following the Separation of Concerns principle, it is possible to customise the trade-off between runtime flexibility of Dynamic Typing and safety, performance and robustness of static Typing. A runtime performance assessment is presented to show an estimate of the benefits of combining Dynamic and static Typing in the same programming language.

  • a programming language that combines the benefits of static and Dynamic Typing
    International Conference on Software and Data Technologies, 2010
    Co-Authors: Francisco Ortin, Miguel Garcia
    Abstract:

    Dynamically typed languages have recently turned out to be suitable for developing specific scenarios where Dynamic adaptability or rapid protoTyping are important issues. However, statically typed programming languages commonly offer more opportunities for compiler optimizations and earlier type error detection. Due to the benefits of both approaches, some programming languages such as C# 4.0, Boo, Visual Basic or Objective-C provide both static and Dynamic Typing. We describe the StaDyn programming language that supports both type systems in the very same programming language. The main contribution of StaDyn is that it keeps gathering type information at compile time even over Dynamically typed references, obtaining a better runtime performance, earlier type error detection, and an intuitive combination of statically and Dynamically typed code.

Vladimir Filkov - One of the best experts on this subject based on the ideXlab platform.

  • a large scale study of programming languages and code quality in github
    Communications of The ACM, 2017
    Co-Authors: Daryl Posnett, Premkumar Devanbu, Vladimir Filkov
    Abstract:

    What is the effect of programming languages on software quality? This question has been a topic of much debate for a very long time. In this study, we gather a very large data set from GitHub (728 projects, 63 million SLOC, 29,000 authors, 1.5 million commits, in 17 languages) in an attempt to shed some empirical light on this question. This reasonably large sample size allows us to use a mixed-methods approach, combining multiple regression modeling with visualization and text analytics, to study the effect of language features such as static versus Dynamic Typing and allowing versus disallowing type confusion on software quality. By triangulating findings from different methods, and controlling for confounding effects such as team size, project size, and project history, we report that language design does have a significant, but modest effect on software quality. Most notably, it does appear that disallowing type confusion is modestly better than allowing it, and among functional languages, static Typing is also somewhat better than Dynamic Typing. We also find that functional languages are somewhat better than procedural languages. It is worth noting that these modest effects arising from language design are overwhelmingly dominated by the process factors such as project size, team size, and commit size. However, we caution the reader that even these modest effects might quite possibly be due to other, intangible process factors, for example, the preference of certain personality types for functional, static languages that disallow type confusion.

  • a large scale study of programming languages and code quality in github
    Foundations of Software Engineering, 2014
    Co-Authors: Daryl Posnett, Vladimir Filkov, Premkumar Devanbu
    Abstract:

    What is the effect of programming languages on software quality? This question has been a topic of much debate for a very long time. In this study, we gather a very large data set from GitHub (729 projects, 80 Million SLOC, 29,000 authors, 1.5 million commits, in 17 languages) in an attempt to shed some empirical light on this question. This reasonably large sample size allows us to use a mixed-methods approach, combining multiple regression modeling with visualization and text analytics, to study the effect of language features such as static v.s. Dynamic Typing, strong v.s. weak Typing on software quality. By triangulating findings from different methods, and controlling for confounding effects such as team size, project size, and project history, we report that language design does have a significant, but modest effect on software quality. Most notably, it does appear that strong Typing is modestly better than weak Typing, and among functional languages, static Typing is also somewhat better than Dynamic Typing. We also find that functional languages are somewhat better than procedural languages. It is worth noting that these modest effects arising from language design are overwhelmingly dominated by the process factors such as project size, team size, and commit size. However, we hasten to caution the reader that even these modest effects might quite possibly be due to other, intangible process factors, e.g., the preference of certain personality types for functional, static and strongly typed languages.

Michael Hicks - One of the best experts on this subject based on the ideXlab platform.

  • static type inference for ruby
    ACM Symposium on Applied Computing, 2009
    Co-Authors: Michael Furr, Jeffrey S Foster, Michael Hicks
    Abstract:

    Many general-purpose, object-oriented scripting languages are Dynamically typed, which provides flexibility but leaves the programmer without the benefits of static Typing, including early error detection and the documentation provided by type annotations. This paper describes Diamondback Ruby (DRuby), a tool that blends Ruby's Dynamic type system with a static Typing discipline. DRuby provides a type language that is rich enough to precisely type Ruby code we have encountered, without unneeded complexity. When possible, DRuby infers static types to discover type errors in Ruby programs. When necessary, the programmer can provide DRuby with annotations that assign static types to Dynamic code. These annotations are checked at run time, isolating type errors to unverified code. We applied DRuby to a suite of benchmarks and found several bugs that would cause run-time type errors. DRuby also reported a number of warnings that reveal questionable programming practices in the benchmarks. We believe that DRuby takes a major step toward bringing the benefits of combined static and Dynamic Typing to Ruby and other object-oriented languages.