module SndOrder.Rule.Core where import Abstract.DPO import SndOrder.Morphism as SO -- | A second order rule: -- -- @ -- nl nr -- NL◀─────\<NK\>─────▶NR -- ▲ ▲ ▲ -- nacL\\ nacK\\ nacR\\ -- \\ \\ \\ -- \\ ll \\ lr \\ -- LL◀─────\<LK\>─────▶LR -- ▲ ▲ ▲ -- leftL│ leftK│ leftR│ -- │ │ │ -- │ kl │ kr │ -- KL◀─────\<KK\>─────▶KR -- │ │ │ -- rightL│ rightK│ rightR│ -- │ │ │ -- ▼ rl ▼ rr ▼ -- RL◀─────\<RK\>─────▶RR -- @ -- -- domain rule = (ll,lr) -- -- interface rule = (kl,kr) -- -- codomain rule (rl,rr) -- -- nac rule = (nl,nr) -- -- nacs = set of: domain rule, nac rule, nacL, nacK, nacR -- -- left = domain rule, interface rule, leftL, leftK, leftR -- -- right = interface rule, codomain rule, rightL, rightK, rightR type SndOrderRule a b = Production (RuleMorphism a b)