multisetrewrite-0.1: Multi-set rewrite rules with guards and a parallel execution scheme

MultiSetRewrite.RuleCompiler

Documentation

class EMatch m => RuleCompiler a m rm idx st | a -> m rm idx st, rm -> a whereSource

Methods

atomicVerifyAndDeleteCnt :: a -> Code_RHS c -> [(Check rm, IO (Maybe (Code_RHS c)))] -> IO (Maybe (Code_RHS c))Source

getIndex :: a -> m -> IO idxSource

initSearch :: a -> idx -> IO stSource

nextMsg :: a -> st -> IO (Maybe rm)Source

extractMsg :: rm -> IO (Maybe (InternalMsg m))Source

printMsg :: a -> rm -> IO StringSource

printReachMsg :: a -> st -> IO StringSource

Instances

(EMatch msg, Eq msg, Show msg) => RuleCompiler (Store msg) msg (Location msg) HashIdx (Iterator (InternalMsg msg)) 

type Code_RHS a = IO aSource

type CompClause store rmsg code = rmsg -> store -> IO (Maybe (Code_RHS code))Source

data Check a Source

Constructors

Verify a 
VerifyAndDelete a 

select :: RuleCompiler a m rm idx st => a -> rm -> [CompClause a rm c] -> IO (Maybe (Code_RHS c))Source

optimize :: [[MatchTask msg]] -> [[MatchTask msg]]Source

type Cnt a = IO (Maybe (Code_RHS a))Source

compileCnt :: (RuleCompiler act msg rmsg idx st, Show msg) => Code_RHS a -> [MatchTask msg] -> [CompClause act rmsg a]Source

compileSingleCnt :: (RuleCompiler act msg rmsg idx st, Show msg) => act -> Cnt a -> ([(Check rmsg, Cnt a)], Code_RHS a) -> [Tag] -> [MatchTask msg] -> IO (Maybe (Code_RHS a))Source