input-output-hk / marlowe

Prototype implementation of domain-specific language for the design of smart-contracts over cryptocurrencies
Apache License 2.0
173 stars 43 forks source link

PLT-3313: Proper module for Guarantees #180

Closed yveshauser closed 1 year ago

yveshauser commented 1 year ago

This PR introduces

  1. A new module for the Guarantees, i.e. test cases corresponding to Isabelle theorems
  2. Quickcheck generators are split into the following modules: Arbitrary, SemiArbitrary and Generators

Arbitrary

Contains instances of Arbitrary

SemiArbitrary

The SemiArbitrary type-class and it's instances. SemiArbitrary generates arbitrary values based on a Context.

Generators

In the module Generators there are the random data generators that are delegating the task to a spec-client

Note, SemiArbitrary now just generates values from the Context - Arbitrary is no longer a subclass of SemiArbitrary. This is needed as the Context might be populated from a spec-client and we can not make use of locally generated values.