moltapContentsIndex
Moltap.Base.Syntax
Contents
Formula syntax tree
Operators
Top level syntax
Properties
Synopsis
type VarName = String
data Formula
= Truth Bool
| Var VarName
| Not Formula
| Bin BinOp Formula Formula
| Box Sign Agents Formula
| Star Sign Agents Formula
| Note Note Formula
data Note = NoteTruth [(String, Bool)]
data BinOp
= And
| Or
| Imp
| Pmi
| Equiv
| Differ
precedence :: BinOp -> (Int, Int, Int)
data Program
= Formula Formula
| Let' VarName Formula Program
| System Agents AxiomSet Program
evalProgram :: Program -> (Axioms, Formula)
traverseProgram :: (Formula -> Formula -> Formula) -> Program -> Program
agents :: Formula -> Set Agents
Formula syntax tree
type VarName = String
data Formula
Modal formulas
Constructors
Truth Bool
Var VarName
Not Formula
Bin BinOp Formula FormulaA binary operator
Box Sign Agents Formulapositive is box, negative is diamond.
Star Sign Agents Formulacommon knowledge Additional syntax
Note Note Formula
show/hide Instances
data Note
Unimportant notes
Constructors
NoteTruth [(String, Bool)]in which worlds is this formula true/false?
show/hide Instances
Operators
data BinOp
A binary operator that combines two formulas into a larger one
Constructors
And
Or
Imp
Pmi
Equiv
Differ
show/hide Instances
precedence :: BinOp -> (Int, Int, Int)
The precedence and associativity of an operator
Top level syntax
data Program
A program is a formula which can contain extra progamming constructs
Constructors
Formula Formula
Let' VarName Formula Program
System Agents AxiomSet Program
show/hide Instances
evalProgram :: Program -> (Axioms, Formula)
Extract the formula and axioms from a program
traverseProgram :: (Formula -> Formula -> Formula) -> Program -> Program
Traverse a formula bottom up
Properties
agents :: Formula -> Set Agents
The agents mentioned in a formula
Produced by Haddock version 0.8