Download presentation
Presentation is loading. Please wait.
Published byAdam Rose Modified over 8 years ago
1
Hybrid Type Checking An implementation of λ H David Waern Rickard Nilsson
2
Hybrid Type Checking Cormac Flanagan POPL 2006 A combination of Static and Dynamic checking If a specification can't be checked statically, it will be checked dynamically Dynamic Type Casts Casts are inserted when static checking fails to prove or disprove
3
Hybrid Type Checking Precise specifications are supported Advanced specifications and static analyses can be tried out Selectable trade-off between compilation speed and coverage
4
λHλH Typed λ -calculus Refinement types Natural = {x:Int | x > 0} Dependent function types f :: m:Int -> n:Natural -> {x: Int | x = m + n} Undecidable type checking
5
Implementatio n Follows Flanagan's description closely Haskell
6
Parse r Parsec parser combinator library Tested with QuickCheck
7
Type checker / Compiler Basic structural static type checking Actual checking done in subtyping function Casts injected if sub typer fails
8
Subtyping Simple rejections Accepts types with structurally equal predicates Refinement predicate evaluation for applications of constants Easily extendable Possible to plugin a theorem prover
9
Interprete r Evaluates inserted casts, which may fail
10
Demonstratio n
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.