TY - GEN
T1 - Hoogle
T2 - 37th European Conference on Object-Oriented Programming, ECOOP 2023
AU - Guerra, Henrique Botelho
AU - Ferreira, João F.
AU - Seco, João Costa
N1 - Publisher Copyright:
info:eu-repo/grantAgreement/FCT/6817 - DCRRNI ID/UIDB%2F04516%2F2020/PT#
info:eu-repo/grantAgreement/FCT/6817 - DCRRNI ID/UIDB%2F50021%2F2020/PT#
© Henrique Botelho Guerra, João F. Ferreira, and João Costa Seco.
Funding FCT UIDB/04516/2020, FCT UIDB/50021/2020, and ANI Lisboa-01-0247-Feder-045917.
PY - 2023/7
Y1 - 2023/7
N2 - Type-directed component-based program synthesis is the task of automatically building a function with applications of available components and whose type matches a given goal type. Existing approaches to component-based synthesis, based on classical proof search, cannot deal with large sets of components. Recently, Hoogle+, a component-based synthesizer for Haskell, overcomes this issue by reducing the search problem to a Petri-net reachability problem. However, Hoogle+ cannot synthesize constants nor λ-abstractions, which limits the problems that it can solve. We present Hoogle, an extension to Hoogle+ that brings constants and λ-abstractions to the search space, in two independent steps. First, we introduce the notion of wildcard component, a component that matches all types. This enables the algorithm to produce incomplete functions, i.e., functions containing occurrences of the wildcard component. Second, we complete those functions, by replacing each occurrence with constants or custom-defined λ-abstractions. We have chosen to find constants by means of an inference algorithm: we present a new unification algorithm based on symbolic execution that uses the input-output examples supplied by the user to compute substitutions for the occurrences of the wildcard. When compared to Hoogle+, Hoogle can solve more kinds of problems, especially problems that require the generation of constants and λ-abstractions, without performance degradation.
AB - Type-directed component-based program synthesis is the task of automatically building a function with applications of available components and whose type matches a given goal type. Existing approaches to component-based synthesis, based on classical proof search, cannot deal with large sets of components. Recently, Hoogle+, a component-based synthesizer for Haskell, overcomes this issue by reducing the search problem to a Petri-net reachability problem. However, Hoogle+ cannot synthesize constants nor λ-abstractions, which limits the problems that it can solve. We present Hoogle, an extension to Hoogle+ that brings constants and λ-abstractions to the search space, in two independent steps. First, we introduce the notion of wildcard component, a component that matches all types. This enables the algorithm to produce incomplete functions, i.e., functions containing occurrences of the wildcard component. Second, we complete those functions, by replacing each occurrence with constants or custom-defined λ-abstractions. We have chosen to find constants by means of an inference algorithm: we present a new unification algorithm based on symbolic execution that uses the input-output examples supplied by the user to compute substitutions for the occurrences of the wildcard. When compared to Hoogle+, Hoogle can solve more kinds of problems, especially problems that require the generation of constants and λ-abstractions, without performance degradation.
KW - component-based
KW - Haskell
KW - program synthesis
KW - symbolic execution
KW - Type-directed
KW - unification
UR - http://www.scopus.com/inward/record.url?scp=85168891290&partnerID=8YFLogxK
U2 - 10.4230/LIPIcs.ECOOP.2023.4
DO - 10.4230/LIPIcs.ECOOP.2023.4
M3 - Conference contribution
AN - SCOPUS:85168891290
SN - 978-3-95977-281-5
T3 - Leibniz International Proceedings in Informatics, LIPIcs
BT - 37th European Conference on Object-Oriented Programming, ECOOP 2023
A2 - Ali, Karim
A2 - Salvaneschi, Guido
PB - Schloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
CY - Dagstuhl
Y2 - 17 July 2023 through 21 July 2023
ER -