Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
- prop_compose_apply :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show doc, Eq doc) => (doc -> Gen op) -> Property
- prop_transform_apply :: (OTSystem doc op, Arbitrary doc, Show doc, Eq doc) => (doc -> Gen op) -> Property
- prop_transform_compose :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property
- prop_transform_compose_compat_l :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property
- prop_transform_compose_compat_r :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property
Documentation
prop_compose_apply :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show doc, Eq doc) => (doc -> Gen op) -> Property Source
(b ∘ a)(d) = a(b(d))
where a and b are two consecutive operations
and d is the initial document.
prop_transform_apply :: (OTSystem doc op, Arbitrary doc, Show doc, Eq doc) => (doc -> Gen op) -> Property Source
b'(a(d)) = a'(b(d))
where a and b are random operations, d is the
initial document and (a', b') = transform(a, b)
.
prop_transform_compose :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property Source
b' ∘ a = a' ∘ b
where a and b are random operations and
(a', b') = transform(a, b)
. Note that this is a stronger property than
prop_transform_apply, because prop_transform_compose and
prop_compose_apply imply prop_transform_apply.
prop_transform_compose_compat_l :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property Source
Transformation is compatible with composition on the left. That is, if we
have two consecutive operations a and b and a concurrent operation c,
then it doesn't make a difference whether we transform c against a and
then against b or transform c against the composition of a and b.
In other terms, c'_1 = c'_2
where (_, c'_1) = transform(b ∘ a, c)
,
(_, c') = transform(a, c)
and (_, c'_2) = transform(b, c')
.
prop_transform_compose_compat_r :: (OTSystem doc op, OTComposableOperation op, Arbitrary doc, Show op, Eq op) => (doc -> Gen op) -> Property Source
Transformation is compatible with composition on the right.