sbv-13.1: SMT Based Verification: Symbolic Haskell theorem prover using SMT solving.
Copyright(c) Levent Erkok
LicenseBSD3
Maintainererkokl@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Documentation.SBV.Examples.Queries.Enums

Description

Demonstrates the use of enumeration values during queries.

Synopsis

Documentation

data Day Source #

Days of the week. We make it symbolic using the mkSymbolic splice.

Instances

Instances details
Arbitrary Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

arbitrary :: Gen Day #

shrink :: Day -> [Day] #

Show Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

showsPrec :: Int -> Day -> ShowS #

show :: Day -> String #

showList :: [Day] -> ShowS #

SymVal Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

HasKind Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

EnumSymbolic Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

SatModel Day Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

parseCVs :: [CV] -> Maybe (Day, [CV]) Source #

cvtModel :: (Day -> Maybe b) -> Maybe (Day, [CV]) -> Maybe (b, [CV]) Source #

OrdSymbolic (SBV Day) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

HasInductionSchema (Forall ta Day -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> SBool) -> ProofObj Source #

SymVal extraT => HasInductionSchema (Forall ta Day -> Forall extraS extraT -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> Forall extraS extraT -> SBool) -> ProofObj Source #

(SymVal extraT1, SymVal extraT2) => HasInductionSchema (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> SBool) -> ProofObj Source #

(SymVal extraT1, SymVal extraT2, SymVal extraT3) => HasInductionSchema (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> SBool) -> ProofObj Source #

(SymVal extraT1, SymVal extraT2, SymVal extraT3, SymVal extraT4) => HasInductionSchema (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> Forall extraS4 extraT4 -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> Forall extraS4 extraT4 -> SBool) -> ProofObj Source #

(SymVal extraT1, SymVal extraT2, SymVal extraT3, SymVal extraT4, SymVal extraT5) => HasInductionSchema (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> Forall extraS4 extraT4 -> Forall extraS5 extraT5 -> SBool) Source # 
Instance details

Defined in Documentation.SBV.Examples.Queries.Enums

Methods

inductionSchema :: (Forall ta Day -> Forall extraS1 extraT1 -> Forall extraS2 extraT2 -> Forall extraS3 extraT3 -> Forall extraS4 extraT4 -> Forall extraS5 extraT5 -> SBool) -> ProofObj Source #

cv2Day :: String -> [CV] -> Day Source #

Conversion from SMT values to Day values.

_undefiner_Day :: a Source #

Autogenerated definition to avoid unused-variable warnings from GHC.

type SDay = SBV Day Source #

Symbolic version of the type Day.

sMonday :: SBV Day Source #

Symbolic version of the constructor Monday.

sTuesday :: SBV Day Source #

Symbolic version of the constructor Tuesday.

sWednesday :: SBV Day Source #

Symbolic version of the constructor Wednesday.

sThursday :: SBV Day Source #

Symbolic version of the constructor Thursday.

sFriday :: SBV Day Source #

Symbolic version of the constructor Friday.

sSaturday :: SBV Day Source #

Symbolic version of the constructor Saturday.

sSunday :: SBV Day Source #

Symbolic version of the constructor Sunday.

isMonday :: SBV Day -> SBool Source #

Field recognizer predicate.

isTuesday :: SBV Day -> SBool Source #

Field recognizer predicate.

isWednesday :: SBV Day -> SBool Source #

Field recognizer predicate.

isThursday :: SBV Day -> SBool Source #

Field recognizer predicate.

isFriday :: SBV Day -> SBool Source #

Field recognizer predicate.

isSaturday :: SBV Day -> SBool Source #

Field recognizer predicate.

isSunday :: SBV Day -> SBool Source #

Field recognizer predicate.

sCaseDay :: Mergeable result => SBV Day -> result -> result -> result -> result -> result -> result -> result -> result Source #

Case analyzer for the type Day.

findDays :: IO [Day] Source #

A trivial query to find three consecutive days that's all before Thursday. The point here is that we can perform queries on such enumerated values and use getValue on them and return their values from queries just like any other value. We have:

>>> findDays
[Monday,Tuesday,Wednesday]