forked from ellisk42/ec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
univ_2.sl
94 lines (35 loc) · 1.8 KB
/
univ_2.sl
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
(set-logic SLIA)
(synth-fun f ((col1 String) (col2 String)) String
((Start String (ntString))
(ntString String (col1 col2 " " "," "USA" "PA" "CT" "CA" "MD" "NY"
(str.++ ntString ntString)
(str.replace ntString ntString ntString)
(str.at ntString ntInt)
(int.to.str ntInt)
(ite ntBool ntString ntString)
(str.substr ntString ntInt ntInt)))
(ntInt Int (0 1 2
(+ ntInt ntInt)
(- ntInt ntInt)
(str.len ntString)
(str.to.int ntString)
(str.indexof ntString ntString ntInt)))
(ntBool Bool (true false
(str.prefixof ntString ntString)
(str.suffixof ntString ntString)
(str.contains ntString ntString)))))
(declare-var col1 String)
(declare-var col2 String)
(constraint (= (f "University of Pennsylvania" "Phialdelphia, PA, USA")
"University of Pennsylvania, Phialdelphia, PA, USA"))
(constraint (= (f "UCLA" "Los Angeles, CA")
"UCLA, Los Angeles, CA, USA"))
(constraint (= (f "Cornell University" "Ithaca, New York, USA")
"Cornell University, Ithaca, New York, USA"))
(constraint (= (f "Penn" "Philadelphia, PA, USA")
"Penn, Philadelphia, PA, USA"))
(constraint (= (f "University of Maryland College Park" "College Park, MD")
"University of Maryland College Park, College Park, MD, USA"))
(constraint (= (f "University of Michigan" "Ann Arbor, MI, USA")
"University of Michigan, Ann Arbor, MI, USA"))
(check-synth)