| 1 |
(set-logic HO_ALL) |
| 2 |
|
| 3 |
(set-info :status sat) |
| 4 |
|
| 5 |
(set-option :fmf-bound true) |
| 6 |
(set-option :uf-lazy-ll true) |
| 7 |
|
| 8 |
(define-fun sumByCategory ((x (Tuple String String Int)) (y (Tuple String Int))) (Tuple String Int) |
| 9 |
(tuple |
| 10 |
((_ tuple.select 0) x) |
| 11 |
(+ ((_ tuple.select 2) x) ((_ tuple.select 1) y)))) |
| 12 |
|
| 13 |
(declare-fun categorySales () (Set (Tuple String Int))) |
| 14 |
|
| 15 |
;(define-fun categorySales () (Set (Tuple String Int)) |
| 16 |
; (set.union |
| 17 |
; (set.singleton (tuple "Software" 5)) |
| 18 |
; (set.singleton (tuple "Hardware" 4)))) |
| 19 |
|
| 20 |
(assert |
| 21 |
(= categorySales |
| 22 |
((_ rel.aggr 0) |
| 23 |
sumByCategory |
| 24 |
(tuple "" 0) |
| 25 |
(set.union |
| 26 |
(set.singleton (tuple "Software" "win" 1)) |
| 27 |
(set.singleton (tuple "Software" "mac" 4)) |
| 28 |
(set.singleton (tuple "Hardware" "cpu" 2)) |
| 29 |
(set.singleton (tuple "Hardware" "gpu" 2)))))) |
| 30 |
|
| 31 |
(check-sat) |