-- | Define the classic two-point lattice that refers to public and secret information. 
module SME.LatticeLH where

import SME.Lattice

-- | Data type encoding two security levels.
data Level = -- | Security level to represent public (low) information. 
             L 
            | 
             -- | Security level to represent secret (high) information. 
            H deriving (Eq,Enum, Show)

instance Lattice Level where
    meet L L = Just L
    meet _ _ = Just H
    join H H = Just H
    join _ _ = Just L

instance FiniteLattice Level where
    universe = [L,H]
    upset L = [L,H]
    upset H = [H]