1 / 56

Synthesizing Number Transformations from Input-Output Examples

Synthesizing Number Transformations from Input-Output Examples. Rishabh Singh and Sumit Gulwani. 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. Help-forums. Help-forums.

sophie
Download Presentation

Synthesizing Number Transformations from Input-Output Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Synthesizing Number Transformations from Input-Output Examples Rishabh Singh and SumitGulwani

  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

  4. Help-forums

  5. Excel Help-forums

  6. Excel Help-forums 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 • Number Transformation Language • Synthesis Algorithm • String & Number Language Combination • Synthesis Algorithm for Combination • 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

  12. Number Transformation Language

  13. Number Transformation Language

  14. Format String • : minimum number of significant digits • : maximum number of significant digits • : number of whitespaces at end

  15. Number Format Exactly 2 decimal places .NET :

  16. Semantics Exactly 2 decimal places 24.589  24.59 24.2  24.20

  17. GenerateStr • Interval domains for invariant

  18. Intersect

  19. Extension to Integer parts Dec(u) ( Int(u), Frac(u)) GenerateStr(Frac(u1), Frac(u2)) GenerateStr(Int(u1)R, Int(u2)R)

  20. Rounding Numbers • zero of interval • size of interval • nearest, upper, lower

  21. Round Format Round off to upper 45 =Min(Roundup(A1/45, 0)*45, Roundup(A1/95,0)*95)

  22. GenerateStr Not enough info. to learn precise

  23. Intersect • Intersect((n1,n’1),(n2,n’2))

  24. Intersect • Intersect((31,45),(86,95))

  25. Intersect • Intersect((31,45),(86,95))

  26. Intersect • Intersect((31,45),(86,95))

  27. Intersect • Intersect((31,45),(86,95))

  28. Intersect • Intersect((31,45),(86,95))

  29. Intersect • Intersect((31,45),(86,95))

  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 Program P1 to extract 7 in input (-5, -4) (-5, dot -1) (-5, dot 2) (-5, 7) (6, -4) …. (P1, 7 -> 7)

  37. Synthesis Algorithm 2004.07.08  7/8/2004 Program P2 to extract 07 in input (dot 1, dot 2) (dot 1, dot -1) (-6, -4) (-6, dot -1) (-6, dot 2) …. (P1, 7 -> 7) (P2, 07 -> 7)

  38. GenerateStr 2004.07.08  7/8/2004 (P1, 7 -> 7) (P2, 07 -> 7)

  39. GenerateStr 2004.07.08  7/8/2004 (P3, 8 -> 8) (P4, 08 -> 8)

  40. Constructing the DAG 071/283/425060748 (P1, 7 -> 7) 4 3 2 0 1 (P2, 07 -> 7) 5 6 8 7

  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! CAV Algorithm Designers Software Developers End-Users Large potential

  49. Questions & Comments

  50. Backup slides

More Related