summaryrefslogtreecommitdiff
path: root/mips/mips_extras.v
diff options
context:
space:
mode:
authorBrian Campbell2018-07-07 16:36:04 +0100
committerBrian Campbell2018-07-07 16:41:25 +0100
commit979d88fec8a5c611ee61be15ce45ae81b4a52317 (patch)
tree9c821f478f85b72ae34c69b633d56b62c12411b8 /mips/mips_extras.v
parenta7e3bad39b771cb18b989da05528e6e6f2788147 (diff)
Coq: precise generic vectors
(probably still some pattern matching to do, but I don't think the models use that)
Diffstat (limited to 'mips/mips_extras.v')
-rw-r--r--mips/mips_extras.v2
1 files changed, 1 insertions, 1 deletions
diff --git a/mips/mips_extras.v b/mips/mips_extras.v
index 49899107..cc905f11 100644
--- a/mips/mips_extras.v
+++ b/mips/mips_extras.v
@@ -107,7 +107,7 @@ Definition undefined_string {rv e} (_:unit) : monad rv string e := returnm ""%st
Definition undefined_unit {rv e} (_:unit) : monad rv unit e := returnm tt.
Definition undefined_int {rv e} (_:unit) : monad rv Z e := returnm (0:ii).
(*val undefined_vector : forall 'rv 'a 'e. integer -> 'a -> monad 'rv (list 'a) 'e*)
-Definition undefined_vector {rv a e} len (u : a) : monad rv (list a) e := returnm (repeat u len).
+Definition undefined_vector {rv a e} len (u : a) `{ArithFact (len >= 0)} : monad rv (vec a len) e := returnm (vec_init u len).
(*val undefined_bitvector : forall 'rv 'a 'e. Bitvector 'a => integer -> monad 'rv 'a 'e*)
Definition undefined_bitvector {rv e} len `{ArithFact (len >= 0)} : monad rv (mword len) e := returnm (mword_of_int 0).
(*val undefined_bits : forall 'rv 'a 'e. Bitvector 'a => integer -> monad 'rv 'a 'e*)