Open AI Codex - AI Coder
Tags: openai, openaicodex, neuralsketch, lowcode
Published: 2021-09-29 12:54:35

To start with, the idea is to generate code in PHP, Ruby on Rails, Django, Java, Python-based AI Coder can generate code in python and Django or any other frameworks. Typically we provide details regarding the software and how it works. This takes effort which is equal to writing the code. AI Coder needs basic info about the entities involved in the code. It can train itself by reading zillions of human-written code. It can read from a repository and generate code based on the components. It is useful for creating samples of code and unit tests for software frameworks. Data generation for testing is another feature of AI Coder. AI Coder can take input as rules, tools, definitions, protocols, database support and or other software support. It can be enhanced to support developed software API for code generation. AI Coder is based on neural sketch learning. Neural sketch learning is related to an ANN trained to identify the code level patterns from different software.

Application configuration will provide the ability to customize certain aspects of the platform like screens, data fields, workflows, etc. The application will have development related configuration related to managing metadata and programmatic updates.
The sample configuration is provided which has the form, form fields, views, entities used in the system.
<?xml version=”1.0" encoding=”UTF-8"?>
<app>
<view>
<name>User</name>
<viewno>1</viewno>
<viewFields>
<viewField>UserId</viewField>
<viewField>UserName</viewField>
<viewField>Password</viewField>
</viewFields>
</view>
The application will have the user view. User view will have the view fields which are UserId, UserName and Password.
<form>
<name>User</name>
<formno>1</formno>
<formFields>
<formField>UserName</formField>
<formField>Password</formField>
</formFields>
</form>
The form configuration for User view will have form fields UserName and Password.
<update>
<name>User</name>
<formno>1</formno>
<formIdField>UserId</formIdField>
<searchFormField>UserName</searchFormField>
<formFields>
<formField>UserName</formField>
<formField>Password</formField>
</formFields>
</update>
The update view will have formno, formIdField, searchFormField and the form fields UserName and Password.
<delete>
<name>User</name>
<formno>1</formno>
<formidField>UserId</formidField>
<searchFormField>UserName</searchFormField>
<formFields>
<formField>UserName</formField>
<formField>Password</formField>
</formFields>
</delete>
</app>
The delete view will have formno, formIdField, searchFormField and the form fields UserName and Password.
The configuration below shows the web service request and response schemas. User service will have getAll, getUser, InsertUser, UpdateUser and DeleteUser methods.
<?xml version=”1.0" encoding=“UTF-8”?>
<wsdl:definitions >
<wsdl:types>
<schema >
<import namespace=”http://pojo.telecom.teal.archcorner.org”/>
<element name=”getAll”>
<complexType/>
</element>
<element name=”getAllResponse”>
<complexType>
<sequence>
<element maxOccurs=”unbounded” name=”getAllReturn” type=”tns1:User”/>
</sequence>
</complexType>
</element>
Get All method request and response definition is shown above.
<element name=”getUser”>
<complexType>
<sequence>
<element name=”userName” type=”xsd:string”/>
</sequence>
</complexType>
</element>
<element name=”getUserResponse”>
<complexType>
<sequence>
<element name=”getUserReturn” type=”tns1:User”/>
</sequence>
</complexType>
</element>
Get User method request and response definition is shown above.
<element name=”updateUser”>
<complexType>
<sequence>
<element name=”userProperties” type=”xsd:string”/>
</sequence>
</complexType>
</element>
<element name=”updateUserResponse”>
<complexType/>
</element>
updateUser method request and response definition is shown above.
<element name=”insertUser”>
<complexType>
<sequence>
<element name=”userProperties” type=”xsd:string”/>
</sequence>
</complexType>
</element>
<element name=”insertUserResponse”>
<complexType/>
</element>
insertUser method request and response definition is shown above.
<element name=”deleteUser”>
<complexType>
<sequence>
<element name=”userProperties” type=”xsd:string”/>
</sequence>
</complexType>
</element>
<element name=”deleteUserResponse”>
<complexType/>
</element>
</schema>
deleteUser method request and response definition is shown above.
The schema definition for the User complex type is shown below.
<schema elementFormDefault=”qualified” targetNamespace=”http://pojo.telecom.teal.archcorner.org” xmlns=”http://www.w3.org/2001/XMLSchema”>
<complexType name=”User”>
<sequence>
<element name="password" nillable=”true” type=”xsd:string”/>
<element name=”userId” type=”xsd:int”/>
<element name=”userName” nillable=”true” type=”xsd:string”/>
</sequence>
</complexType>
</schema>
</wsdl:types>
User complex Type elements are shown above.
<wsdl:message name=”deleteUserResponse”>
<wsdl:part element=”impl:deleteUserResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
<wsdl:message name=”getAllRequest”>
<wsdl:part element=”impl:getAll” name=”parameters”>
</wsdl:part>
</wsdl:message>
deleteUser response elements are shown above.
<wsdl:message name=”updateUserResponse”>
<wsdl:part element=”impl:updateUserResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
<wsdl:message name=”updateUserRequest”>
<wsdl:part element=”impl:updateUser” name=”parameters”>
</wsdl:part>
</wsdl:message>
updateUser response elements are shown above.
<wsdl:message name=”insertUserRequest”>
<wsdl:part element=”impl:insertUser” name=”parameters”>
</wsdl:part>
</wsdl:message>
InsertUser request elements are shown above.
<wsdl:message name=”deleteUserRequest”>
<wsdl:part element=”impl:deleteUser” name=”parameters”>
</wsdl:part>
</wsdl:message>
deleteUser request elements are shown above.
<wsdl:message name=”insertUserResponse”>
<wsdl:part element=”impl:insertUserResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
InsertUser response elements are shown above.
<wsdl:message name=”getUserRequest”>
<wsdl:part element=”impl:getUser” name=”parameters”>
</wsdl:part>
</wsdl:message>
getUser request elements are shown above.
<wsdl:message name=”getAllResponse”>
<wsdl:part element=”impl:getAllResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
getAll response elements are shown above.
<wsdl:message name=”getUserByIdResponse”>
<wsdl:part element=”impl:getUserByIdResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
getUserById response elements are shown above.
<wsdl:message name=”getUserResponse”>
<wsdl:part element=”impl:getUserResponse” name=”parameters”>
</wsdl:part>
</wsdl:message>
getUser response elements are shown above.
<wsdl:portType name=”UserService”>
<wsdl:operation name=”getAll”>
<wsdl:input message=”impl:getAllRequest” name=”getAllRequest”>
</wsdl:input>
<wsdl:output message=”impl:getAllResponse” name=”getAllResponse”>
</wsdl:output>
</wsdl:operation>
User service elements are shown above.
<wsdl:operation name=”getUser”>
<wsdl:input message=”impl:getUserRequest” name=”getUserRequest”>
</wsdl:input>
<wsdl:output message=”impl:getUserResponse” name=”getUserResponse”>
</wsdl:output>
</wsdl:operation>
getUser operation input and message elements are shown above.
<wsdl:operation name=”updateUser”>
<wsdl:input message=”impl:updateUserRequest” name=”updateUserRequest”>
</wsdl:input>
<wsdl:output message=”impl:updateUserResponse” name=”updateUserResponse”>
</wsdl:output>
</wsdl:operation>
updateUser operation input and message elements are shown above.
<wsdl:operation name=”getUserById”>
<wsdl:input message=”impl:getUserByIdRequest” name=”getUserByIdRequest”>
</wsdl: input> <wsdl:output message=”impl:getUserByIdResponse” name=”getUserByIdResponse”>
</wsdl:output>
</wsdl:operation>
getUserById operation input and message elements are shown above.
<wsdl:operation name=”insertUser”>
<wsdl:input message=”impl:insertUserRequest” name=”insertUserRequest”>
</wsdl:input>
<wsdl:output message=”impl:insertUserResponse” name=”insertUserResponse”>
</wsdl:output>
</wsdl:operation>
insertUser operation input and message elements are shown above.
<wsdl:operation name=”deleteUser”>
<wsdl:input message=”impl:deleteUserRequest” name=”deleteUserRequest”>
</wsdl:input>
<wsdl:output message=”impl:deleteUserResponse” name=”deleteUserResponse”>
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
deleteUser operation input and message elements are shown above.

The application configuration helps the framework to learn the semantics of the application. The application has user interfaces, business logic, services, classes, data types, methods, control flow, exceptions and type based entities.
The patterns are identified by the neural sketch-based framework of the AI coder bot which helps in creating, rendering and displaying the applications. The application needs to satisfy the constraints specified in the configuration file. The neural sketch framework is based on the combination of neural learning and combinatorial search. The source code in the framework has the capability to create tree-based syntactic models and sketches.