Copyright | (c) Levent Erkok |
---|---|
License | BSD3 |
Maintainer | erkokl@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Documentation.SBV.Examples.Puzzles.Orangutans
Description
Synopsis
- data Orangutan
- data Handler
- data Location
- type SOrangutan = SBV Orangutan
- sMerah :: SBV Orangutan
- sOfallo :: SBV Orangutan
- sQuirrel :: SBV Orangutan
- sShamir :: SBV Orangutan
- type SHandler = SBV Handler
- sDolly :: SBV Handler
- sEva :: SBV Handler
- sFrancine :: SBV Handler
- sGracie :: SBV Handler
- type SLocation = SBV Location
- sAmbalat :: SBV Location
- sBasahan :: SBV Location
- sKendisi :: SBV Location
- sTarakan :: SBV Location
- data Assignment = MkAssignment {}
- mkSym :: Orangutan -> Symbolic Assignment
- puzzle :: ConstraintSet
Documentation
>>>
-- For doctest purposes only:
>>>
import Data.SBV
Orangutans in the puzzle.
Instances
Handlers for each orangutan.
Instances
Location for each orangutan.
Instances
data Assignment Source #
An assignment is solution to the puzzle
Constructors
MkAssignment | |
Instances
mkSym :: Orangutan -> Symbolic Assignment Source #
Create a symbolic assignment, using symbolic fields.
puzzle :: ConstraintSet Source #
We get:
>>>
allSat puzzle
Solution #1: Merah.handler = Gracie :: Handler Merah.location = Tarakan :: Location Merah.age = 10 :: Integer Ofallo.handler = Eva :: Handler Ofallo.location = Kendisi :: Location Ofallo.age = 13 :: Integer Quirrel.handler = Dolly :: Handler Quirrel.location = Basahan :: Location Quirrel.age = 4 :: Integer Shamir.handler = Francine :: Handler Shamir.location = Ambalat :: Location Shamir.age = 7 :: Integer This is the only solution.