class Z3::StringExpr

The Ruby side of this reads like Ruby’s String - see SeqExpr for why the two don’t share a hierarchy even though Z3 models a String as a Seq(Char).

Where Ruby and SMT-LIB disagree, Ruby wins: ‘#include?` rather than `contains?`, `#sub` / `#gsub` rather than `replace` / `replace_all`, the receiver back in front of `#start_with?`, and a negative index counted from the end.

Where Ruby answers ‘nil` there’s no conflict to resolve, because there’s nothing to answer. Every one of these is a subexpression - ‘s` can appear as `s + “!”`, or under an `==`, or buried in a term a model hands back - so it has to denote a String, and no String is `nil`. Those just return whatever Z3 returns, and the method comments say what that is.