summaryrefslogtreecommitdiff
path: root/test/mono
AgeCommit message (Collapse)Author
2020-11-19Make mono rewrites be more careful to produce constant-sized typesBrian Campbell
While the backends will usually manage to find the constant size anyway, this ensures that implicit arguments will be filled in with the constant value too. (For example, this was affecting isla execution in one corner case because the slice_mask primitive didn't see that the size was constant.)
2020-09-25tests: Move copy-pasted code into a shared helper .shAlex Richardson
Also fix a few shellcheck warnings related to printf while doing so.
2020-09-12Merge some of the gitignore filesColumbus240
Both /.gitignore and /lib/coq/.gitignore ignored some files in /lib/coq. This commit removes /lib/coq/.gitignore and moves all ignore-statements to /.gitignore . This should simplify the maintenance of gitignore files. The situation with /test/mono/.gitignore is analogous.
2020-09-07Fix typo a mono_rewrites definitionBrian Campbell
- add tests for a couple of related rewrites - accept same range of constants for sign extension in the rewrite as for the zero extension version (to make the test simpler)
2020-05-04Mono: Try to fix bug in inter-procedural analysisThomas Bauereiss
The monomorphisation analysis decides whether to split function arguments in the callee or in callers. The code previously used a datastructure that can hold results of either the one case or the other, but there might be functions that are called in different contexts leading to different decisions. This patch changes the datastructure to support storing all instances of either case.
2020-05-04Try to fix bug in size parameter rewritingThomas Bauereiss
If we call a function where some arguments need to be rewritten, we might need to rewrite those parameters in the caller as well.
2020-04-21Take kid synonyms into account when propagating constantsThomas Bauereiss
For example, in let datasize = e in ... the typechecker will generate a kid '_datasize if e has an existential type (with one kid), and in let 'datasize = e in ... the typechecker will bind both 'datasize and '_datasize. If we substitute one as part of constant propagation, this patch will make constant propagation also substitute the other.
2020-04-21Mono: Check for non-constant calls to make_the_valueThomas Bauereiss
... and try to resolve them using constant propagation.
2019-11-22Add tests for monomorphisation improvement in eb0e17f2Brian Campbell
2019-11-07Make the world a slightly more sane and consistent placeAlasdair Armstrong
2019-11-04Some almost-forgotten mono testsBrian Campbell
2019-08-29Clean up some mono testsBrian Campbell
2019-07-16Get monomorphisation tests working with separate bitvectorsAlasdair Armstrong
2019-06-20Handle more uses of mutable variables during monomorphisation cast insertionBrian Campbell
In particular, bitvector subrange updates work with this version.
2019-06-19Monomorphisation improvements for aarch64_smallBrian Campbell
- additional rewrites (signed extend of subrange@zeros, subrange assignment, variants with casts) - drop # from new top-level type variables (e.g., n_times_8) so that the rewriter knows that they're safe to include in casts - add casts in else-branches when only one possible value for a size is left - add casts when assertions force a size to be a particular value - don't use types to detect set constraints in analysis because we won't know which part of the assertion should be replaced - also use non-top-level type variables when simplifying sizes in analysis (useful when it can from pattern matching on an ast) - cope with repeated int('n) in a pattern match (!)
2019-05-06Handle type variables generated while inferring applications in monomorphisationBrian Campbell
Also handle any type variables from assignments and degrade gracefully during constant propagation when unification is not possible.
2019-04-26More constructor monomorphisation supportBrian Campbell
- handle multiple bitvector length variables - more fine-grained unnecessary cast insertion checks - add tuple matching support to constant propagation (for the test)
2019-04-25Get basic constructor monomorphisation working againBrian Campbell
- updates for type checking changes - handle a little more pattern matching in constant propagation - fix bug where false positive warnings were produced - ensure bitvectors in tuples are always monomorphised (to catch the case where the bitvectors only appear alone with a constant size)
2019-04-25Update prelude in mono testsBrian Campbell
2019-03-15Fix testsThomas Bauereiss
2019-02-08Updates for asl_parserAlasdair Armstrong
Tweak colours of monomorphistion test output
2019-02-07Add a symbol for new implicit arguments for backwards compatabilityAlasdair Armstrong
Fix monomorphisation tests
2019-02-02Merge remote-tracking branch 'origin/sail2' into asl_flow2Alasdair
2019-01-31Monomorphisation: improve cast insertion and nexp rewriting on variantsBrian Campbell
It now pushes casts into lets and constructor applications, and so supports the case needed for RISC-V.
2019-01-31Support case splitting on variables as well as sizeof in cast introductionBrian Campbell
2018-12-20Fix monomorpisation tests with typechecker changesAlasdair Armstrong
Add an extra argument for Type_check.prove for the location of the prove call (as prove __POS__) to help debug SMT related issues
2018-12-03Fix = / == in a couple of monomorphisation testsBrian Campbell
2018-08-07Lem: print more bitvector typesBrian Campbell
Especially for return expressions, which fixes a test case
2018-07-24Move monomorphisation after mapping rewritesBrian Campbell
Fixes monomorphisation on files using mappings. Also extended constant propagation to handle pattern matches on bitvector expressions (because an earlier rewrite replaces the literals). Also moved L_undef rewriting because monomorphisation can handle them but not the replacement functions.
2018-06-18Mono test script updateBrian Campbell
(still need to sort out some string stuff, though)
2018-05-22Fix one part of cast introduction, leave another for laterBrian Campbell
2018-04-18Update mono test scriptBrian Campbell
2018-04-18Move Lem shl_int, shr_int implementations from aarch64_extras to sail libBrian Campbell
(note that they're already declared in lib/arith.sail)
2018-04-17Enable mono builtins test, tweak test outputBrian Campbell
2018-04-11Fix test preludeBrian Campbell
2018-04-06Test now passesBrian Campbell
2018-04-04Instantiate type properly when introducing mono castsBrian Campbell
(also reorder the phases a little)
2018-04-04Add bitvector casts to funcl bodies when necessaryBrian Campbell
2018-03-14Update mono testsBrian Campbell
2018-03-14Remove unnecessary size_itself_int uses in guards (for Lem)Brian Campbell
Doesn't remove them from function bodies because that can produce more work for the sizeof rewriting.
2018-03-13Add test for mutual recursion and monomorphisationBrian Campbell
2018-03-13Support a few more set constraints in monoBrian Campbell
2018-03-13Merge funcls for Lem output, making it suitable for testing with OCamlBrian Campbell
2018-03-13A couple of mono test tweaksBrian Campbell
2018-03-09Sort mono test cases, add missing filesBrian Campbell
2018-02-23Make mono test harness nicerBrian Campbell
2018-02-23Change monomorphisation tests to proper outputBrian Campbell
2018-02-23Update more monomorphisation testsBrian Campbell
2018-02-22Curtail at more false assertionsBrian Campbell
(plus some adjustments for the test case)
2018-02-22Start resurrecting monomorphisation testsBrian Campbell