I have just encountered this sentence:
Depending on the context, we may prefer to model integers as bitvectors rather than mathematical integers, since the Int type does not model overflow.
I am wondering what this means. I am new to learning about integer overflow. Wondering what it means to model integers as bitvectors and how you would do that. And then how that would allow you to account for overflow (wondering if you would then write tests for it of some sort, or it is somehow implicit in the model). It is intriguing the idea of modeling integers so that they take into account real-world problems like integer overflows. Maybe if it could be outlined using JavaScript as an example which I am familiar with that would be helpful.
Another paper says something similar:
Overflows are a common source of programming errors, which makes it crucial to model them accordingly. In the theory of fixed-size bitvectors, overflow effects are directly modeled by the semantics of its function symbols and require no extra encoding constraints. These properties make bitvector logic a perfect fit for many verification purposes, especially in the field of low-level programming.