The document discusses inductive programming, which uses machine learning techniques to synthesize programs from input-output examples and specifications. It describes several examples of inductive programming systems, including De-typechecker which generates lambda functions from polymorphic types, MagicHaskeller which synthesizes Haskell functions by searching proof trees, and GLANCE and Program Synthesis which generate applications from user examples and intent using search and formal reasoning methods. Inductive programming combines machine learning, artificial intelligence, and programming languages to develop programs from incomplete specifications in an inductive manner.
8. Inductive Programming
deductive view of software development
from the general to the specific
code generation from UML
program transformation
theorem proving
model checking
9. Inductive Programming
inductive view of software development
mathematical induction
from the specific to the general
incomplete specification -> program
inputs: test cases, I/O examples, traces,
behavior of a program, etc.
outputs: program, algorithm
10. Inductive Programming
inductive logic programming
learn concepts(hypotheses), represented by logic
clauses, from examples
generate-and-test
somehow generate functions
test functions by examples
e.g. genetic programming, enumeration, etc.
(term rewriting / search / ranking)
12. 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 function
http://okmij.org/ftp/Haskell/de-typechecker.lhs http://okmij.org/ftp/Haskell/types.html#de-typechecker
13. De-typechecker
undefined::(a->a)
undefined::(a->b)
undefined::(b -> c) -> (a -> b) -> a -> c
(((. head . uncurry zip . splitAt 1 . repeat) .
uncurry) .) . (.) . flip
reify (undefined `asTypeOf` ((((. head . uncurry zip . splitAt 1 . repeat) .
uncurry) .) . (.) . flip)) gamma0
14. MagicHaskeller
Susumu Katayama (片山 晋)
Synthesize by exhaustive searching
[input] inputs and predicates
proposition (by type inference)
proof trees (by sequent calculus)
[output] function definition
http://okmij.org/ftp/Haskell/de-typechecker.lhs http://okmij.org/ftp/Haskell/types.html#de-typechecker
15. 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