comparison tests/disjoint.lac @ 86:7f9bcc8bfa1e

More with disjointness assumptions
author Adam Chlipala <adamc@hcoop.net>
date Tue, 01 Jul 2008 13:19:14 -0400
parents 1f85890c9846
children 275aaeb73f1f
comparison
equal deleted inserted replaced
85:1f85890c9846 86:7f9bcc8bfa1e
1 con c1 = fn x :: Name => [x] ~ [A] => [x, A] 1 con c1 = fn x :: Name => [x] ~ [A] => [x = int, A = string]
2 con c2 = fn x :: Name => [x] ~ [A] => [A, x] 2 con c2 = fn x :: Name => [x] ~ [A] => [A, x]
3 con c3 = fn x :: Name => [A] ~ [x] => [x, A] 3 con c3 = fn x :: Name => [A] ~ [x] => [x, A]
4 con c4 = fn x :: Name => [A] ~ [x] => [A, x] 4 con c4 = fn x :: Name => [A] ~ [x] => [A, x]
5 5
6 con c5 = fn r1 :: {Type} => fn r2 => r1 ~ r2 => r1 ++ r2 6 con c5 = fn r1 :: {Type} => fn r2 => r1 ~ r2 => r1 ++ r2
7 con c6 = fn r1 :: {Type} => fn r2 => r2 ~ r1 => r1 ++ r2 7 con c6 = fn r1 :: {Type} => fn r2 => r2 ~ r1 => r1 ++ r2
8 8
9 con c7 = fn x :: Name => fn r => [x] ~ r => [x] ++ r 9 con c7 = fn x :: Name => fn r => [x] ~ r => [x = int] ++ r
10
11 val vt1 = fn x : $(c1 #B) => x.B
12 val vt2 = fn x : $(c1 #B) => x.A
13 val vt3 = fn x : $(c1 #C) => x.A
14 val vt4 = fn x : $(c1 #C) => x.A
15 (*
16 val vtX = fn x : $(c1 #A) => x.A
17 val vtX = fn x : $(c1 #A) => x.A
18 *)
10 19
11 val v1 = fn x :: Name => fn [x] ~ [A] => fn y : {x : int, A : string} => y.x 20 val v1 = fn x :: Name => fn [x] ~ [A] => fn y : {x : int, A : string} => y.x
21
22 val vt5 = v1 [#B] {A = "Hi", B = 0}
23 (*
24 val vtX = v1 [#A] {A = "Hi", A = 0}
25 *)
26
27 val v2 = fn x :: Name => fn r :: {Type} => fn y : $(c7 x r) => fn [x] ~ r => y.x
28 val vt6 = v2 [#A] [[B = float, C = string]] {A = 8, B = 8.0, C = "8"}
29
30 (*
31 val vtX = v2 [#A] [[B = float, B = string]] {A = 8, B = 8.0, B = "8"}
32 val vtX = v2 [#A] [[A = float, B = string]] {A = 8, A = 8.0, B = "8"}
33 *)