summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-09-28Refine constructors during monomorphisationBrian Campbell
2017-09-26Remove obsolete existential removal codeBrian Campbell
2017-09-26Remove debugging statements included accidentallyBrian Campbell
2017-09-26Add propagation of local assignments to monomorphisationBrian Campbell
2017-09-21Support more functions and vector construction in mono for hexapodBrian Campbell
2017-09-21Substitute into constraints to make assert work with monoBrian Campbell
2017-09-21Disable existential removal for nowBrian Campbell
2017-09-20Handle let (exists 't...[:'t:]) 't = lit in monoBrian Campbell
2017-09-20Remove obsolete nexp refinementBrian Campbell
2017-09-20Support splitting on multiple variables in monoBrian Campbell
2017-09-18Merge branch 'experiments' into mono-experimentsBrian Campbell
2017-09-14Two thirds of monomorphising union types with an existentialBrian Campbell
Still need some way of picking the appropriate constructor
2017-09-14Fix bug in topological sortingThomas Bauereiss
2017-09-14Fix some more test casesThomas Bauereiss
2017-09-14Fix a regression when writing to a register via a reference in a vector such ↵Thomas Bauereiss
as GPR This was wrongly translated as an update of the vector of references.
2017-09-13Work on improving Sail error messagesAlasdair Armstrong
- Modified how sail type error messages are displayed. The typechecker, rather than immediately outputing a string has a datatype for error types, which are the pretty-printed using a PPrint pretty-printer. Needs more work for all the error messages. - Error messages now attempt to highlight the part of the file where the error occurred, by printing the line the error is on and highlighting where the error message is in red. Again, this needs to be made more robust, especially when the error messages span multiple lines. Other things - Improved new parser and lexer. Made the lexer & parser handling of colons simpler and more intuitive. - Added some more typechecking test cases
2017-09-08Fixed bug when printing Typ_args in Lem AST outputAlasdair Armstrong
2017-09-07Merge branch 'experiments' of https://bitbucket.org/Peter_Sewell/sail into ↵Alasdair Armstrong
experiments
2017-09-07Add ocaml run-time and updates to sail for ocaml backendAlasdair Armstrong
2017-09-05Fix printing of negative numbersAlastair Reid
2017-09-04Merge branch 'experiments' of bitbucket.org:Peter_Sewell/sail into ↵Brian Campbell
mono-experiments
2017-09-02Various fixes for HexapodThomas Bauereiss
- Support tuples in lexps - Rewrite trivial sizeofs - Rewrite early returns more aggressively - Support let bindings with ticked variables (binding both a type-level and term-level variable at the same time)
2017-09-02Remove dependency of state.lem on bitvector operationsThomas Bauereiss
2017-09-02Add command line flags to toggle sequential monad and native machine wordsThomas Bauereiss
2017-09-01Testing typedef generation for ocamlAlasdair Armstrong
2017-09-01Started work on test suite for ocaml backendAlasdair Armstrong
2017-08-30Remove debug print statement from rewriterAlasdair Armstrong
2017-08-30Improved ocaml backend to the point where the hexapod spec produces ↵Alasdair Armstrong
syntactically correct ocaml
2017-08-30Merge branch 'experiments' of https://bitbucket.org/Peter_Sewell/sail into ↵Alasdair Armstrong
experiments
2017-08-30Ocaml backend can now run ocamlbuild automatically to build ocamlAlasdair Armstrong
files into runable executable.
2017-08-30Fix another bug in local variable update rewritingThomas Bauereiss
E_internal_let is only used for introducing local variables, not updating existing ones.
2017-08-29Merge branch 'experiments' of https://bitbucket.org/Peter_Sewell/sail into ↵Alasdair Armstrong
experiments
2017-08-29More work on ocaml backend.Alasdair Armstrong
Works for basic examples with arbitrary register types, so for example we can compile: val extern string -> unit effect pure print = "print_endline" val unit -> string effect pure hello_world function hello_world () = { return "Hello, World!"; "Unreachable" } val unit -> unit effect {wreg, rreg} main register string REG function main () = { REG := "Hello, Sail!"; print(REG); REG := hello_world (); print(REG); return () } into open Sail_lib;; let zhello_world () = with_return (fun r -> begin r.return "Hello, World!"; "Unreachable" end);; let zREG : (string) ref = ref (undefined_string ());; let zmain () = with_return (fun r -> begin zREG := "Hello, Sail!"; print_endline !zREG; zREG := zhello_world (); print_endline !zREG; r.return () end);; let initialize_registers () = with_return (fun r -> zREG := undefined_string ());; with the arbitrary register types and early returns being handled appropriately, given a suitable implementation for Sail_lib
2017-08-29Make Lem export of CHERI(-256) typecheckThomas Bauereiss
Note: The effect annotations of the execute function differ between CHERI and MIPS, so I split out a new file mips_ast_decl.sail for MIPS with just the initial declarations of ast, decode, and execute (with the right effects for MIPS).
2017-08-29Fix bug in rewriting local variable updatesThomas Bauereiss
Don't pull out local variables that are introduced inside a sub-block.
2017-08-29Expand Nexp_id's in sizeof rewriting (e.g. cap_size_t in CHERI)Thomas Bauereiss
Also, rewrite expressions in global let bindings (not only function bodies)
2017-08-29Improve flow typingThomas Bauereiss
Can now handle nexps such as (2**65 - 1). Uses big_ints for comparisons, and keeps original nexps in the AST.
2017-08-28Eta expand lem for OCaml generationBrian Campbell
2017-08-28Merge branch 'experiments' into mono-experimentsBrian Campbell
2017-08-28Correct indexing and equality for bitvectorsBrian Campbell
2017-08-28Merge branch 'experiments' of bitbucket.org:Peter_Sewell/sail into ↵Brian Campbell
mono-experiments # Conflicts: # src/gen_lib/sail_values.lem
2017-08-24Use relative path in MakefileThomas Bauereiss
2017-08-24Fix some bugs related to the CHERI specThomas Bauereiss
- Correctly pass exponentials to Z3 - Infer types of functional record updates - Support "def Nat"
2017-08-24More work on undefined elimination pass.Alasdair Armstrong
Also generate a function which initializes all the registers in a spec to undefined. This gives us the information we need post-rewriting to generate registers of any arbitrary type.
2017-08-24Add Num identifiers to type environmentThomas Bauereiss
2017-08-24Improve and simplify handling of mutable local variablesThomas Bauereiss
2017-08-24Begin refactoring Sail libraryThomas Bauereiss
- Add back support for bit list representation of bit vectors, for backwards compatibility in order to ease integration with the interpreter. For this purpose, split out a file sail_operators.lem from sail_values.lem, and add a variant sail_operators_mwords.lem for the machine word representation of bitvectors. Currently, Sail is hardcoded to use machine words for the sequential state monad, and bit lists for the free monad, but this could be turned into a command line flag. - Add a prelude_wrappers.sail file for glueing the Sail prelude to the Lem library. The wrappers make use of sizeof expressions to extract type information from bitvectors (length, start index) in order to pass it to the Lem functions. - Add early return support to the free monad, using a new constructor "Return of 'r". As with the sequential monad, functions with early return are wrapped into "catch_early_return", which extracts the return value at the end of the function execution.
2017-08-24Avoid re-typechecking after rewriting passesThomas Bauereiss
Rewriting of sizeofs and constraints seems to lose or hide some information that the typechecker needs
2017-08-24Add some missing type annotationsThomas Bauereiss
2017-08-24Add a little cast handling to constant propagationBrian Campbell