-
公开(公告)号:US12045609B1
公开(公告)日:2024-07-23
申请号:US17850583
申请日:2022-06-27
Applicant: Amazon Technologies, Inc.
Inventor: Neela Sawant , Pranav Garg
Abstract: Techniques for generating custom rules are described. For example, a system to receive at least one request to create rules based on a policy and code repository files stored by the storage service; analyze the policy to generate a collection of rule candidates; analyze the code repository files to identify labeled code examples that either conform or do not conform to the rule candidates; receive a selection of the labeled code examples; and synthesize at least one rule that includes a precondition that specifies applicability to the selected labeled code examples and a postcondition that expresses a check to be performed contingent on the precondition being satisfied is at least described.
-
公开(公告)号:US11914993B1
公开(公告)日:2024-02-27
申请号:US17364768
申请日:2021-06-30
Applicant: Amazon Technologies, Inc.
Inventor: Pranav Garg , Sengamedu Hanumantha Rao Srinivasan , Benjamin Robert Liblit , Rajdeep Mukherjee , Omer Tripp , Neela Sawant
Abstract: An aggregate representation of a collection of source code examples is constructed. The collection includes positive examples that conform to a coding practice and negative examples do not conform to the coding practice. The aggregate representation includes nodes corresponding to source code elements, and edges representing relationships between code elements. Using an iterative analysis of the aggregate representation, a rule to automatically detect non-conformance is generated. The rule is used to provide an indication that a set of source code is non-conformant.
-
公开(公告)号:US11150897B1
公开(公告)日:2021-10-19
申请号:US16836447
申请日:2020-03-31
Applicant: Amazon Technologies, Inc.
Inventor: Neela Sawant , Hoan Anh Nguyen , Srinivasan Sengamedu Hanumantha Rao
IPC: G06F8/73 , G06F11/36 , G06F16/2458
Abstract: Techniques for generating rules from documentation are described. For example, a method for generating rules may include generating one or more templates containing patterns and anti-patterns from code of one or more documents, wherein a pattern captures a good coding practice as detailed in the documents and an anti-pattern is a proper subset of a pattern that does not include a construct described in the documents as being a recommended and/or required usage; constructing one or more graphs from the one or more templates; mining the constructed one or more graphs to find target sub-graphs which do not contain bugs, wherein a bug occurs when an anti-pattern matches, but a pattern does not match; comparing the target sub-graphs to a representative dataset to remove target sub-graphs that violate good usage; and codifying the sub-graphs that represent good usage.
-
公开(公告)号:US10809983B1
公开(公告)日:2020-10-20
申请号:US16198980
申请日:2018-11-23
Applicant: Amazon Technologies, Inc.
Inventor: Russell Reas , Neela Sawant , Srinivasan Sengamedu Hanumantha Rao
IPC: G06F8/41
Abstract: Techniques for suggesting a name from one or more code files are described. An exemplary method includes receiving a request to suggest one or more names for a name in a code file; determining one or more names based on existing names in one or more code files using one or more abstract syntax trees (ASTs) for the one or more code files; and outputting the determined one or more names as a name suggestion that comprises novel sequences of sub-tokens of existing names of the one or more code files.
-
公开(公告)号:US11604626B1
公开(公告)日:2023-03-14
申请号:US17357839
申请日:2021-06-24
Applicant: Amazon Technologies, Inc.
Inventor: Neela Sawant , Sengamedu Hanumantha Rao Srinivasan
Abstract: Code may be analyzed according to natural language descriptions of coding practices. A practice for code written in a natural language description may be received. An embedding of the natural language description may be generated using a machine learning model trained to detect examples of practices. The embedding may be compared with embeddings of code portions stored in an index to detect one or more portions of code that satisfy a facet of the practice. The detected portions of code may be identified.
-
公开(公告)号:US11372742B1
公开(公告)日:2022-06-28
申请号:US16836586
申请日:2020-03-31
Applicant: Amazon Technologies, Inc.
IPC: G06F8/10 , G06F8/73 , G06F11/36 , G06F16/2458
Abstract: Techniques for generating rules from documentation are described. For example, a method for generating rules may include generating one or more rules from documentation by: extracting a plurality of chunks from the documentation, inferring one or more candidate rules from the extracted chunks, mining the inferred one or more candidate rules to determine at least one of the one or more candidate rules is to be included in rule generation, classifying the at least one mined one or more candidate rules as one or more rules, and extracting information to generate the one or more rules.
-
7.
公开(公告)号:US10901708B1
公开(公告)日:2021-01-26
申请号:US16198969
申请日:2018-11-23
Applicant: Amazon Technologies, Inc.
Inventor: Russell Reas , Neela Sawant , Srinivasan Sengamedu Hanumantha Rao , Yinglong Wang , Anton Emelyanov , Shishir Sethiya
Abstract: Techniques for unsupervised learning of embeddings on source code from non-local contexts are described. Code can be processed to generate an abstract syntax tree (AST) which represents syntactic paths between tokens in the code. Once the AST(s) have been generated, the paths in the AST(s) can be crawled to identify terminals (e.g., leaf nodes in the AST) and paths between terminals can be identified. The pairs of tokens identified at the ends of each path can then be used to generate a cooccurrence matrix. For example, if X number of unique terminals are identified, a matrix of size X by X can be generated to indicate a frequency at which pairs of terminals cooccur. This cooccurrence matrix can then be used as input to existing techniques for learning vector-space embeddings, such as word2vec, GloVe, Swivel, etc.
-
-
-
-
-
-