22
MACHINE X LANGUAGE Yun-Yan Chi

Machine X Language

Embed Size (px)

DESCRIPTION

Presented in Functional Thursday Meetup #4

Citation preview

Page 1: Machine X Language

MACHINE X LANGUAGEYun-Yan Chi

Page 2: Machine X Language

Programming and Machine Learning

Inductive Programming

Program Synthesis

Page 3: Machine X Language

Programming

problems / tasks

specifications

algorithms (in mind)

programs

Page 4: Machine X Language

Programming

problems / tasks

understand and realize

specifications

precise

Page 5: Machine X Language

Programming

problems / tasks

unknown or too complicated

specifications (static or dynamic behavior)

vague or incomplete

Page 6: Machine X Language

Machine Learning

learning from information

examples => problem solver

Neural network

Bayesian networks

Rule learning

Page 7: Machine X Language

Inductive Programming

Machine Learning

Artificial Intelligence

Programming Language

Software Engineering

Page 8: Machine X Language

Inductive Programming

deductive view of software developmentfrom the general to the specificcode generation from UMLprogram transformationtheorem proving model checking

Page 9: Machine X Language

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

Page 10: Machine X Language

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)

Page 11: Machine X Language

DEMO

Page 12: Machine X Language

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

Page 13: Machine X Language

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

Page 14: Machine X Language

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

Page 15: Machine X Language

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

Page 16: Machine X Language

Program Synthesis

Inductive programming: 2005~2009, 2010, 2011

Sumit Gulwani (Microsoft Research)

(Inductive) Program Synthesis

Page 17: Machine X Language

Program Synthesis

[1] Programmerssoftware developalgorithm designprogram inverse[2] UsersEducation“enabling them to bring their creativity to life!”

Page 18: Machine X Language

GLANCE

Page 19: Machine X Language

Program Synthesis

[input] User Intentexampleslogicnatural language[output] Application / Tool

Page 20: Machine X Language

Program Synthesis

AI-style search

Formal reasoning (SAT/SMT solver)

FLOLAC 13

Page 21: Machine X Language

ICFPC