Abstract

Gradual typing is a modern approach for combining benefits of static typing and dynamic typing. Although scientific research aim for soundness of type systems, many of languages intentionally make their type system unsound for speeding up performance. This paper describes an implementation of a dialect for Lama programming language that supports gradual typing with explicit annotation of dangerous parts of code. The target of current implementation is to grant type safety to programs while keeping their power of untyped expressiveness. This paper covers implementation issues and properties of created type system. Finally, some perspectives on improving precision and soundness of type system are discussed.

Highlights

  • There are different approaches of type system implementation

  • Static type systems are well-known for preventing many undesired behaviors of the program at compile time by reasoning about possible values that expression may or may not take (e.g., Java, Haskell, ...)

  • That means correct type-annotated Lama expressions can be rejected by typechecker with such relationship definition ∼. This is a common illness of every static typechecker because we would like to check nontrivial property of the code: to be statically correct [15]

Read more

Summary

Introduction

There are different approaches of type system implementation. Static type systems are well-known for preventing many undesired behaviors of the program at compile time by reasoning about possible values that expression may or may not take (e.g., Java, Haskell, ...). The most noticeable state-of-the-art of gradual typing: every industrial-level language doesn’t care much about soundness of the type system This is because of the performance issues. The expected result is programming language that can mix two types of code: with semantics that respects type safety in necessary parts of the code (e.g., sound); with original semantics without overheads. This should allow programmer to choose what parts of program should be gradually typed, and what parts of program should not be typed. The slowdown may be arbitrary, but we will try to reproduce results from article (at least × slowdown)

Examples
Cast Performance Analyzing
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call