chp-spec-1.0.0: A mirror implementation of chp that generates a specification of the program

Control.Concurrent.CHPSpec.Barriers

Description

A module containing barriers.

The PhasedBarrier type remains, but currently syncBarrier has been changed so that it only works on Barrier, i.e. PhasedBarrier (). This is because phases haven't been modelled yet.

Synopsis

Documentation

newPhasedBarrier :: (Enum phase, Bounded phase, Eq phase, Show phase) => phase -> CHP (PhasedBarrier phase)Source

newPhasedBarrier' :: phase -> BarOpts phase -> CHP (PhasedBarrier phase)Source

data BarOpts phase Source

Constructors

BarOpts 

Fields

barIncPhase :: phase -> phase
 
barPriority :: Int
 
barOptsShow :: phase -> String
 
barOptsLabel :: Maybe String
 

defaultIncPhase :: (Enum phase, Bounded phase, Eq phase) => phase -> phaseSource

defaultBarOpts :: (Enum phase, Bounded phase, Eq phase) => BarOpts phaseSource

barLabel :: (Enum phase, Bounded phase, Eq phase, Show phase) => String -> BarOpts phaseSource

syncBarrier :: EnrolledBarrier -> CHP ()Source

Unlike normal CHP, this function only works on barriers with the unit type for a phase.