20 research outputs found
Ontological Engineering For Source Code Generation
Source Code Generation (SCG) is the sub-domain of the Automatic Programming (AP) that helps programmers to program using high-level abstraction. Recently, many researchers investigated many techniques to access SCG. The problem is to use the appropriate technique to generate the source code due to its purposes and the inputs. This paper introduces a review and an analysis related SCG techniques. Moreover, comparisons are presented for: techniques mapping, Natural Language Processing (NLP), knowledge base, ontology, Specification Configuration Template (SCT) model and deep learnin
TreeGen: A Tree-Based Transformer Architecture for Code Generation
A code generation system generates programming language code based on an
input natural language description. State-of-the-art approaches rely on neural
networks for code generation. However, these code generators suffer from two
problems. One is the long dependency problem, where a code element often
depends on another far-away code element. A variable reference, for example,
depends on its definition, which may appear quite a few lines before. The other
problem is structure modeling, as programs contain rich structural information.
In this paper, we propose a novel tree-based neural architecture, TreeGen, for
code generation. TreeGen uses the attention mechanism of Transformers to
alleviate the long-dependency problem, and introduces a novel AST reader
(encoder) to incorporate grammar rules and AST structures into the network. We
evaluated TreeGen on a Python benchmark, HearthStone, and two semantic parsing
benchmarks, ATIS and GEO. TreeGen outperformed the previous state-of-the-art
approach by 4.5 percentage points on HearthStone, and achieved the best
accuracy among neural network-based approaches on ATIS (89.1%) and GEO (89.6%).
We also conducted an ablation test to better understand each component of our
model
De-fine: Decomposing and Refining Visual Programs with Auto-Feedback
Visual programming, a modular and generalizable paradigm, integrates
different modules and Python operators to solve various vision-language tasks.
Unlike end-to-end models that need task-specific data, it advances in
performing visual processing and reasoning in an unsupervised manner. Current
visual programming methods generate programs in a single pass for each task
where the ability to evaluate and optimize based on feedback, unfortunately, is
lacking, which consequentially limits their effectiveness for complex,
multi-step problems. Drawing inspiration from benders decomposition, we
introduce De-fine, a general framework that automatically decomposes complex
tasks into simpler subtasks and refines programs through auto-feedback. This
model-agnostic approach can improve logical reasoning performance by
integrating the strengths of multiple models. Our experiments across various
visual tasks show that De-fine creates more accurate and robust programs,
setting new benchmarks in the field