swish-0.10.7.0: A semantic web toolkit.
Copyright(c) 2003 Graham Klyne 2009 Vasili I Galchin 2011 2012 Douglas Burke
LicenseGPL V2
MaintainerDouglas Burke
Stabilityexperimental
PortabilityH98
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swish.Ruleset

Description

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.

Synopsis

Documentation

data Ruleset ex Source #

A Rule set.

Constructors

Ruleset 

Fields

Instances

Instances details
Eq (Ruleset ex) Source #

Ruleset comparisons are based only on their namespace components.

Instance details

Defined in Swish.Ruleset

Methods

(==) :: Ruleset ex -> Ruleset ex -> Bool #

(/=) :: Ruleset ex -> Ruleset ex -> Bool #

type RulesetMap ex = Map Namespace (Ruleset ex) Source #

A set of Rulesets labelled by their Namespace.

makeRuleset :: Namespace -> [Formula ex] -> [Rule ex] -> Ruleset ex Source #

Create a ruleset.

getRulesetNamespace :: Ruleset ex -> Namespace Source #

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.

getContextAxiom Source #

Arguments

:: 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.

getMaybeContextAxiom Source #

Arguments

:: ScopedName

Name of axiom.

-> [Ruleset ex]

Rulesets to search.

-> Maybe (Formula ex) 

Find a named axiom in a proof context.

getContextRule Source #

Arguments

:: 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.

getMaybeContextRule Source #

Arguments

:: ScopedName

Name of rule.

-> [Ruleset ex]

Rulesets to search.

-> Maybe (Rule ex) 

Find a named rule in a proof context.