Theory Tuple4
theory Tuple4
imports
More_Sepref.WB_More_Refinement IsaSAT_Literals
begin
text ‹
This is the setup for accessing and modifying the state as an abstract tuple of 4 elements.
The construction is kept generic
(even if still targetting only our state). There is a lot of copy-paste that would be nice to automate
at some point.
We define 3 sort of operations:
▸ extracting an element, replacing it by an default element. Modifies the state. The name starts
with \<^text>‹exctr›
▸ reinserting an element, freeing the current one. Modifies the state. The name starts with
\<^text>‹update›
▸ in-place reading a value, possibly with pure parameters. Does not modify the state. The name
starts with \<^text>‹read›
›