cleanup attempt
This commit is contained in:
parent
3e04c9afef
commit
8601f7c673
|
@ -1,5 +1,5 @@
|
||||||
Require Import Rushby.
|
Require Import Rushby.
|
||||||
Require Import list relations collections fin_collections.
|
From stdpp Require Import list relations collections fin_collections.
|
||||||
|
|
||||||
Module ArrayMachine <: Mealy.
|
Module ArrayMachine <: Mealy.
|
||||||
|
|
||||||
|
|
2
Mealy.v
2
Mealy.v
|
@ -1,4 +1,4 @@
|
||||||
Require Import base.
|
From stdpp Require Import base.
|
||||||
Require Import Monoids.
|
Require Import Monoids.
|
||||||
|
|
||||||
Class Mealy (state action out : Type) := {
|
Class Mealy (state action out : Type) := {
|
||||||
|
|
19
MealySync.v
19
MealySync.v
|
@ -1,5 +1,5 @@
|
||||||
Require Import Rushby.
|
Require Import Rushby.
|
||||||
Require Import base.
|
From stdpp Require Import base.
|
||||||
|
|
||||||
Class MSync (state action out : Type)
|
Class MSync (state action out : Type)
|
||||||
:= {
|
:= {
|
||||||
|
@ -25,29 +25,24 @@ Section MealyM.
|
||||||
Variable state action out : Type.
|
Variable state action out : Type.
|
||||||
Variable MM : MSync state action out.
|
Variable MM : MSync state action out.
|
||||||
Variable domain : Type.
|
Variable domain : Type.
|
||||||
Check Policy.
|
Check @Policy.
|
||||||
Variable P : Policy domain.
|
Variable P : @Policy action domain.
|
||||||
Variable VP : ViewPartition domain.
|
Variable VP : @ViewPartition action domain.
|
||||||
|
|
||||||
|
|
||||||
Definition sync_separation `{Policy action domain} := forall (s : state) (b : action) (a : action),
|
Definition sync_separation `{Policy action domain} := forall (s : state) (b : action) (a : action),
|
||||||
¬ (delayed a s) ∧ (delayed a (step s a))
|
¬ (delayed a s) ∧ (delayed a (step s a))
|
||||||
→ policy (Rushby.dom b) (Rushby.dom a).
|
→ policy (Rushby.dom b) (Rushby.dom a).
|
||||||
|
|
||||||
Definition sync_interf `{Policy action domain} `{MMs : MMsync state action out}
|
End MealyM.
|
||||||
|
|
||||||
Class SyncPartition {domain state action out : Type} (MMs : MMsync state action out) {P : Policy domain} {VP : @ViewPartition state domain} := {
|
|
||||||
sync_partitioned : forall s t a, view_partition (Rushby.dom a) s t -> (delayed a s <-> delayed a t)
|
|
||||||
}.
|
|
||||||
|
|
||||||
|
|
||||||
Section Unwinding.
|
Section Unwinding.
|
||||||
Context {state action out : Type}.
|
Context {state action out : Type}.
|
||||||
Context {domain : Type}.
|
Context {domain : Type}.
|
||||||
Context {P : @Policy action domain}.
|
Context {P : @Policy action domain}.
|
||||||
Context {VP : @ViewPartition state domain}.
|
Context {VP : @ViewPartition state domain}.
|
||||||
Context {MMs : MMsync state action out}.
|
Context {MMs : MSync state action out}.
|
||||||
Definition MM := underlyingM.
|
Definition MM := msync_mealy.
|
||||||
Definition N := (@MMsync_is_MM domain state action out MMs).
|
Definition N := (@MMsync_is_MM domain state action out MMs).
|
||||||
|
|
||||||
Context {OC : @OutputConsistent _ _ _ MM domain P VP}.
|
Context {OC : @OutputConsistent _ _ _ MM domain P VP}.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Require Import base.
|
From stdpp Require Import base.
|
||||||
|
|
||||||
Class Monad M {ret : MRet M} {bind : MBind M} :=
|
Class Monad M {ret : MRet M} {bind : MBind M} :=
|
||||||
{ ret_unit_1 : forall {A} (m : M A) , m ≫= mret = m
|
{ ret_unit_1 : forall {A} (m : M A) , m ≫= mret = m
|
||||||
|
|
Loading…
Reference in New Issue