DETAILED ACTION
Notice of Pre-AIA or AIA Status
The present application, filed on or after March 16, 2013, is being examined under the first inventor to file provisions of the AIA .
Claim Rejections - 35 USC § 101
35 U.S.C. 101 reads as follows:
Whoever invents or discovers any new and useful process, machine, manufacture, or composition of matter, or any new and useful improvement thereof, may obtain a patent therefor, subject to the conditions and requirements of this title.
Claims 1-2, 6-12, 16-20 are rejected under 35 U.S.C. 101 because the claimed invention is directed to an abstract idea without significantly more. Claim 1 recites, “identifying a doe segments”, “converting the code segment…”, “generating a second AST…”, and “converting the second AST to a code segment…”. The limitations of “identifying”, “converting”, “generating” and “converting” as drafted are functions that, under their broadest reasonable interpretation, recite the abstract idea of a mental process. The limitations encompass a human mind carrying out the function through observation, evaluation, judgment and /or opinion, or even with the aid of pen and paper. Thus, this limitation recites and falls within the “Mental Processes” grouping of abstract ideas under Prong 1.
Under Prong 2, this judicial exception is not integrated into a practical application. Accordingly, the additional elements do not integrate the recited judicial exception into a practical application and the claim is therefore directed to the judicial exception
Under Step 2B, the claims do not include additional elements that are sufficient to amount to significantly more than the judicial exception. Accordingly, claim 1 is not patent eligible under 35 USC 101.
Claim 2, claims “traversing the first AST..”, “determining a second token sequence…” and “traversing the second token sequence…”. These limitations are further limitations of the abstract idea “Mental Process”. Nothing in the claimed limitations prevent them from being performed in the mind. The additional limitations are neither a practical application under prong 2, nor an inventive concept under step under step 2B.
Claim 6, claims a step of “traversing the first abstracts syntax tree…”. This limitation is a further limitation of the abstract idea “Mental Process”. Nothing in the claimed limitation prevents the limitations from being performed in the mind. The additional limitation is neither a practical application under prong 2, nor an inventive concept under step under step 2B.
As per claim 7, The additional limitations are neither a practical application under prong 2, nor an inventive concept under step under step 2B.
Claim 8, claims “slicing the API into a plurality of code segments…”, “determining a degree of match…”, and “determining…the first version.”. These limitations are further limitations of the abstract idea “Mental Process”. Nothing in the claimed limitations prevent them from being performed in the mind. The additional limitations are neither a practical application under prong 2, nor an inventive concept under step under step 2B.
Claim 9, claims “identifying a plurality of functions code segments…”, “detecting the plurality of function code segments…”, and “determining…the first version.”. Nothing in the claimed limitations prevent them from being performed in the mind. The additional limitations are neither a practical application under prong 2, nor an inventive concept under step under step 2B.
Claim 10, claims a step of “determining…the first version”. This limitation is a further limitation of the abstract idea “Mental Process”. Nothing in the claimed limitation prevents the limitations from being performed in the mind. The additional limitation is neither a practical application under prong 2, nor an inventive concept under step under step 2B.
Claims 11-12 and 16-20, contain similar limitations to claims 1-2 and 6-10 and are therefore rejected for the same reasons.
Claim Rejections - 35 USC § 103
In the event the determination of the status of the application as subject to AIA 35 U.S.C. 102 and 103 (or as subject to pre-AIA 35 U.S.C. 102 and 103) is incorrect, any correction of the statutory basis (i.e., changing from AIA to pre-AIA ) for the rejection will not be considered a new ground of rejection if the prior art relied upon, and the rationale supporting the rejection, would be the same under either status.
The following is a quotation of 35 U.S.C. 103 which forms the basis for all obviousness rejections set forth in this Office action:
A patent for a claimed invention may not be obtained, notwithstanding that the claimed invention is not identically disclosed as set forth in section 102, if the differences between the claimed invention and the prior art are such that the claimed invention as a whole would have been obvious before the effective filing date of the claimed invention to a person having ordinary skill in the art to which the claimed invention pertains. Patentability shall not be negated by the manner in which the invention was made.
Claims 1, 9-11 and 19-20 are rejected under 35 U.S.C. 103 as being unpatentable over Agboola (“Abstract Syntax Trees and Practical Applications in JavaScript” and further in view of Zhang (US 2021/0192321 A1).
As per claim 1, Agboola et al. teaches the invention as claimed including, “A method for updating an application programming interface (API), comprising: identifying a code segment of a first version from the API;
converting the code segment of the first version to a first abstract syntax tree (AST) according to a first conversion strategy;
generating a second AST according to the first AST; and
converting the second AST to a code segment of a second version according to a second conversion strategy.”
Agboola teaches code transpililation (pg.3-4). The transpiler translates source code written in one programming language into equivalent source code. The transpiler begins by parsing the code into an abstract syntax tree (AST) (first AST using first strategy). Following this, it proceeds to transform the AST (generated second AST) before finally generating code based on the modified AST (second version according to a second conversion strategy). Also see the drawing (Code Tranpililation) and (AST in Transpliers (Babel)).
However, Agboola does not teach the code segment being a API code.
Zhang teaches source code for a application program interface (API) that is converted to an alternative form such as a abstract syntax tree (AST) (0038-0039).
It would have been obvious to one of ordinary skill in the art before the effective filing date to modify Agboola with Zhang because both teach the generation of a AST from source code. Source code can be used to create many different types of application programs, this includes application program interfaces as taught by Zhang. This is nothing more than a design choice and would have been obvious to try.
As per claim 9, Zhang et al. further teaches, “The method according to claim 1, wherein identifying the code segment of the first version from the API comprises:
identifying a plurality of function code segments from the API, wherein each of the function code segments comprises at least one function;
detecting the plurality of function code segments; and
determining, in response to a version of one code segment of the plurality of code segments being the first version, the one code segment as the code segment of the first version.”
Zhang et al. teaches code for an application programming interface. A particularly large code file may be broken up into smaller snippets (e.g., delineated into functions, object etc.). At least some of the source code snippets of the code base may be converted into an alternative form such as a abstract syntax tree (AST) (0038-0039). ASTs are input and an output is generated (0040). Also see 0052. Also see figure 2.
As per claim 10, Zhang et al. further teaches, “The method according to claim 9, further comprising:
determining, in response to a version of another code segment of the plurality of code segments being the first version, the another code segment as the code segment of the first version after the conversion of the code segment of the second version.”
Zhang et al. teaches code for an applicant programming interface. A particularly large code file may be broken up into smaller snippets (e.g., delineated into functions, object etc.). At least some of the source code snippets of the code base may be converted into an alternative form such as an abstract syntax tree (AST) (0038-0039). ASTs are input and an output is generated (0040). Also see 0052. Also see figure 2.
As per claims 11 and 19-20, they contain similar limitations to claims 1 and 9 and are therefore rejected for similar reasons.
Claims 2-7 and 12-17 are rejected under 35 U.S.C. 103 as being unpatentable over Agboola (“Abstract Syntax Trees and Practical Applications in JavaScript” and Zhang (US 2021/0192321 A1) as applied to claims 1 and 11 above and further in view of Clement et al. (US 2022/0308848 A1) and Chen et al. (“Tree-to-tree Neural Networks for Program Translation”).
As per claim 2, Agboola does not explicitly appear to teach, “The method according to claim 1, wherein generating the second AST according to the first AST comprises:
traversing the first AST according to a first traversal strategy to obtain a first token sequence;
determining a second token sequence according to the first token sequence using a language converter; and”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a syntax tree and extracts tokens from the syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Clement et al. teaches the code can be parsed into an abstract syntax tree (0042). Clement et al. teaches the neural transformer model is structured in a encoder-decoder configuration (0022).
Clement et al. does not explicitly appear to teach, “traversing the second token sequence according to a reverse traversal strategy for the first traversal strategy to obtain the second AST.”
Chen et al. teaches a tree-to-tree neural network that follows a encoder-decoder framework to encode the source tree into an embedding and decoding the embedding into the target tree (3.2 Tree-to-tree Neural Network).
It would have been obvious to one of ordinary skill in the art before the effective filing date to modify Agboola with Clement et al. and Chen et al. Agboola teaches a transpiler that uses a plugin that can apply the required transformation to an abstract syntax tree and after the transformations are complete the resulting AST is converted back into code (AST in Transpliers (Babel)). However, Abgoola does not explicitly teach the steps performed in the transformation. Clement et al. also teaches the similar device that transforms a syntax tree of a source language to a target language. This is done using an encoder and decoder by parsing the tree into a order sequence of subtokens and translating the ordered sequence into a candidate sequence. Applying known the technique of an encoder and decoder of Clement et al. to Agboola et al. would allow Agboola et al. to using machine learning inorder to transform code and apply it as a plugin for transformation. Lastly, Chen et al. further teaches the use of an encoder – decoder that is able to encoder a source tree into an embedding and then decode the embedding into a target tree. Clement et al. teaches the generation of a candidate sequence but does not fully teach the decoding step to transform the candidate sequence back to a target tree. Transforming the candidate sequence back to a target tree would allow the tree for then be turned into translate source code as taught by Agboola. All three reference teach similar devices to translate code, substituting a encoder-decoder process as the plugin of Abgoola would produce similar results. This is nothing more than a design choice.
As per claim 3, Clement et al. further teaches, “The method according to claim 2, wherein determining the second token sequence according to the first token sequence using the language converter comprises:
acquiring a training code segment of a first version and a training code segment of a second version;
converting the training code segment of the first version to a first training AST according to the first conversion strategy;
traversing the first training AST according to the first traversal strategy to obtain a first training token sequence;
converting the training code segment of the second version to a second training AST according to the first conversion strategy;
traversing the second training AST according to the first traversal strategy to obtain a second training token sequence;
performing supervised training of the language converter using the first training token sequence and the second training token sequence, wherein the second training token sequence serves as a label of the first training token sequence; and”
Clement et al. teaches fine-tuning the pre-trained model on supervised translation tasks. A pair of source code snippets having an original source code snippet written in a first programming language and a known translation in a second programming language. For each pair, the original source code snippet and the translated source code snippet are parsed into a syntax tree. The tree is traversed to obtain an ordered sequence of tokens, byte-pair encoding is used to generate an encoding for each token. The fine-tuning component applies the ordered sequence of token tuples representing the original source code snippet to the pre-trained neural transformer model and the ordered sequence of token tuples representing the corresponding translation to the pre-trained neural transformer model (0096-0099). Also see figure 8.
“predicting the second token sequence according to the first token sequence using the trained language converter.”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a syntax tree and extracts tokens from the syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Also see 0042.
As per claim 4, Clement et al. further teaches, “The method according to claim 3, further comprising:
determining a third token sequence according to the first token sequence using the language converter;”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a syntax tree and extracts tokens from the syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Clement teaches the generation of a plurality of candidate sequences from the source code snipped. Also see 0042. Clement et al. teaches the neural transformer model is structured in a encoder-decoder configuration (0022).
“traversing the third token sequence according to the reverse traversal strategy for the first traversal strategy to obtain a third AST; and”
Chen et al. teaches a tree-to-tree neural network that follows a encoder-decoder framework to encode the source tree into an embedding an decoder the embedding into the target tree (3.2 Tree-to-tree Neural Network).
“converting the third AST to a code segment of a third version according to the second conversion strategy, wherein the third version is different from the second version.”
Agboola teaches code transpililation. The transpiler translates source code written in one programming language into equivalent source code. Code is generated based on the modified AST (second version according to a second conversion strategy). Also see the drawing (Code Tranpililation) and (AST in Transpliers (Babel)).
As per claim 5, Clement et al. further teaches, “The method according to claim 4, wherein determining the third token sequence according to the first token sequence using the language converter comprises:
acquiring a training code segment of a third version;
converting the training code segment of the third version to a third training AST according to the first conversion strategy;
traversing the third training AST according to the first traversal strategy to obtain a third training token sequence;
performing supervised training of the language converter using the first training token sequence and the third training token sequence, wherein the third training token sequence serves as a label of the first training token sequence; and”
Clement et al. teaches fine-tuning the pre-trained model on supervised translation tasks. A pair of source code snippets having an original source code snippet written in a first programming language and a known translation in a second programming language. For each pair the original source code snippet and the translated source code snippet are parsed into a syntax tree. The tree is traversed to obtain an ordered sequence of tokens, byte-pair encoding is used to generate an encoding for each token. The fine-tuning component applies the ordered sequence of token tuples representing the original source code snippet to the pre-trained neural transformer model and the ordered sequence of token tuples representing the corresponding translation to the pre-trained neural transformer model (0096-0099) Also see figure 8.
“predicting the third token sequence according to the first token sequence using the trained language converter.”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a syntax tree and extracts tokens from the concrete syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Also see 0042.
As per claim 6, Clement et al. further teaches, “The method according to claim 2, wherein traversing the first abstract syntax tree based on the first traversal strategy comprises:
traversing the first abstract syntax tree by means of one of preorder traversing, inorder traversing, and postorder traversing.”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a syntax tree and extracts tokens from the syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Also see 0042.
As per claim 7, Zhang et al. and Clement et al. further teach, “The method according to claim 2, wherein the API is written in a first programming language, the code segment of the second version is written in a second programming language, and the first programming language is different from the second programming language.”
Zhang teaches source code for a application program interface (API) that is converted to an alternative form such as a abstract syntax tree (AST) (0038-0039).
Clements teaches the neural transformer model translates a source code snippet written in one programming language into a different programming language (0004).
As per claims 12-17, they contain similar limitations to claims 2-7 and are therefore rejected for similar reasons.
Claims 8 and 18 are rejected under 35 U.S.C. 103 as being unpatentable over Agboola (“Abstract Syntax Trees and Practical Applications in JavaScript” and Zhang (US 2021/0192321 A1) as applied to claims 1 and 11 above and further in view of Clement et al. (US 2022/0308848 A1).
As per claim 8, Zhang et al. further teaches, “The method according to claim 1, wherein identifying the code segment of the first version from the API comprises:
slicing the API into a plurality of code segments in accordance with a preset window;”
Zhang et al. teaches code for an applicant programming interface. A particularly large code file may be broken up into smaller snippets (e.g., delineated into functions, object etc.). At least some of the source code snippets of the code base may be converted into a alternative form such as a abstract syntax tree (AST) (0038-0039). ASTs are input and an output is generated (0040). Also see 0052.
Agboola teaches a transpiler that uses a plugin that can apply the required transformation to an abstract syntax tree and after the transformations are complete the resulting AST is converted back into code (AST in Transpliers (Babel)). However Agboola and Zhang et al. do not explicitly appear to teach, “determining a degree of match between each of the code segments and the code segment of the second version; and
determining, in response to a degree of match between one code segment of the plurality of code segments and the code segment of the second version being greater than a first threshold, the one code segment as the code segment of the first version.”
Clement et al. teaches a translations engine that receives a request to translate a source code snippet. A source code snippet is parsed into a concrete syntax tree and extracts tokens from the concrete syntax tree into ordered sequences of subtokens. Subtoken embeddings are obtained for each subtoken. The translation engine performs a beam search to generate k translation candidate sequences. A translation candidate sequence is a translation generated by the neural transformer model. The translation candidate sequences are then filtered and ranked to produce those translations deemed more accurate (0117-0121). Clement et al. teaches judging whether syntax trees can be formed without error and measures the similarity between a predicted translation and a true translation. The ranking engine filters out translation candidate sequences that do not meet a certain criterion (threshold) and computers a ranking score for each of the unfiltered translation candidate sequences (0124-0132).
It would have been obvious to one of ordinary skill in the art before the effective filing date to modify Agboola and Zhang et al. with Clement et al. Agboola and Zhang both teach the generation of a AST from source code. Zhang et al. teaches that a particularly large source code file may be broken up into smaller snippets and where in each snippet may be converted into an alternative form such as a Abstract syntax tree (0038-0039). This known technique of breaking up large files into smaller files to be process would allow Agboola to process large code files improving Agboola in a similar way to Zhang et al. Clement teaches the generation of multiple translation candidates. Filters and ranking are used in order to filter out some translation candidates and rank the candidates that are not filtered out (0124-0126). This will allow the system to generate candidates that have a low chance of error improving the results of Agboola.
As per claim 18, it contains similar limitations to claim 8 and is rejected for the same reason.
Conclusion
Any inquiry concerning this communication or earlier communications from the examiner should be directed to MARK A GOORAY whose telephone number is (571)270-7805. The examiner can normally be reached Monday - Friday 10:00am - 6:00pm.
Examiner interviews are available via telephone, in-person, and video conferencing using a USPTO supplied web-based collaboration tool. To schedule an interview, applicant is encouraged to use the USPTO Automated Interview Request (AIR) at http://www.uspto.gov/interviewpractice.
If attempts to reach the examiner by telephone are unsuccessful, the examiner’s supervisor, Lewis Bullock can be reached at 571-272-3759. The fax phone number for the organization where this application or proceeding is assigned is 571-273-8300.
Information regarding the status of published or unpublished applications may be obtained from Patent Center. Unpublished application information in Patent Center is available to registered users. To file and manage patent submissions in Patent Center, visit: https://patentcenter.uspto.gov. Visit https://www.uspto.gov/patents/apply/patent-center for more information about Patent Center and https://www.uspto.gov/patents/docx for information about filing in DOCX format. For additional questions, contact the Electronic Business Center (EBC) at 866-217-9197 (toll-free). If you would like assistance from a USPTO Customer Service Representative, call 800-786-9199 (IN USA OR CANADA) or 571-272-1000.
/MARK A GOORAY/ Examiner, Art Unit 2199
/LEWIS A BULLOCK JR/ Supervisory Patent Examiner, Art Unit 2199