Skip to content

Type error in tip printed from Stainless #153

@jad-hamza

Description

@jad-hamza

In a verification condition on the Stainless side, I have a term that contains this:

if (thiss.order.leq(thiss.array((n - 1))._1, elemRef(0)._1)) {
  Return[(Boolean, SortedArray[K, T], Array[(K, T)]), Unit]((false, thiss, elemRef))
} else {
  Proceed[(Boolean, SortedArray[K, T], Array[(K, T)]), Unit](())
}

After using --debug=tip, we get a tip file where the type instantiations on Return and Proceed are lost, so Inox understands the expression in the tip file as (and this leads to a type error):

if (thiss!108.order!107.leq!6(thiss!108.array!122.arr!2((n!29 - 1))._1!0, elemRef!41.arr!2(0)._1!0)) {
  Return!1[tuple3!0[Boolean, SortedArray!5[K!37, T!91], array!118[tuple2!0[K!37, T!91]]], Cur!0](tuple3!1[Boolean, SortedArray!5[K!37, T!91], array!118[tuple2!0[K!37, T!91]]](false, thiss!108, elemRef!41))
} else {
  Proceed!1[Ret!0, Unit!1](Unit!3)
}

Can we add the type instantiations (with _) in Printer.scala? (If so, what term should I use?) Can Inox parse it back?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions