- 快召唤伙伴们来围观吧
- 微博 QQ QQ空间 贴吧
- 文档嵌入链接
- 复制
- 微信扫一扫分享
- 已成功复制到剪贴板
实例编程
展开查看详情
1 .Programming by Examples Sumit Gulwani, Microsoft #Res8SAIS
2 .Example-based help-forum interaction 300_w30_aniSh_c1_b à w30 300_w5_aniSh_c1_b à w5 =MID(B1,5,2) =MID(B1,FIND(“_”,$B:$B)+1, FIND(“_”,REPLACE($B:$B,1,FIND(“_”,$B:$B),””))-1) #Res8SAIS 2
3 .Flash Fill (Excel feature) #Res8SAIS “Automating string processing in spreadsheets using input-output examples” 3 [POPL 2011] Sumit Gulwani
4 .Number, DateTime Transformations Input Output (round to 2 decimal places) Excel/C#: #.00 123.4567 123.46 Python/C: .2f 123.4 123.40 Java: #.## 78.234 78.23 Input Output (3-hour weekday bucket) CEDAR AVE & COTTAGE AVE; HORSHAM; Fri, 12PM - 3PM 2015-12-11 @ 13:34:52; RT202 PKWY; MONTGOMERY; 2016-01-13 Wed, 9AM - 12PM @ 09:05:41-Station:STA18; ; UPPER GWYNEDD; 2015-12-11 @ 21:11:18; Fri, 9PM - 12AM #Res8SAIS “Synthesizing Number Transformations from Input-Output Examples” 4 [CAV 2012] Rishabh Singh, Sumit Gulwani
5 .Data Science Class Assignment #Res8SAIS “FlashExtract: A Framework for data extraction by examples” 5 [PLDI 2014] Vu Le, Sumit Gulwani
6 . PBE Architecture Examples Search More Examples DSL D Engine Program set Intended Program Program in D Disambiguator Ranker Ranked Program set Test inputs Search • Logical Deduction: [OOPSLA ‘15] FlashMeta: A framework for inductive program synthesis • Machine Learning: [ICLR ‘18] Neural-guided deductive search for real-time program synthesis from examples Ranking • Program Features: [CAV ‘15] Predicting a correct program in programming by example • Output Features: [IJCAI ‘17] Learning to learn programs from examples: going beyond program structure #Res8SAIS “Programming by Examples: PL meets ML” 6 [APLAS 2017] Sumit Gulwani, Prateek Jain
7 .New Frontiers Predictive Synthesis Synthesis of intended programs from just the input. • Tabular data extraction, Sort, Join Synthesis of readable/modifiable code Synthesis in target language of choice. • Scala, R, PySpark Code-first experience in existing workflows. • IDE, Notebook #Res8SAIS “Automated Data Extraction using Predictive Program Synthesis” 7 [AAAI 2017] Mohammad Raza, Sumit Gulwani
8 .Code Transformations by Examples • Code refactoring consumes 40% time in migration. – Old version to new version – On-prem to cloud – One framework to another • Custom formatting • Performance enhancements • Repetitive bug fixes – Feedback generation for programming education #Res8SAIS “Learning syntactic program transformations from examples” 8 [ICSE 2017] Reudismam Rolim, Gustavo Soares, et.al.
9 . Conclusion Programming by examples is a new frontier in AI. • 10-100x productivity increase in some domains. – Data Wrangling: Data scientists spend 80% time. – Code Refactoring: Developers spend 40% time in migration. • 99% of end users are non-programmers. Next-generational AI techniques under the hood • Logical Reasoning + Machine Learning The Future: Multi-modal programming with Examples and NL Questions/Feedback: Contact me at sumitg@microsoft.com #Res8SAIS Microsoft PROSE (PROgram Synthesis by Examples) Framework 9 Available for non-commercial use : https://microsoft.github.io/prose/