Skip to content
Snippets Groups Projects
  • Etienne Kneuss's avatar
    1708d239
    Implement generics for functions and ADTs · 1708d239
    Etienne Kneuss authored
    - Calling functions are now typed, FunctionInvokation takes a
      TypedFunDef which is basically a FunDef with type parameters' values.
      Instantiation of types within the signature/body is done on demand
      through this wrapper class.
    
    - Operations on ADTs are now taking a *ClassType instead of *ClassDef.
      Similarly, Case/AbstractClassType takes values for type parameters.
    
    - Introduces a GenericValue tree for models targeting abstract types.
      e.g. foo[T](a: T, b: T) { a == b } ensuring (_) will find a model with
      { a -> T#1, b -> T#2 }
    
    - Only "simple" hierarchies allowed with type parameters. All members of
      the hierarchy must define the same number of type parameters and
      correctly pass them to parent classes.
    
    - Type parameters are invariant.
    1708d239
    History
    Implement generics for functions and ADTs
    Etienne Kneuss authored
    - Calling functions are now typed, FunctionInvokation takes a
      TypedFunDef which is basically a FunDef with type parameters' values.
      Instantiation of types within the signature/body is done on demand
      through this wrapper class.
    
    - Operations on ADTs are now taking a *ClassType instead of *ClassDef.
      Similarly, Case/AbstractClassType takes values for type parameters.
    
    - Introduces a GenericValue tree for models targeting abstract types.
      e.g. foo[T](a: T, b: T) { a == b } ensuring (_) will find a model with
      { a -> T#1, b -> T#2 }
    
    - Only "simple" hierarchies allowed with type parameters. All members of
      the hierarchy must define the same number of type parameters and
      correctly pass them to parent classes.
    
    - Type parameters are invariant.