Patents
Literature
Patsnap Eureka AI that helps you search prior art, draft patents, and assess FTO risks, powered by patent and scientific literature data.

6 results about "Type inference" patented technology

Type inference refers to the automatic detection of the data type of an expression in a programming language. It is a feature present in some strongly statically typed languages. It is often characteristic of functional programming languages in general. Some languages that include type inference include C++11, C# (starting with version 3.0), Chapel, Clean, Crystal, D, F#, FreeBASIC, Go, Haskell, Java (starting with version 10), Julia, Kotlin, ML, Nim, OCaml, Opa, RPython, Rust, Scala, Swift, Vala and Visual Basic (starting with version 9.0). The majority of them use a simple form of type inference; the Hindley-Milner type system can provide more complete type inference. The ability to infer types automatically makes many programming tasks easier, leaving the programmer free to omit type annotations while still permitting type checking.

A method and apparatus for automatic inference of variable types in a low-code platform

The application discloses a low-code platform variable type automatic inference method and device. The method comprises the following steps: screening a variable with an automatic type identifier in a low-code platform to obtain a target variable; obtaining a default value inference result based on a type inference rule; traversing a structured model corresponding to a business logic and declaration information to obtain a node assignment inference result; obtaining a dependency relationship inference result through a multi-round iteration strategy recursive derivation; integrating the default value inference result, the node assignment inference result and the dependency relationship inference result to determine an initial type of the target variable; storing the initial type based on inference trace information and realizing change notification to finally obtain a target type. Through multi-stage inference, expression type calculation, chain dependency processing and other designs, the application does not need to manually specify the type, supports complex scene inference, maintains type safety, reduces use and maintenance costs, and improves the development efficiency and ease of use of the low-code platform.
Owner:XIAN GRAPE CITY SOFTWARE CO LTD

A training and inference method for python repository-level complex type inference

PendingCN122285012AComplex typeLinguistic model
This invention discloses a training and inference method for complex type inference at the Python repository level. It constructs a semantic graph of types; organizes type semantic contexts and constructs single-round type inference training samples, performing supervised fine-tuning on a large language model to obtain a single-round type inference base model; represents the predicted type and reference type as a type tree, constructing verifiable structured rewards; constructs multi-round refinement objectives according to the depth of the reference type, aggregating round-by-round refinement rewards, termination penalties, and final result rewards to obtain a hierarchical reinforcement learning model; constructs a repository-level scheduling order; for the multi-round refinement process, in each round, multiple candidate outputs are mapped to a depth-constrained abstract type space, and the stage decoding result is obtained through type space self-consistency aggregation, outputting the final predicted type. This invention can simultaneously enhance the cross-process semantic utilization capability, deep structure inference capability, and repository-level type consistency in complex type inference.
Owner:NANJING UNIV

A source code vulnerability detection method based on multi-source feature fusion and ensemble learning

PendingCN122433083AData streamFeature Dimension
The application discloses a source code vulnerability detection method based on multi-source feature fusion and ensemble learning, which adopts a three-stage pipeline architecture: firstly, four-way features of abstract syntax tree, control flow graph, data flow graph and sequential semantics are extracted from the source code in parallel and encoded respectively; secondly, the four-way features are dynamically assigned weights and weightedly fused through a multi-head attention mechanism, and a limited-depth inter-function dependency graph is constructed to complete the inter-process context of cross-function, and then the context-enhanced multi-source fusion vector of 512 dimensions is output through the transformation coding and principal component analysis dimension reduction; finally, the three vulnerability type exclusive sub-models of syntax, data flow and control flow are driven by the fusion vector for parallel integrated detection, the contribution of each sub-model is quantified by combining gradient importance analysis, and the integrated decision layer dynamically weights the output of the detection label, vulnerability confidence and the explainability report containing the main trigger sub-model, key feature dimension and CWE vulnerability type inference.
Owner:SOUTH CHINA UNIV OF TECH

Method and apparatus for type inference of programming languages

The application provides a type inference method and device of a programming language, the method comprising: in the development process of program code, obtaining a node to be inferred in an abstract syntax tree, the node to be inferred indicating a field to be inferred in the program code, the field to be inferred comprising one of the following: a variable, a class, a function or a parameter; obtaining a constraint related to the node to be inferred, the constraint being used to indicate a relationship involved by the node to be inferred in the abstract syntax tree; determining a type of the node to be inferred according to the constraint, the type of the node to be inferred being one of the following: a numeric type, a sequence type, a mapping type, a set type, an iterator type, a context manager type, a module type, a metatype, a null type or a callable type. The scheme of the application is beneficial to reducing the memory occupation of type inference.
Owner:HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Target element positioning method and device based on interface structure perception

This application discloses a target element localization method and apparatus based on interface structure perception, relating to the fields of artificial intelligence and human-computer interaction. By fusing multiple inference results, it achieves collaborative optimization based on explicit structural inference and multi-source information, which not only significantly improves the localization accuracy under complex interface layouts and complex natural language commands, but also enhances the interpretability and generalization ability of the method, providing more accurate target element localization capabilities for graphical user interface agents. The method includes: in response to a target element localization request, acquiring interface input data and natural language commands; constructing an interface relationship graph based on the interface input data; performing multi-type inference on element objects in the interface relationship graph to obtain multi-type inference results for the element objects; selecting at least two inference results from the multi-type inference results for fusion, and determining the localization result of the target element based on the fusion result.
Owner:HANGZHOU INST FOR ADVANCED STUDY UCAS

A verification-based Python function argument type inference method

This invention discloses a verification-based method for inferring Python function parameter types. The method involves parsing the input Python source file to extract function and parameter information; constructing an initial set of candidate parameter types; identifying the behavioral characteristics of function parameters within the function body based on static analysis and filtering the candidate type set accordingly; adding type annotations to the function parameters and introducing a static type checker to verify the candidate types; and integrating the verified types to obtain the final parameter type inference result. By introducing a Python static type checker into the type inference process, this invention effectively improves the accuracy and comprehensiveness of function parameter type inference results. It can reliably infer Python function parameter types even in the absence of call point context or explicit type annotations, overcoming the inaccurate and incomplete inference results of existing methods, and has high engineering practical value.
Owner:NANJING UNIV