Program synthesis -- the automatic generation of code given a specification -- is one of the most fundamental tasks in artificial intelligence (AI) and many programmers' dream. Numerous synthesizers have been developed to tackle program synthesis, manifesting different ideas to approach the exponentially growing program space. While numerous smart program synthesis tools exist, reusing and remixing previously developed methods is tedious and time-consuming. We propose Herb.jl, a unifying program synthesis library written in the Julia programming language, to address these issues. Since current methods rely on similar building blocks, we aim to modularize the underlying synthesis algorithm into communicating and fully extendable sub-compartments, allowing for straightforward reapplication of these modules. To demonstrate the benefits of using Herb.jl, we show three common use cases: 1. how to implement a simple problem and grammar, and how to solve it, 2. how to implement a previously developed synthesizer with just a few lines of code, and 3. how to run a synthesizer against a benchmark.
प्रोग्राम संश्लेषण — दिए गए विनिर्देश के अनुसार स्वचालित रूप से कोड उत्पन्न करना — कृत्रिम बुद्धिमत्ता में सबसे मौलिक कार्यों में से एक है और कई प्रोग्रामर का सपना है। हालांकि प्रोग्राम स्पेस की घातीय वृद्धि को संभालने के लिए कई बुद्धिमान प्रोग्राम संश्लेषण उपकरण विकसित किए गए हैं, लेकिन पहले से मौजूद विधियों का पुनः उपयोग और पुनः संयोजन कठिन और समय लेने वाला है। यह पेपर Herb.jl प्रस्तुत करता है, जो Julia प्रोग्रामिंग भाषा में लिखी गई एक एकीकृत प्रोग्राम संश्लेषण पुस्तकालय है जो इन समस्याओं को हल करता है। चूंकि मौजूदा विधियां समान निर्माण खंडों पर निर्भर करती हैं, लेखक अंतर्निहित संश्लेषण एल्गोरिदम को मॉड्यूलर, संचार योग्य और पूरी तरह से विस्तारणीय उप-घटकों में विभाजित करने का लक्ष्य रखते हैं, जिससे इन मॉड्यूल का सीधा पुनः अनुप्रयोग संभव हो सके।
# इनपुट-आउटपुट विनिर्देश परिभाषित करें
problem = Problem([
IOExample(Dict(:x => 0), 1),
IOExample(Dict(:x => 1), 3),
IOExample(Dict(:x => 2), 5),
IOExample(Dict(:x => 3), 7)
])
# व्याकरण परिभाषित करें
grammar = @cfgrammar begin
Int = 1 | 2 | x
Int = Int + Int
Int = Int * Int
end
# खोज निष्पादित करें
iterator = BFSIterator(grammar, :Int, max_depth=5)
solution, flag = synth(problem, iterator)
using HerbBenchmarks
pairs = get_all_problem_grammar_pairs(PBE_SLIA_Track_2019)
solved_problems = 0
for (problem, grammar) in pairs
solution = probe(grammar, :Start, problem; max_depth=5)
if !isnothing(solution)
solved_problems += 1
end
end
पेपर प्रोग्राम संश्लेषण क्षेत्र के महत्वपूर्ण कार्यों का हवाला देता है, जिनमें शामिल हैं:
SyGuS प्रतियोगिता बेंचमार्क (Padhi et al., 2019)
Probe एल्गोरिदम (Barke et al., 2020)
FrAngel संश्लेषक (Shi et al., 2019)
Neo संश्लेषक (Feng et al., 2018)
प्रोग्राम संश्लेषण सर्वेक्षण (Gulwani et al., 2017)
समग्र मूल्यांकन: यह एक उच्च-गुणवत्ता वाला प्रणाली पेपर है जो प्रोग्राम संश्लेषण क्षेत्र में तत्काल आवश्यकता वाली एकीकृत ढांचा प्रस्तुत करता है। हालांकि प्रायोगिक मूल्यांकन के पहलू में सुधार की गुंजाइश है, लेकिन इसके तकनीकी योगदान और व्यावहारिक मूल्य दोनों ही बहुत उत्कृष्ट हैं, और यह इस क्षेत्र का एक महत्वपूर्ण आधारभूत संरचना बनने की संभावना रखता है।