summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-04Do not store type synonyms as functions in the environmentAlasdair Armstrong
2019-03-04cleanupChristopher Pulte
2019-03-04Merge branch 'sail2' of https://github.com/rems-project/sail into sail2Christopher Pulte
2019-03-04last bit of sail1 to sail2 portingChristopher Pulte
2019-03-04Add location to warning in pattern completeness checkAlasdair Armstrong
2019-03-04more sail1-to-sail2 portingChristopher Pulte
2019-03-04more porting of armv8 from sail1 to sail2Christopher Pulte
2019-03-04moreChristopher Pulte
2019-03-02moreChristopher Pulte
2019-03-02moreChristopher Pulte
2019-03-02Merge branch 'sail2' of https://github.com/rems-project/sail into sail2Christopher Pulte
2019-03-02moreChristopher Pulte
2019-03-01WIP: Start working on being able to slice single instructions out of specsAlasdair Armstrong
2019-03-01Add some tricky test cases for quantified Sail AST typesAlasdair Armstrong
Fixes some bugs found by doing this
2019-03-01Coq: some library compatibility changesBrian Campbell
2019-03-01Add a test case for previous commitAlasdair Armstrong
Also make unifying int against int('n) work as expected for constructor applications.
2019-03-01Merge branch 'sail2' of https://github.com/rems-project/sail into sail2Christopher Pulte
2019-03-01Fix bug with naturals in quantified constructorsAlasdair Armstrong
2019-03-01Merge branch 'sail2' of https://github.com/rems-project/sail into sail2Christopher Pulte
2019-03-01Make Sail more flexible with existentials in union typesAlasdair Armstrong
Issues came up with Christophers translation of hand-written ARM into Sail2 where we were being overly pedantic about the exact position of existential quantifiers in constructors with multiple arguments. This commit generalises unify_typ and type_coercion_unify to be more flexible and support this. Should think at some point if unify_typ can be generalised further. This fix should fix the decode side of things, but may be some issues with the executes that still need looking into when existentials and multiple argument constructors are mixed.
2019-03-01Fill in some edge cases in monomorphisationBrian Campbell
2019-03-01more progressChristopher Pulte
2019-03-01Coq tidying: remove old definition, complete a pattern matchBrian Campbell
2019-03-01Coq: add a little bit of boolean solvingBrian Campbell
Just enough for RISC-V to go through
2019-03-01Coq: make iff `iff`Brian Campbell
Also drop unused implication function
2019-02-28Handle implicits in destruct_atom_nexpBrian Campbell
2019-02-28Coq: remove unused library definitionsBrian Campbell
2019-02-28Coq: Clean up rich boolean handling in backendBrian Campbell
Now generates something vaguely sensible for RISC-V, although the solver needs a little work. Adds type annotations around effectful, rich and/or expressions.
2019-02-28Coq: more for informative booleansBrian Campbell
Make internal_plet produce annotations (with code to replace unusable type variables) Add mappings for bool kids at bindings Add version of and_bool that proves a property
2019-02-28Coq: update tyvar merge information at other bindersBrian Campbell
2019-02-28Turn off some debugging messagesBrian Campbell
2019-02-28Coq: merge tyvars with corresponding variablesBrian Campbell
2019-02-28Coq: strip informative bools back to more uniform typesBrian Campbell
Also make pretty printing more keen on line breaking
2019-02-28Coq: some work on bool simplificationBrian Campbell
This introduces some simplification of informative booleans, but tries too hard to eliminate all of the existentials resulting in difficulties in and/or trees.
2019-02-28Allow user-specified state to be passed through generated CAlasdair Armstrong
For example: sail -c_extra_params "CPUMIPSState *env" -c_extra_args env would pass a QEMU MIPS cpu state to every non-builtin function call. Also add documentation for each C compilation option in C_backend.mli
2019-02-28more progressChristopher Pulte
2019-02-27Provide more access to the ELF symbols in the OCaml ELF-loader.Prashanth Mundkur
2019-02-27Tweaks to C compilation to make it more usable for embedding into other programsAlasdair Armstrong
Can now set a prefix for generated C functions with -c_prefix so -c_prefix sail_ would give sail_execute_CGetPerm over zexecute_CGetPerm. We still have to use our standard name-mangling scheme to avoid possible collisions within the name. Can build C that doesn't expect the standard runtime, which leaves operations like read_memory, write_memory etc to be stubbed in by another C program including the generated Sail. Things like letbindings are still an issue because we rely on a very small runtime to initialize global letbindings and similar. -c_separate_execute splits the execute function apart in the generated C
2019-02-27Make -o option work as usual with C compilationAlasdair Armstrong
2019-02-25Monomorphisation: fix check for effects in constant propagationBrian Campbell
The old check used the wrong part of the AST. It would stop when it reached the actual effect, anyway, but this should improve performance.
2019-02-25Allow int-specialization for non-externs onlyAlasdair Armstrong
Add a flag in C backend ctx that allows us to generate arbitrary precision signed integer types, rather than just int64
2019-02-25Update some test case error messagesAlasdair Armstrong
2019-02-25Fix some builtins, and make mod_int return naturalAlasdair Armstrong
2019-02-25OCaml backend: omit function definitions for externsJon French
2019-02-22Generalize CT_int64 for arbitrary fixed size integersAlasdair
If we want to use our low-level intermediate representation to generate SMT, then we want to be more precise than just splitting integers into 64-bits and larger. This commit changes CT_int and CT_int64 into CT_lint for large integers and CT_fint n for (signed) fixed precision integers that fit within n bits. This follows the convention for bitvectors where we have CT_fbits for fixed-length bitvectors and CT_lbits for large arbitrary precision bitvectors.
2019-02-22Fix more bugs in int-specializationAlasdair Armstrong
2019-02-22Fix some bugs in int-specializationAlasdair Armstrong
2019-02-21Allow monomorphisation with C generationAlasdair
Run C tests with -O -Oconstant_fold -auto_mono
2019-02-21Fix manual, and include Alexandre's typo fixesAlasdair Armstrong
2019-02-21Fix specialization bug involving function annotations not matching valspecsAlasdair
Perhaps suprisingly to some, this did not mean that Sail was unable to typecheck the identify function. While doing this rename Effect_opt_pure to Effect_opt_none - as Effect_opt_pure was the effect equivalent of Typ_annot_opt_none, and actually means that the function definition lacks an effect annnotation, not that the function is actually pure, so this was *extremely* misleading. The effect_opt that actually indicated a function is pure was (and still is) the succinct: Effect_opt_aux (Effect_opt_effect (Effect_aux (Effect_set [], _)), _) In fact because in the grammar we only specify effects on valspecs (they can always be inferred for fundefs in the absence of a valspec) effect_opts are basically vestigial and are always Effect_opt_none. What might actually be super nice would be to remove rec_opt, effect_opt and typ_annot_opt from fundefs in ast.ml altogether and if we want them in the syntax just have them in parse_ast.ml and pull them into a valspec during the initial check.