Documentation

Strata.Languages.Laurel.InferHoleTypes

@[implicit_reducible]
Equations
  • One or more equations did not get rendered due to their size.

Hole Type Inference #

Annotate each .Hole node with a type inferred from its surrounding context using the SemanticModel and computeExprType. After this pass every Hole carries some ty so that the hole elimination pass can generate correctly typed uninterpreted functions.

Every node is handled by inferExpr with an expectedType parameter. For statement positions the expected type is TVoid, except for the last statement in a block which inherits the block's expected type, and for return expressions which use the procedure's output type.

  • holesAnnotated : InferHoleTypesStats

    Number of holes successfully annotated with an inferred type.

  • holesLeftUnknown : InferHoleTypesStats

    Number of holes left with Unknown type (context could not determine type).

Instances For
    Instances For

      Annotate every .Hole in the program with a type inferred from context.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For