machine x language
DESCRIPTION
Presented in Functional Thursday Meetup #4TRANSCRIPT
MACHINE X LANGUAGEYun-Yan Chi
Programming and Machine Learning
Inductive Programming
Program Synthesis
Programming
problems / tasks
specifications
algorithms (in mind)
programs
Programming
problems / tasks
understand and realize
specifications
precise
Programming
problems / tasks
unknown or too complicated
specifications (static or dynamic behavior)
vague or incomplete
Machine Learning
learning from information
examples => problem solver
Neural network
Bayesian networks
Rule learning
Inductive Programming
Machine Learning
Artificial Intelligence
Programming Language
Software Engineering
Inductive Programming
deductive view of software developmentfrom the general to the specificcode generation from UMLprogram transformationtheorem proving model checking
Inductive Programming
inductive view of software developmentmathematical inductionfrom the specific to the generalincomplete specification -> programinputs: test cases, I/O examples, traces, behavior of a program, etc.outputs: program, algorithm
Inductive Programming
inductive logic programminglearn concepts(hypotheses), represented by logic clauses, from examplesgenerate-and-test somehow generate functions test functions by examplese.g. genetic programming, enumeration, etc.(term rewriting / search / ranking)
DEMO
De-typechecker
Oleg Kiselyov
converting from undefined to defined
[input] purely polymorphic function types
function types as logic programs (on type level)
implement SLD resolution (by typeclass)
[output] lambda functionhttp://okmij.org/ftp/Haskell/de-typechecker.lhs http://okmij.org/ftp/Haskell/types.html#de-typechecker
De-typechecker
undefined::(a->a)undefined::(a->b)undefined::(b -> c) -> (a -> b) -> a -> c
(((. head . uncurry zip . splitAt 1 . repeat) . uncurry) .) . (.) . flipreify (undefined `asTypeOf` ((((. head . uncurry zip . splitAt 1 . repeat) . uncurry) .) . (.) . flip)) gamma0
MagicHaskeller
Susumu Katayama (片山 晋)
Synthesize by exhaustive searching
[input] inputs and predicates
proposition (by type inference)
proof trees (by sequent calculus)
[output] function definitionhttp://okmij.org/ftp/Haskell/de-typechecker.lhs http://okmij.org/ftp/Haskell/types.html#de-typechecker
MagicHaskeller
webpage f [5,1,3,4,2] == [1,2,3,4,5]
f [1,2,3] == [[3,2,1],[3,2],[3],[]] && f [4,5,6] == [[6,5,4],[6,5],[6],[]]
f (1,3) >= 4 && f (7,3) <= 10
f ([1,2,3],[3,2,1]) == [(1,3),(2,2),(3,1)] && (f ([],[]) == []) && (f ([3],[2]) == [(3,2)])
http://www.inductive-programming.org/repository/problems/mhask/examples.txt
Program Synthesis
Inductive programming: 2005~2009, 2010, 2011
Sumit Gulwani (Microsoft Research)
(Inductive) Program Synthesis
Program Synthesis
[1] Programmerssoftware developalgorithm designprogram inverse[2] UsersEducation“enabling them to bring their creativity to life!”
GLANCE
Program Synthesis
[input] User Intentexampleslogicnatural language[output] Application / Tool
Program Synthesis
AI-style search
Formal reasoning (SAT/SMT solver)
FLOLAC 13
ICFPC
Reference
http://www.inductive-programming.org/
http://okmij.org/ftp/Haskell/types.html#de-typechecker
http://okmij.org/ftp/Haskell/de-typechecker.lhs
http://nautilus.cs.miyazaki-u.ac.jp/~skata/MagicHaskellerLib.html
http://www.inductive-programming.org/repository/problems/mhask/examples.txt
http://research.microsoft.com/en-us/um/people/sumitg/pubs/synthesis.html