deductive view of software development
from the general to the speciﬁc
code generation from UML
inductive view of software development
from the speciﬁc to the general
incomplete speciﬁcation -> program
inputs: test cases, I/O examples, traces,
behavior of a program, etc.
outputs: program, algorithm
inductive logic programming
learn concepts(hypotheses), represented by logic
clauses, from examples
somehow generate functions
test functions by examples
e.g. genetic programming, enumeration, etc.
(term rewriting / search / ranking)
converting from undeﬁned to deﬁned
[input] purely polymorphic function types
function types as logic programs (on type level)
implement SLD resolution (by typeclass)
[output] lambda function
undeﬁned::(b -> c) -> (a -> b) -> a -> c
(((. head . uncurry zip . splitAt 1 . repeat) .
uncurry) .) . (.) . ﬂip
reify (undeﬁned `asTypeOf` ((((. head . uncurry zip . splitAt 1 . repeat) .
uncurry) .) . (.) . ﬂip)) gamma0
Susumu Katayama (片山 晋)
Synthesize by exhaustive searching
[input] inputs and predicates
proposition (by type inference)
proof trees (by sequent calculus)
[output] function deﬁnition
f [5,1,3,4,2] == [1,2,3,4,5]
f [1,2,3] == [[3,2,1],[3,2],,] && f [4,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)])
Inductive programming: 2005 2009, 2010, 2011
Sumit Gulwani (Microsoft Research)
(Inductive) Program Synthesis
enabling them to bring their creativity to life!