Store then Select at the same index gives the written value.
(self, kernel)
| 597 | assert isinstance(c._ast, ConstArrayNode) |
| 598 | |
| 599 | def test_select_store_same_index(self, kernel): |
| 600 | """Store then Select at the same index gives the written value.""" |
| 601 | a = Array("a", IntSort(), IntSort()) |
| 602 | v = Int("v") |
| 603 | written = Store(a, IntVal(3), v) |
| 604 | read_back = Select(written, IntVal(3)) |
| 605 | claim = ForAll([a, v], read_back == v) |
| 606 | assert _try_prove(claim) |
| 607 | |
| 608 | def test_constant_array_read(self, kernel): |
| 609 | """Reading from a constant array gives the constant value.""" |