Portability | H98 |
---|---|

Stability | experimental |

Maintainer | Douglas Burke |

Safe Haskell | None |

This module defines a ruleset data type, used to collect information about a ruleset that may contribute torwards inferences in RDF; e.g. RDF and RDFS are rulesets.

A `Ruleset`

consists of a namespace, a collection of axioms, and
a collection of rules.

- data Ruleset ex = Ruleset {}
- type RulesetMap ex = Map Namespace (Ruleset ex)
- makeRuleset :: Namespace -> [Formula ex] -> [Rule ex] -> Ruleset ex
- getRulesetNamespace :: Ruleset ex -> Namespace
- getRulesetAxioms :: Ruleset ex -> [Formula ex]
- getRulesetRules :: Ruleset ex -> [Rule ex]
- getRulesetAxiom :: ScopedName -> Ruleset ex -> Maybe (Formula ex)
- getRulesetRule :: ScopedName -> Ruleset ex -> Maybe (Rule ex)
- getContextAxiom :: ScopedName -> Formula ex -> [Ruleset ex] -> Formula ex
- getMaybeContextAxiom :: ScopedName -> [Ruleset ex] -> Maybe (Formula ex)
- getContextRule :: ScopedName -> Rule ex -> [Ruleset ex] -> Rule ex
- getMaybeContextRule :: ScopedName -> [Ruleset ex] -> Maybe (Rule ex)

# Documentation

A Rule set.

type RulesetMap ex = Map Namespace (Ruleset ex)Source

A set of Rulesets labelled by their Namespace.

getRulesetNamespace :: Ruleset ex -> NamespaceSource

Extract the namespace of a ruleset.

getRulesetAxioms :: Ruleset ex -> [Formula ex]Source

Extract the axioms from a ruleset.

getRulesetRules :: Ruleset ex -> [Rule ex]Source

Extract the rules from a ruleset.

getRulesetAxiom :: ScopedName -> Ruleset ex -> Maybe (Formula ex)Source

Find a named axiom in a ruleset.

getRulesetRule :: ScopedName -> Ruleset ex -> Maybe (Rule ex)Source

Find a named rule in a ruleset.

:: ScopedName | Name of axiom. |

-> Formula ex | Default axiom (used if named component does not exist). |

-> [Ruleset ex] | Rulesets to search. |

-> Formula ex |

Find a named axiom in a proof context.

:: ScopedName | Name of axiom. |

-> [Ruleset ex] | Rulesets to search. |

-> Maybe (Formula ex) |

Find a named axiom in a proof context.

:: ScopedName | Name of rule. |

-> Rule ex | Default rule (used if named component does not exist). |

-> [Ruleset ex] | Rulesets to search. |

-> Rule ex |

Find a named rule in a proof context.

:: ScopedName | Name of rule. |

-> [Ruleset ex] | Rulesets to search. |

-> Maybe (Rule ex) |

Find a named rule in a proof context.