Consider the two function definitions
test1 (x:nat) res:set of nat
== { m | m:nat & m in set {0,...,x} };
test2 (x:nat) res:set of nat
== { m | m in set {0,...,x} & true };
Running test2(1000) in Overture gives the set of natural numbers up to 1000. Running test1(1000) gives the set of natural numbers up to 255. I understand there are complications when there are explicit type bindings in explicit function definitions, but in this case it just silently gives the wrong answer. It seems that when a type binding for natural numbers appears in a definition, the range is restricted to 0..255. At least, thats what seems to be happening from the outside.
Chapter 8 of the language manual states "Notice that type binds can only be executed by the VDM interpreters in case the type can be deduced to be finite statically." Are there any rules for when the type can be deduced to be finite statically?
I'm pretty sure now that this behaviour is a feature of Overture that I didn't know about. By default, the interpreter cannot handle type binds for infinite types, but there is an option in the "Debugger" launcher tab to allow numeric type binds (int, nat, nat1 and curiously, real) to expand to a range of integer values from "minint" to "maxint". You also have to tick the "numeric_type_bind_generation" box to enable the functionality.
So I'm sorry about the earlier confusion. I don't think this feature is particularly useful and I've never heard of anyone using it, but I'm pretty sure it explains what you're seeing.