File: Coin.curry

package info (click to toggle)
curry-tools 1.0.1%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,492 kB
  • ctags: 121
  • sloc: makefile: 470; sh: 421
file content (18 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=contracts #-}

import Test.Prop

-- Examples with nondeterministicm specifications

coin'spec = 0 ? 1

coin = 1 ? 0   --> should be executed without violation

coinCorrect = coin <~> coin'spec


coin3'spec = coin'spec

coin3 = coin ? 2  --> should produce a violation

coin3Violation = toError coin3