Copyright | (c) Levent Erkok |
---|---|
License | BSD3 |
Maintainer | erkokl@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Solves the following logic puzzle:
- The Briton lives in the red house.
- The Swede keeps dogs as pets.
- The Dane drinks tea.
- The green house is left to the white house.
- The owner of the green house drinks coffee.
- The person who plays football rears birds.
- The owner of the yellow house plays baseball.
- The man living in the center house drinks milk.
- The Norwegian lives in the first house.
- The man who plays volleyball lives next to the one who keeps cats.
- The man who keeps the horse lives next to the one who plays baseball.
- The owner who plays tennis drinks beer.
- The German plays hockey.
- The Norwegian lives next to the blue house.
- The man who plays volleyball has a neighbor who drinks water.
Who owns the fish?
Documentation
Colors of houses
Instances
data Nationality Source #
Nationalities of the occupants
Instances
Beverage choices
Instances
Pets they keep
Instances
Sports they engage in
Instances
We have:
>>>
fishOwner
German
It's not hard to modify this program to grab the values of all the assignments, i.e., the full
solution to the puzzle. We leave that as an exercise to the interested reader!
NB. We use the satTrackUFs
configuration to indicate that the uninterpreted function
changes do not matter for generating different values. All we care is that the fishOwner changes!