Partial notes to How to Write Formally Verifiable Specifications in Python
The talk slides
Problem: Mutable objects
Due to aliasing, writing to a reference may implicitly modify values obtained via other references. In the F/V context, it invalidates what we know about affected memory locations. Tracking aliasing and re-establishing properties can significantly complicate reasoning.
Solution
Use immutable objects (non-destructive updates). Can be facilitated by pyrsistent library.