FStar icon indicating copy to clipboard operation
FStar copied to clipboard

Literal strings in a function call fails a length refinement

Open briangmilnes opened this issue 1 year ago • 0 comments

module LiteralStringRefBug

open FStar.String

let replacePrefix (pre: string) (s: string{length pre <= length s}) (wth: string) : Tot string = s

let invalidAbbreviations confs = replacePrefix "<HOME>" "<HOME>/bin/fstar.exe" "/usr/mlnes"

the second string is failing on the length refinement. if length tests before it allows it to pass.

So something must be a bit funky in what Z3 is getting wrt literal strings.

briangmilnes avatar May 21 '23 00:05 briangmilnes