Download presentation
Presentation is loading. Please wait.
Published byAiyana Saile Modified over 10 years ago
1
Synthesizing Number Transformations from Input-Output Examples Rishabh Singh and Sumit Gulwani
2
Number One of the most commonly used data type Number Formatting –Every language has its own format #.00? (C#, Excel), 05.2f (Python, C) –End-users
3
Help-forums
5
Excel Help-forums
6
upper 45 or 95
7
Observations from Help-forums Input-Output Examples –Specification mechanism Additional inputs for removing ambiguity Excel add-in with same interface
8
Talk Outline 1.Number Transformation Language 2.Synthesis Algorithm 3.String & Number Language Combination 4.Synthesis Algorithm for Combination 5.Experiments
9
Generic Framework Expression Language L –Expressive and succinct Efficient Data structures for set of expressions –Version-space algebra GenerateStr –All sets of expressions from I-O example Intersect –Intersect two sets of expressions
10
Number Transformations
11
Number Transformation Language
15
Number Format 123.4567123.46 123.4123.40 Exactly 2 decimal places
16
Semantics Exactly 2 decimal places 24.589 24.59 24.2 24.20
17
GenerateStr 123.4567123.46 123.4123.40
18
Intersect
19
Extension to Integer parts 12.4567012.46 123.4123.40
21
Round Format 1145 4695 =Min(Roundup(A1/45, 0)*45, Roundup(A1/95,0)*95) Round off to upper 45
22
GenerateStr
23
Intersect
30
GenerateStr Only need to maintain greatest value
31
Intersect
32
Combining String and Number Transformations
33
String Language [GulwaniPOPL11]
34
Combined Language
35
Combination Examples
36
Synthesis Algorithm 2004.07.08 7/8/2004 1)(-5, -4) 2)(-5, dot -1) 3)(-5, dot 2) 4)(-5, 7) 5)(6, -4) 6)…. Program P 1 to extract 7 in input (P 1, 7 -> 7)
37
Synthesis Algorithm 2004.07.08 7/8/2004 (P 1, 7 -> 7) Program P 2 to extract 07 in input 1)(dot 1, dot 2) 2)(dot 1, dot -1) 3)(-6, -4) 4)(-6, dot -1) 5)(-6, dot 2) 6)…. (P 2, 07 -> 7)
38
GenerateStr 2004.07.08 7/8/2004 (P 1, 7 -> 7) (P 2, 07 -> 7)
39
GenerateStr 2004.07.08 7/8/2004 (P 3, 8 -> 8) (P 4, 08 -> 8)
40
Constructing the DAG 071/283/425060748071/283/425060748 01234567 (P 1, 7 -> 7) (P 2, 07 -> 7) 8
41
Intersection DAG intersection Edge-wise program intersection
42
Experiments
43
Benchmarks 50 benchmark problems –Help forums –Excel product team
44
Number of I/O examples
45
Performance
46
Related work String Transformations [Gulwani POPL11] Table Transformations [Singh,Gulwani VLDB12] Spreadsheet Data Manipulation using Examples[Gulwani, Harris, Singh CACM 2012]
47
Conclusion Number Transformation Language –Synthesis algorithm String + Number Transformations –Combined Synthesis algorithm
48
Thanks! End-Users Algorithm Designers Software Developers CAV Large potential
49
Questions & Comments
50
Backup slides
51
Number Format 123.4567123.46 123.4
52
Number Format 123.4567123.46 123.4123.4_
53
ab cd ef gh ij kl
54
Help-forums
55
Number Format 123.4567123.46 123.4 At most 2 decimal places
56
Number Format 123.4567123.46 123.4123.4_ Exactly 2 decimal places with space
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.