LicenseGNU LGPLv3
Maintainerpaul.bittner@uni-ulm.de
Safe HaskellSafe

NullPropositions

Description

Definition and operations on the ternary logic with null. In the paper, we call formulas of this logic nullable propositional formulas. Reuses PropositionalFormulas.

Synopsis

Documentation

type NullableFormula a = Maybe (PropositionalFormula a) Source #

Data type for the ternary logic by Sobocinski. The Nothing case represents null as used in our paper.

isnull :: NullableFormula a -> Bool Source #

Returns true iff the given formula is the value null.

notnull :: NullableFormula a -> Bool Source #

Returns false iff the given formula is the value null.

assure :: NullableFormula a -> PropositionalFormula a Source #

Converts the given nullable formula to a propositional formula, assuming that the given formula is not null. Crashes otherwise.

nullable_simplify :: NullableFormula a -> NullableFormula a Source #

Simplifies the given formula. Uses simplify.

prettyPrint :: Show a => Maybe a -> String Source #

Pretty Printing for nullable objects such as the nullable propositional logic.

Orphan instances

Logic a => Logic (Maybe a) Source #

Any Logic can be lifted to a logic on Maybe. This adds a new value Nothing to the values of the given logic. In particular, NullableFormula is thus a Logic.

Instance details

Methods

ltrue :: Maybe a Source #

lfalse :: Maybe a Source #

lvalues :: [Maybe a] Source #

lnot :: Maybe a -> Maybe a Source #

land :: [Maybe a] -> Maybe a Source #

lor :: [Maybe a] -> Maybe a Source #

limplies :: Maybe a -> Maybe a -> Maybe a Source #

lequals :: Maybe a -> Maybe a -> Maybe a Source #

leval :: (Maybe a -> Maybe a) -> Maybe a -> Maybe a Source #