Abstract. Genetic programming and inductive synthesis of functional programs are two major approaches to inductive functional programming. Recently, in addition to them, some researchers pursue efficient exhaustive program generation algorithms, partly for the purpose of providing a comparator and knowing how essential the ideas such as heuristics adopted by those major approaches are, partly expecting that approaches that exhaustively generate programs with the given type and pick up those which satisfy the given specification may do the task well. In exhaustive program generation, since the number of programs exponentially increases as the program size increases, the key to success is how to restrain the exponential bloat by suppressing semantically equivalent but syntactically different programs. In this paper we propose an algorithm applying random testing of program equivalences (or Monte-Carlo search for functional differences) to the search results of iterative deepening, by which we can totally remove redundancies caused by semantically equivalent programs. Our experimental results show that applying our algorithm to subexpressions during program generation remarkably reduces the computational costs when applied to rich primitive sets.
A successful case of applying brute-force search to functional programming automation is presented and compared with a conventional genetic programming method. From the information of the type and the property that should be satisfied, this algorithm is able to find automatically the shortest Haskell program using the set of function components (or library) configured beforehand, and there is no need to design the library every time one requests a new functional program. According to the presented experiments, programs consisted of several function applications can be found within some seconds even if we always use the library designed for general use. In addition, the proposed algorithm can efficiently tell the number of possible functions of given size that are consistent with the given type, and thus can be a tool to evaluate other methods like genetic programming by providing the information of thebaseline performance.1. construct a set of functions whose return type matches the requested type, and 2. for the type of each argument of each function in the set, if ever, do the same thing recursively.Without the type constraint, repeating that process until small number of depth causes the number of programs explode. However, as we shall see in Section 5, with type constraints the number of matching functions consisted of several functions is sometimes surprisingly small. Its analogy with the cases where doing search for future moves in playing deterministic board games like chess is interesting: because the number of interesting moves is limited by each situation, brute force search without highly heuristic approach like genetic programming can work well.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.