| 1 |
(set-logic HO_ALL) |
| 2 |
|
| 3 |
(set-info :status sat) |
| 4 |
|
| 5 |
(declare-fun Departments () (Table Int String)) |
| 6 |
(declare-fun Students () (Table Int String Int)) |
| 7 |
(declare-fun DepartmentStudents () (Table Int String Int String Int)) |
| 8 |
|
| 9 |
;(define-fun Departments () (Bag (Tuple Int String)) |
| 10 |
; (bag.union_disjoint |
| 11 |
; (bag (tuple 1 "Computer") 1) |
| 12 |
; (bag (tuple 2 "Engineering") 1))) |
| 13 |
|
| 14 |
;(define-fun Students () (Bag (Tuple Int String Int)) |
| 15 |
; (bag.union_disjoint |
| 16 |
; (bag (tuple 1 "A" 1) 1) |
| 17 |
; (bag (tuple 2 "B" 1) 1) |
| 18 |
; (bag (tuple 3 "C" 2) 1))) |
| 19 |
|
| 20 |
(assert |
| 21 |
(= DepartmentStudents |
| 22 |
(bag.union_disjoint (bag (tuple 1 "Computer" 1 "A" 1) 1) |
| 23 |
(bag (tuple 1 "Computer" 2 "B" 1) 1) |
| 24 |
(bag (tuple 2 "Engineering" 3 "C" 2) 1)))) |
| 25 |
|
| 26 |
(assert (= DepartmentStudents ((_ table.join 0 2) Departments Students))) |
| 27 |
|
| 28 |
(check-sat) |