forked from gewitternacht/rbtree-verification
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iSet.key
61 lines (51 loc) · 1.24 KB
/
iSet.key
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
\sorts {
Free; // Built into KeY, do not change! Can be accessed in JML via \free.
}
\functions {
Free iSet_empty;
Free iSet_singleton(int);
Free iSet_minus(Free, Free);
Free iSet_union(Free, Free);
Free iSet_intersect(Free, Free);
}
\predicates {
in(int, Free);
subseteq(Free, Free);
}
\schemaVariables {
\term int x, y;
\term Free setA, setB;
\variable int iv;
}
\rules {
inEmpty {
\find(in(x, iSet_empty))
\replacewith(false)
\heuristics(concrete)
};
inSingleton {
\find(in(x, iSet_singleton(y)))
\replacewith(x = y)
\heuristics(concrete)
};
inSetMinus {
\find(in(x, iSet_minus(setA, setB)))
\replacewith(in(x, setA) & !in(x,setB))
\heuristics(simplify)
};
inSetUnion {
\find(in(x, iSet_union(setA, setB)))
\replacewith(in(x, setA) | in(x,setB))
\heuristics(simplify)
};
inSetIntersect {
\find(in(x, iSet_intersect(setA, setB)))
\replacewith(in(x, setA) & in(x, setB))
\heuristics(simplify)
};
setEq {
\find(setA = setB)
\varcond(\notFreeIn(iv, setA, setB))
\replacewith(\forall iv; (in(iv, setA) <-> in(iv, setB)))
};
}