| ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Description | ||||||||||||||||||||||||||||||||||||||||||
Agents, sets of agents and operations on these sets. | ||||||||||||||||||||||||||||||||||||||||||
Synopsis | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Agents | ||||||||||||||||||||||||||||||||||||||||||
type Agent = String | ||||||||||||||||||||||||||||||||||||||||||
An agent is represented as a string | ||||||||||||||||||||||||||||||||||||||||||
Agent sets | ||||||||||||||||||||||||||||||||||||||||||
data Agents | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Construction | ||||||||||||||||||||||||||||||||||||||||||
listAgents :: [Agent] -> Agents | ||||||||||||||||||||||||||||||||||||||||||
Construct an agent set from a list of agents to include | ||||||||||||||||||||||||||||||||||||||||||
allAgents :: Agents | ||||||||||||||||||||||||||||||||||||||||||
The set of all agents | ||||||||||||||||||||||||||||||||||||||||||
Basic properties | ||||||||||||||||||||||||||||||||||||||||||
isNoAgents :: Agents -> Bool | ||||||||||||||||||||||||||||||||||||||||||
Is a set of agents empty? | ||||||||||||||||||||||||||||||||||||||||||
isAllAgents :: Agents -> Bool | ||||||||||||||||||||||||||||||||||||||||||
Is a set of agents full? | ||||||||||||||||||||||||||||||||||||||||||
showAgents :: String -> Agents -> ShowS | ||||||||||||||||||||||||||||||||||||||||||
Set operations | ||||||||||||||||||||||||||||||||||||||||||
unionAgents :: Agents -> Agents -> Agents | ||||||||||||||||||||||||||||||||||||||||||
Give the union of two sets of agents | ||||||||||||||||||||||||||||||||||||||||||
intersectAgents :: Agents -> Agents -> (Agents, Agents) | ||||||||||||||||||||||||||||||||||||||||||
Give the intersection and difference of two sets of agents intersectAgents a b = (agents in both a and b, agents only in a) | ||||||||||||||||||||||||||||||||||||||||||
Matching agent sets | ||||||||||||||||||||||||||||||||||||||||||
splitMatchingAgents :: Agents -> [(Agents, b)] -> [(Agents, [b])] | ||||||||||||||||||||||||||||||||||||||||||
Collect b values for matching agent sets, split the agent set a if necessary. For example: splitMatchingAgents {w,x,y,z} [({w,x,y},A), ({y,z,v},B), ({u},C)] == [({w,x},[A]), ({y},[A,B]), ({z},[])] | ||||||||||||||||||||||||||||||||||||||||||
forMatchingAgents | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
Axioms for agents | ||||||||||||||||||||||||||||||||||||||||||
data AxiomSet | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
axTD :: AxiomSet -> Bool | ||||||||||||||||||||||||||||||||||||||||||
systemK :: AxiomSet | ||||||||||||||||||||||||||||||||||||||||||
Well know axiom systems | ||||||||||||||||||||||||||||||||||||||||||
systemS4 :: AxiomSet | ||||||||||||||||||||||||||||||||||||||||||
systemS5 :: AxiomSet | ||||||||||||||||||||||||||||||||||||||||||
data Axioms | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||
axioms :: AxiomSet -> Axioms | ||||||||||||||||||||||||||||||||||||||||||
hasAxiom :: (AxiomSet -> Bool) -> Agents -> Axioms -> Bool | ||||||||||||||||||||||||||||||||||||||||||
Does an axiom hold for an agent? | ||||||||||||||||||||||||||||||||||||||||||
Produced by Haddock version 0.8 |