Deep learning based code generation for smart contracts

A significant advantage of Metrx AI is that users of smart contracts no longer need to know how to do coding with a programming language. As a matter of fact, Metrx AI only requires a user to type in the purpose of the contract, i.e., input, output, and transaction conditions, as a script. Then a deep neural network based code generator will identify the basic transaction patterns and convert them into a program capturing the behavior of the target smart contract. In the future, we are going to use pure natural language as the input frontend.

Recent development of the deep learning technology proves the feasibility of automatic code generation. First, the maturing of the convolutional neural network (CNN) enables extracting Script or natural language Convolutional neural network for text feature recognition Recurrent neural network for code generation Code library Program for smart contracts high quality features from language and text. Second, the recurrent neural network (RNN) is mathematically proven to be a Turing complete computer that is able to generate any sequence. These deep neural networks offer the key techniques to analyze the purpose of a contract and generate a respective program. The script capturing the purpose of a contract is fed to a convolutional neural work, which is trained with a large number of labeled samples, to identify the underlying transaction patterns and data attributes. The discovered patterns are organized in a sequence and then given to a recurrent neural network. The RNN has its parameters trained with typical patterns of smart contracts. It transforms the input patterns into a program for the target program with the help of a code library containing codes for various design patterns of smart contracts. Besides offering dramatically enhanced accessibility, the code generation technology of Metrx AI can be readily integrated with automatic security validation and enhancement techniques. In fact, the whole process can be made as a close-loop for iterative improvement. During the operation of Metrx AI blockchain, the underlying models can be continuously updated for better code generation quality

Last updated