diff options
Diffstat (limited to 'stdlib/source/test/lux/tool/compiler')
-rw-r--r-- | stdlib/source/test/lux/tool/compiler/language/lux/synthesis/side.lux | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/synthesis/side.lux b/stdlib/source/test/lux/tool/compiler/language/lux/synthesis/side.lux new file mode 100644 index 000000000..3dccec159 --- /dev/null +++ b/stdlib/source/test/lux/tool/compiler/language/lux/synthesis/side.lux @@ -0,0 +1,43 @@ +(.using + [library + [lux "*" + ["_" test {"+" Test}] + [abstract + [monad {"+" do}] + [\\specification + ["$[0]" equivalence] + ["$[0]" hash]]] + [data + ["[0]" bit ("[1]#[0]" equivalence)] + ["[0]" text ("[1]#[0]" equivalence)]] + [math + ["[0]" random {"+" Random}] + [number + ["n" nat]]]]] + [\\library + ["[0]" /]]) + +(def: .public random + (Random /.Side) + ($_ random.and + random.nat + random.bit + )) + +(def: .public test + Test + (<| (_.covering /._) + (_.for [/.Side]) + (do [! random.monad] + [left ..random + right ..random] + ($_ _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) + (_.for [/.hash] + ($hash.spec /.hash ..random)) + + (_.cover [/.format] + (bit#= (# /.equivalence = left right) + (text#= (/.format left) (/.format right)))) + )))) |