Automatic Programming
Generate a Python notebook for pipeline models using AutoAI
In this code pattern, learn how to use AutoAI to automatically generate a Jupyter Notebook that contains Python code of a machine learning model. Then, explore, modify, and retrain the model pipeline using Python before deploying the model in IBM Watson Machine Learning using Watson Machine Learning APIs. AutoAI is a graphical tool available within IBM Watson Studio that analyzes your data set, generates several model pipelines, and ranks them based on the metric chosen for the problem. This code pattern shows extended features of AutoAI. More basic AutoAI exploration for the same data set is covered in the Generate machine learning model pipelines to choose the best model for your problem tutorial.
Improving Tree-Structured Decoder Training for Code Generation via Mutual Learning
Xie, Binbin, Su, Jinsong, Ge, Yubin, Li, Xiang, Cui, Jianwei, Yao, Junfeng, Wang, Bin
Code generation aims to automatically generate a piece of code given an input natural language utterance. Currently, among dominant models, it is treated as a sequence-to-tree task, where a decoder outputs a sequence of actions corresponding to the pre-order traversal of an Abstract Syntax Tree. However, such a decoder only exploits the preorder traversal based preceding actions, which are insufficient to ensure correct action predictions. In this paper, we first throughly analyze the context modeling difference between neural code generation models with different traversals based decodings (preorder traversal vs breadth-first traversal), and then propose to introduce a mutual learning framework to jointly train these models. Under this framework, we continuously enhance both two models via mutual distillation, which involves synchronous executions of two one-to-one knowledge transfers at each training step. More specifically, we alternately choose one model as the student and the other as its teacher, and require the student to fit the training data and the action prediction distributions of its teacher. By doing so, both models can fully absorb the knowledge from each other and thus could be improved simultaneously. Experimental results and in-depth analysis on several benchmark datasets demonstrate the effectiveness of our approach. We release our code at https://github.com/DeepLearnXMU/CGML.
Automated Code Generation Tools Can Solve Problems
Over the years I've gotten to work with a lot of different programming languages. I grew up on Basic and 6502 machine code. I learned Pascal in middle school and C in high school. I learned Perl, Scheme, Cobol, and Fortran in college. I've written books on x86 assembly language, JavaScript, and PHP.
Formal Fields: A Framework to Automate Code Generation Across Domains
Code generation, defined as automatically writing a piece of code to solve a given problem for which an evaluation function exists, is a classic hard AI problem. Its general form, writing code using a general language used by human programmers from scratch is thought to be impractical. Adding constraints to the code grammar, implementing domain specific concepts as primitives and providing examples for the algorithm to learn, makes it practical. Formal fields is a framework to do code generation across domains using the same algorithms and language structure. Its ultimate goal is not just solving different narrow problems, but providing necessary abstractions to integrate many working solutions as a single lifelong reasoning system. It provides a common grammar to define: a domain language, a problem and its evaluation. The framework learns from examples of code snippets about the structure of the domain language and searches completely new code snippets to solve unseen problems in the same field. Formal fields abstract the search algorithm away from the problem. The search algorithm is taken from existing reinforcement learning algorithms. In our implementation it is an apropos Monte-Carlo Tree Search (MCTS). We have implemented formal fields as a fully documented open source project applied to the Abstract Reasoning Challenge (ARC). The implementation found code snippets solving twenty two previously unsolved ARC problems.
The Launch of GitLab 13.1: Automated DevOps Management & QC Filters
The world's most powerful web-based DevOps lifecycle tool GitLab has released GitLab 13.1 to track coding quality and to stay compliant with the dynamic needs of the DevOps world. GitLab 13.1 is now officially available with extended Alert Management and Automated Coding Reporting features. Those who follow GitLab closely would agree that its acquisition of Gemnasium in 2018 has helped further fortify the security and compliance in open source. The smartest enhancement in GitLab 13.1 is Alert Management; to maintain a record of all application maintenance and to address critical issues in real-time. Simplified Alert Management, Alert Assignments and Slack integration enhance DevOps productivity with faster collaboration and just-in-time principles.
A Look into the Future - Source Code Generation by the Bots
Please read Using the Code before running the code. Software development technologies have been evolved to fulfill growing demand and capabilities of hardware and methodologies. Role of automation in software development plays a more and more significant role in order to simplify manual labor. Examples of the software development automation include systems of code build managers, static code analyzers, tests, and so on. On the other hand, researches in the field of artificial intelligence and robotics show significant progress. The family of software that are named "bots" is intensively growing.
Code Generation with Roslyn - Programmer Books
One of the many benefits you will discover is that Roslyn uses an innovative approach to compiler design, opening up the inner workings of the compiler process. You will learn how to see the syntax tree that Roslyn is building as it compiles your code. Additionally, you will learn to feed it your own syntax tree that you create on the fly.
Code Generation as a Dual Task of Code Summarization
Wei, Bolin, Li, Ge, Xia, Xin, Fu, Zhiyi, Jin, Zhi
Code summarization (CS) and code generation (CG) are two crucial tasks in the field of automatic software development. Various neural network-based approaches are proposed to solve these two tasks separately. However, there exists a specific intuitive correlation between CS and CG, which have not been exploited in previous work. In this paper, we apply the relations between two tasks to improve the performance of both tasks. In other words, exploiting the duality between the two tasks, we propose a dual training framework to train the two tasks simultaneously. In this framework, we consider the dualities on probability and attention weights, and design corresponding regularization terms to constrain the duality. We evaluate our approach on two datasets collected from GitHub, and experimental results show that our dual framework can improve the performance of CS and CG tasks over baselines.
Structural Language Models for Any-Code Generation
Alon, Uri, Sadaka, Roy, Levy, Omer, Yahav, Eran
We address the problem of Any-Code Generation (AnyGen) - generating code without any restriction on the vocabulary or structure. The state-of-the-art in this problem is the sequence-to-sequence (seq2seq) approach, which treats code as a sequence and does not leverage any structural information. We introduce a new approach to AnyGen that leverages the strict syntax of programming languages to model a code snippet as a tree - structural language modeling (SLM). SLM estimates the probability of the program's abstract syntax tree (AST) by decomposing it into a product of conditional probabilities over its nodes. We present a neural model that computes these conditional probabilities by considering all AST paths leading to a target node. Unlike previous structural techniques that have severely restricted the kinds of expressions that can be generated, our approach can generate arbitrary expressions in any programming language. Our model significantly outperforms both seq2seq and a variety of existing structured approaches in generating Java and C# code. We make our code, datasets, and models available online.
A Survey of Automated Programming Hint Generation -- The HINTS Framework
McBroom, Jessica, Koprinska, Irena, Yacef, Kalina
Automated tutoring systems offer the flexibility and scalability necessary to facilitate the provision of high quality and universally accessible programming education. In order to realise the full potential of these systems, recent work has proposed a diverse range of techniques for automatically generating hints to assist students with programming exercises. This paper integrates these apparently disparate approaches into a coherent whole. Specifically, it emphasises that all hint techniques can be understood as a series of simpler components with similar properties. Using this insight, it presents a simple framework for describing such techniques, the Hint Iteration by Narrow-down and Transformation Steps (HINTS) framework, and it surveys recent work in the context of this framework. It discusses important implications of the survey and framework, including the need to further develop evaluation methods and the importance of considering hint technique components when designing, communicating and evaluating hint systems. Ultimately, this paper is designed to facilitate future opportunities for the development, extension and comparison of automated programming hint techniques in order to maximise their educational potential.