Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- type GraphRule a b = Production (TypedGraphMorphism a b)
- getLHS :: Production m -> m
- getRHS :: Production m -> m
- getNACs :: Production m -> [m]
- invertProductionWithoutNacs :: Production m -> Production m
- deletedNodes :: GraphRule a b -> [NodeId]
- deletedEdges :: GraphRule a b -> [EdgeId]
- createdNodes :: GraphRule a b -> [NodeId]
- createdEdges :: GraphRule a b -> [EdgeId]
- preservedNodes :: GraphRule a b -> [NodeId]
- preservedEdges :: GraphRule a b -> [EdgeId]
- emptyGraphRule :: Graph (Maybe a) (Maybe b) -> Production (TypedGraphMorphism a b)
- nullGraphRule :: GraphRule a b -> Bool
- buildGraphRule :: Graph (Maybe a) (Maybe b) -> ListOfNodesAndEdges -> ListOfNodesAndEdges -> ListOfNodesAndEdges -> [ListOfNodesAndEdges] -> Production (TypedGraphMorphism a b)
- checkDeletion :: Eq t => TypedGraphMorphism a b -> TypedGraphMorphism a b -> (TypedGraphMorphism a b -> t -> Maybe t) -> (TypedGraphMorphism a b -> [t]) -> t -> Bool
Types
type GraphRule a b = Production (TypedGraphMorphism a b) Source #
getLHS :: Production m -> m Source #
Returns the morphism K -> L of the given production
getRHS :: Production m -> m Source #
Returns the morphism K -> R of the given production
getNACs :: Production m -> [m] Source #
Returns the set of nacs L -> Ni of the given production
Basic Functions
invertProductionWithoutNacs :: Production m -> Production m Source #
Discards the NACs of a production and inverts it.
deletedNodes :: GraphRule a b -> [NodeId] Source #
Return the nodes deleted by a rule
deletedEdges :: GraphRule a b -> [EdgeId] Source #
Return the edges deleted by a rule
createdNodes :: GraphRule a b -> [NodeId] Source #
Return the nodes created by a rule
createdEdges :: GraphRule a b -> [EdgeId] Source #
Return the edges created by a rule
preservedNodes :: GraphRule a b -> [NodeId] Source #
preservedEdges :: GraphRule a b -> [EdgeId] Source #
emptyGraphRule :: Graph (Maybe a) (Maybe b) -> Production (TypedGraphMorphism a b) Source #
Returns an empty GraphRule
nullGraphRule :: GraphRule a b -> Bool Source #
Checks if it is a null rule
buildGraphRule :: Graph (Maybe a) (Maybe b) -> ListOfNodesAndEdges -> ListOfNodesAndEdges -> ListOfNodesAndEdges -> [ListOfNodesAndEdges] -> Production (TypedGraphMorphism a b) Source #
It builds a GraphRule with lists of deleted, created, preserved and forbidden elements
checkDeletion :: Eq t => TypedGraphMorphism a b -> TypedGraphMorphism a b -> (TypedGraphMorphism a b -> t -> Maybe t) -> (TypedGraphMorphism a b -> [t]) -> t -> Bool Source #
TODO: Find a better name for this function, that was repeated both here and in the GraphRule archive | Given the left-hand-side morphism of a rule l : K -> L, a match m : L -> G for this rule, an element e (that can be either a Node or an Edge) and two functions apply (for applying that element in a TypedGraphMorphism) and list (to get all the corresponding elements in the domain of m), it returns true if e is deleted by this rule for the given match
Orphan instances
DPO (TypedGraphMorphism a b) Source # | |