grisette-0.11.0.0: Symbolic evaluation as a library
Copyright(c) Sirui Lu 2021-2024
LicenseBSD-3-Clause (see the LICENSE file)
Maintainersiruilu@cs.washington.edu
StabilityExperimental
PortabilityGHC only
Safe HaskellNone
LanguageHaskell2010

Grisette.Internal.Core.Data.Class.LogicalOp

Description

 
Synopsis

Documentation

class LogicalOp b where Source #

Symbolic logical operators for symbolic booleans.

>>> let t = true :: SymBool
>>> let f = false :: SymBool
>>> let a = "a" :: SymBool
>>> let b = "b" :: SymBool
>>> t .|| f
true
>>> a .|| t
true
>>> a .|| f
a
>>> a .|| b
(|| a b)
>>> t .&& f
false
>>> a .&& t
a
>>> a .&& f
false
>>> a .&& b
(&& a b)
>>> symNot t
false
>>> symNot f
true
>>> symNot a
(! a)
>>> t `symXor` f
true
>>> t `symXor` t
false
>>> a `symXor` t
(! a)
>>> a `symXor` f
a
>>> a `symXor` b
(|| (&& (! a) b) (&& a (! b)))

Minimal complete definition

(true | false), ((.||), symNot | (.&&), symNot)

Methods

true :: b Source #

Constant true

false :: b Source #

Constant false

(.||) :: b -> b -> b infixr 2 Source #

Symbolic disjunction

(.&&) :: b -> b -> b infixr 3 Source #

Symbolic conjunction

symNot :: b -> b Source #

Symbolic negation

symXor :: b -> b -> b Source #

Symbolic exclusive disjunction

symImplies :: b -> b -> b Source #

Symbolic implication

Instances

Instances details
LogicalOp SymBool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

LogicalOp Bool Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

LogicalOp a => LogicalOp (Identity a) Source # 
Instance details

Defined in Grisette.Internal.Core.Data.Class.LogicalOp

(LogicalOp a, Mergeable a) => LogicalOp (Union a) Source # 
Instance details

Defined in Grisette.Internal.Internal.Impl.Core.Control.Monad.Union

Methods

true :: Union a Source #

false :: Union a Source #

(.||) :: Union a -> Union a -> Union a Source #

(.&&) :: Union a -> Union a -> Union a Source #

symNot :: Union a -> Union a Source #

symXor :: Union a -> Union a -> Union a Source #

symImplies :: Union a -> Union a -> Union a Source #