summaryrefslogtreecommitdiff
path: root/src/gen_lib/sail2_state_monad.lem
AgeCommit message (Collapse)Author
2019-04-25More read/write function updatesBrian Campbell
2018-12-03Add Write_mem event/outcome without tagThomas Bauereiss
The inter-instruction semantics is responsible for correctly handling memory writes without tags; the lifting to the state monad handles it as writing a value with a zero tag bit.
2018-12-03Make names of memory r/w events more consistentThomas Bauereiss
Use E_read_memt for reading tagged memory, as in sail2_impl_base.lem, and rename E_write_mem to E_write_memt, since it always writes a tag.
2018-11-30Rename Undefined outcome to ChooseThomas Bauereiss
It is used for nondeterministic choice, so Undefined might be misleading.
2018-11-29Add separate outcome/event for tagged memory loadsThomas Bauereiss
Lets one distinguish in a trace whether an instruction tried to read tagged memory or just read data without caring about the tag; this is useful for formulating predicates on traces.
2018-11-20Use nat instead of (list bitU) for addresses in monad outcomesThomas Bauereiss
Removes some friction by back-and-forth conversion when handling events
2018-10-31Add helper functions in Sail Lem libraryThomas Bauereiss
Running traces, directly accessing memory state
2018-10-31Monad refactoring in Lem shallow embeddingThomas Bauereiss
- Merge tag reading/writing outcomes into memory value reading/writing outcomes - Add effective address to Write_mem; this duplicates information in the Write_ea outcome that should come before, but it makes the effective address more conveniently available in events and traces, and it allows the following simplification in the state monad: - Remove write_ea field from state record; the effective address is now expected as a parameter to the write_memS function - Remove last_exclusive_operation_was_load field from state record; this was used to keep track of exclusive loads, but this was a a relatively coarse approximation anyway, so it might make more sense to track this in (architecture-specific) Sail code. Overall, the state record now simply contains the fields regstate, memstate, tagstate.
2018-07-09Simplify treating of undefined_bool in Lem libraryThomas Bauereiss
Use nondeterministic choice by default instead of a deterministic bitstream generator in the state, which is slightly awkward to reason about, because every use of undefined_boolS changes the state. The previous behaviour can be implemented as Sail code, if desired. Also add a default implementation of internal_pick that nondeterministically chooses an element from a list.
2018-06-14rename all lem support files to sail2_foo to avoid conflict with sail1 in rmemJon French