Skip to content

First class support for type parameters in VIR #187

@fpoli

Description

@fpoli

Currently, the vir module in which statements and expressions are defined has no notion of type parameters. To support Rust code that uses type parameters, Prusti uses a fragile regexp-based approach implemented in prusti-common/src/vir/ast/typaram.rs, plus a variety of hacks that can be found by searching for one of the following comments.

  • // FIXME; hideous monstrosity...
  • // FIXME oh dear...
  • // FIXME: the following fields serve a grotesque hack.
  • // FIXME: A hack. Replaces all generic types with their instantiations

To avoid the regular expressions and the hacks, we could extend vir::Expr and vir::Type to make them aware of type parameters and type substitutions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions