summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2017-08-21More work on quantifier elimination passAlasdair Armstrong
Also added a rewriting pass that removes the cast annotations and operator overloading declarations from the AST because they arn't supported by the interpreter.
2017-08-21Modified sizeof rewriting pass so it can correctly deal with existentials.Alasdair Armstrong
Basically we needed to make the rewriting step for E_sizeof and E_constraint more aggressively try to rewrite those expressions from variables in scope, without adding new parameters to pass the type variables at runtime, as this can break in the presence of existential quantification. Still some cleanup to do in this code, but tests on the arm spec show that it now introduces the minimal amount of new parameters.
2017-08-18Fixed a bug where sizeof re-writing fail for aliased type argumentsAlasdair Armstrong
Also: Merge remote-tracking branch 'origin/sail_new_tc' into experiments
2017-08-17Work on E_constraint removal pass and diagnosing bugs in E_sizeof removal passAlasdair Armstrong
2017-08-17Add E_constraint support to re-writerAlasdair Armstrong
2017-08-17Add support for register types other than bitvector to state monadThomas Bauereiss
Make state monad parametric in register state, and generate a record with registers from the Sail spec
2017-08-17Various sail fixes for ASL hexapodAlasdair Armstrong
2017-08-16Added the feature to bind type variables in patterns.Alasdair Armstrong
The reason you want this is to do something like (note new parser only): ********* default Order dec type bits 'n:Int = vector('n - 1, 'n, dec, bit) val zeros : forall 'n. atom('n) -> bits('n) val decode : bool -> unit function decode b = { let 'datasize: {|32, 64|} = if b then 32 else 64; let imm: bits('datasize) = zeros(datasize); () } ********* for the ASL decode functions, where the typechecker now knows that the datasize variable and the length of imm are the same.
2017-08-15Merge remote-tracking branch 'origin/mono-experiments' into experimentsAlasdair Armstrong
2017-08-15Removed Typ_arg_effect - nobody used it and it isn't supported by the backends.Alasdair Armstrong
2017-08-15Export existential destructuring function in type_check.mli.Alasdair Armstrong
Also rename some functions for consistency.
2017-08-15Export utility functions from type_check.mlAlasdair Armstrong
2017-08-15Menhir parser support for try/catchAlasdair Armstrong
2017-08-15Improve and simplify handling of mutable local variablesThomas Bauereiss
2017-08-15Added exceptions and try/catch blocks to AST and typechecker in orderAlasdair Armstrong
to translate exceptions in ASL. See test/typecheck/pass/trycatch.sail.
2017-08-14Existentials in free type var functionsBrian Campbell
2017-08-14Some overloaded equality support in monomorphisationBrian Campbell
2017-08-14Merge remote-tracking branch 'origin/master' into experimentsAlasdair Armstrong
2017-08-14Merge remote-tracking branch 'origin/mono-experiments' into experimentsAlasdair Armstrong
2017-08-14More constructs in menhir parser, plus support for both left and right infix ↵Alasdair Armstrong
operators.
2017-08-14Keep all asserts in the program during type checkingBrian Campbell
2017-08-14Don't reverse lexp tuple during type checkingBrian Campbell
2017-08-12Resolve ambiguity between negation of integers and boolsThomas Bauereiss
2017-08-12Fix compilation issue for 32-bit systemsThomas Bauereiss
2017-08-11Menhir for new parser, ocamlyacc for oldBrian Campbell
2017-08-11Merge branch 'experiments' into mono-experimentsBrian Campbell
2017-08-11Make type checking just clever enough to solve 8*n = constantBrian Campbell
2017-08-10Merge remote-tracking branch 'origin/sail_new_tc' into experimentsAlasdair Armstrong
Conflicts: src/pretty_print_common.ml
2017-08-10Fix bug with subtyping in let bindingsAlasdair Armstrong
2017-08-10Improved operator support for test menhir parserAlasdair Armstrong
2017-08-10Experimenting with alternate parserAlasdair Armstrong
2017-08-10Add support for early return to Lem backendThomas Bauereiss
Implemented using the exception monad, by throwing and catching the return value
2017-08-10Disable menhir on this branchBrian Campbell
(until location information is updated)
2017-08-10Merge branch 'experiments' into mono-experimentsBrian Campbell
2017-08-10Existentials in Lem AST outputBrian Campbell
2017-08-10Experimental removal of existentialsBrian Campbell
2017-08-10Improved existentials and type synonymsAlasdair Armstrong
2017-08-09Pretty-print some more type annotationsThomas Bauereiss
2017-08-08Add infrastructure to play with new menhir parsers.Alasdair Armstrong
Added a copy of the current parser/lexer in parser2.mly and lexer2.mll. They can be used with the -new_parser flag. Currently they are just copies of the existing files.
2017-08-08Switch to using menhir for sail parser in experiments branchAlasdair Armstrong
2017-08-08Fix Lem bindings in test casesThomas Bauereiss
Add a test case with the MIPS spec using the TLB stub. Use the sequential monad for Lem testing for now; the free monad (in "prompt.lem") has not been updated for machine words yet.
2017-08-08Glue together Sail prelude and Lem libraryThomas Bauereiss
2017-08-08Various fixes and improvements for the Lem pretty-printingThomas Bauereiss
- Add some missing "wreg" effect annotations in the type checker - Improve pretty-printing of register type definitions: In addition to a "build" function, output an actual type definition, and some getter/setter functions for register fields - Fix a bug in sizeof rewriting that caused it to fail when rewriting nested calls of functions that contained sizeof expressions - Fix pretty-printing of user-defined union types with type variables (cf. test case option_either.sail) - Simplify nexps, e.g. "(8 * 8) - 1" becomes "63", in order to be able to output more type annotations with bitvector lengths - Add (back) some support for specifying Lem bindings in val specs using "val extern ... foo = bar" - Misc bug fixes
2017-08-08Add add_typ_var to mli fileAlastair Reid
This function is used by asl_to_sail2.ml
2017-08-07Improvements to existentials for ASL parserAlasdair Armstrong
2017-08-07Fixed pretty printing of E_consAlasdair Armstrong
2017-08-07Fixed various issues regarding typechecking lists.Alasdair Armstrong
2017-08-04Various improvements for ASL generationAlasdair Armstrong
Fixed a bug where existential constraint's weren't used to solve function quantifiers correctly
2017-08-02Improve pretty-printing of register declaration and assignmentThomas Bauereiss
2017-08-02Changed some aspects of the typechecker to better support ASL l-valuesAlasdair Armstrong