summaryrefslogtreecommitdiff
path: root/src/lem_interp
AgeCommit message (Collapse)Author
2019-11-07Fix Jenkins buildAlasdair Armstrong
sail2_instr_kinds was in the folder with the old lem interpreter for some reason, rather than with all the other sail2*.lem files
2019-07-31Revert "Need to separate out the 0.10 lem library from upcoming 0.11"Alasdair Armstrong
This reverts commit 3fb4cf236c0d4b15831576faa45c763853632568.
2019-07-18Need to separate out the 0.10 lem library from upcoming 0.11Alasdair Armstrong
Unlike the prompt-monad change I don't see a way to do this easily purely on the model side Make sure a64_barrier_type and domain aren't visible for RISC-V isabelle build
2019-07-18Support DMB/DSB domainsShaked Flur
2019-03-09Adds missing bits for DC/ICShaked Flur
2018-12-22Added RISC-V fence.tsoShaked Flur
2018-08-07Revert "Warnings: deal with all the deprecation warnings"Alasdair Armstrong
One day we will be free from the 4.02.3 menace, but today is not that day. :( This should fix Sail on Jenkins This reverts commit 86e29bcbb1597c4ef1f6cae8edbeed42f9a31414.
2018-07-26Warnings: deal with all the deprecation warningsAlastair Reid
Changes are: - String.capitalize -> String.capitalize_ascii - String.uppercase -> String.uppercase_ascii - String.lowercase -> String.lowercase_ascii Basically just making the change that the warning message suggested.
2018-07-10fix constructor typoJon French
2018-07-05restore missing RISC-V fence types in sail2; ignore io bits in fences more ↵Jon French
cleanly
2018-06-21changes to riscv model to support rmemJon French
2018-06-14rename all lem support files to sail2_foo to avoid conflict with sail1 in rmemJon French
2018-04-18Fix another reference to BK_natAlastair Reid
2018-03-12lem_interp: expose disable color flag in Printing_functions interfaceJon French
2018-02-17Merge master branch into sail2 for OCaml 4.06 compatibilityThomas Bauereiss
2018-02-15Re-engineer prompt monad of Lem shallow embeddingThomas Bauereiss
- Use simplified monad type (e.g., without the with_aux constructors that are not needed by the shallow embedding). - Add support for registers with arbitrary types (e.g., records, enumerations, vectors of vectors). Instead of using bit lists as the common representation of register values at the monad interface, use a register_value type that is generated per spec as a union of all register types that occur in the spec. Conversion functions between register_value and concrete types are generated. - Use the same representation of register references as the state monad, in preparation of rebasing the state monad onto the prompt monad. - Split out those types from sail_impl_base.lem that are used by the shallow embedding into a new module sail_instr_kinds.lem, and import that. Removing the dependency on Sail_impl_base from the shallow embedding avoids name clashes between the different monad types. Not yet done: - Support for reading/writing register slices. Currently, a rewriting pass pushes register slices in l-expressions to the right-hand side, turning a write to a register slice into a read-modify-write. For interfacing with the concurreny model, we will want to be more precise than that (in particular since some specs represent register files as big single registers containing a vector of bitvectors). - Lemmas about the conversion functions to/from register_value should be generated automatically.
2018-02-08replaced NIA_LR/CTR/register with NIA_indirect;Shaked Flur
removed IK_cond_branch, and added IK_branch
2018-01-29Linksem does not use uint anymoreShaked Flur
2018-01-22Update Lem shallow embedding to Sail2Thomas Bauereiss
- Remove vector start indices - Library refactoring: Definitions in sail_operators.lem now use Bitvector type class and work for both bit list and machine word representations - Add Lem bindings to AArch64 and RISC-V preludes TODO: Merge specialised machine word operations from sail_operators_mwords into sail_operators.
2017-12-30use linksem as a packageShaked Flur
2017-12-19Support user-defined exceptions in Lem shallow embeddingThomas Bauereiss
The type-checker already supports a user-defined "exception" type that can be used in throw and try-catch expressions. This patch adds support for that to the Lem shallow embedding by adapting the existing exception mechanisms of the state and prompt monads. User-defined exceptions are distinguished from builtin exception cases. For example, the state monad uses type ex 'e = | Exit | Assert of string | Throw of 'e to distinguish between calls to "exit", failed assertions, and user-defined exceptions, respectively. Early return is also handled using the exception mechanism, by lifting to a monad with "either 'r exception" as the exception type, where 'r is the expected return type and "exception" is the user-defined exception type.
2017-12-06Add top-level pattern match guards internallyBrian Campbell
Also fix bug in mono analysis with generated variables Breaks lots of typechecking tests because it generates unnecessary equality tests on units (and the tests don't have generic equality), which I'll fix next.
2017-12-06Merge remote branch 'experiments' into experimentsThomas Bauereiss
2017-12-06Make AST after rewriting for Lem backend type-checkableThomas Bauereiss
- Add support for some internal nodes to type checker - Add more explicit type annotations during rewriting - Remove hardcoded rewrites for E_vector_update etc from Lem pretty-printer; these will be resolved by the type checker during rewriting now
2017-12-05Update header files on masterAlasdair Armstrong
2017-12-05Update license headers for Sail sourceAlasdair Armstrong
2017-11-30Merge branch 'master' into experimentsAlasdair Armstrong
2017-11-29Better lem_ast tagging and interpreter tweaksAlasdair Armstrong
2017-11-29Switched to bytecode compiler for executing interpreter to avoid stack overflowAlasdair Armstrong
2017-11-17Fix Makefile for interpreter and update instruction_extractorAlasdair Armstrong
Instruction extractor code that I commented out in this commit seems buggy anyway - it will claim that the length of all bitvectors is 64?!
2017-11-17Fix interpreter to work with new typecheckerAlasdair Armstrong
Need to map sail type annotations to interpreter type annotations in lem_ast ouput. This doesn't seem too hard.
2017-11-02remove a lot of dead code form run_with_elf_cheri*Robert Norton
2017-11-02reset inCCallDelay in code that is not dead.Robert Norton
2017-11-01added RISC-V "fence r,r"Shaked Flur
2017-10-31cheri: throw an exception if there is an attempt to access C26/IDC in the ↵Robert Norton
delay slot of a ccall selector 1 call.
2017-10-25Alternative low-memory version of barrier_kindCompareBrian Campbell
2017-10-24fix default cap value on cheri128 following previous changes -- E stored in ↵Robert Norton
registers is no longer xored with 48 so need to initialise it. Also use E and T values used by CHERI hw and adjust decoding functions appropriately. Fix shift functions for ocaml shallow embedding which failed to handle shifts greater than vector length.
2017-10-09add translations for missing read/write kinds.Robert Norton
2017-10-09add translation of IK_mem_rmw interp_inter_imp. TODO: could we get rid of ↵Robert Norton
this and use shallow embedding conversion?
2017-10-06move nias_of_instruction into RMEM so that it can use shallow embedding ast ↵Robert Norton
and not obsolete interp_interface one.
2017-09-29fix those build errorsChristopher Pulte
2017-09-29fix deep_shallow_convert, stop using interp_interface.instruction for most ↵Christopher Pulte
things, SF and CP bugfixing
2017-09-21added a comment to the x86 lock'd read and writeShaked Flur
2017-09-20add support for x86 lock prefix (also remove unused Read/Write_tag kind in ↵Robert Norton
etc/regfp.sail.
2017-09-15x86: implement regfp analysis function (no control flow yet)Robert Norton
2017-09-15reinstate deep/shallow conversionChristopher Pulte
2017-09-03added RISC-V strong-acquire/releaseShaked Flur
2017-08-31add EnumerationType type class: if a type is a member you get Ord membership ↵Christopher Pulte
and Set membership for free
2017-08-31added RISC-V AMOsShaked Flur
2017-08-30typeclass instance Ord(opcode)Christopher Pulte