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

13 results about "Context-free grammar" patented technology

In formal language theory, a context-free grammar (CFG) is a certain type of formal grammar: a set of production rules that describe all possible strings in a given formal language. Production rules are simple replacements. For example, the rule A → α replaces A with α. There can be multiple replacement rules for any given value. For example, A → α A → β means that A can be replaced with either α or β.

ANTLR4-based multi-manufacturer network equipment configuration analysis method and system

The invention discloses an ANTLR4-based multi-manufacturer network equipment configuration analysis method and system, and the method comprises the steps: carrying out the preprocessing of a configuration file; based on a machine learning algorithm of multi-dimensional feature analysis, automatic identification of configuration file manufacturer types is realized; based on the identification result of the manufacturer type, loading an ANTLR4 grammar parser corresponding to the manufacturer type; a lexical analyzer in ANTLR4 realizes lexical analysis on the configuration file through lexical rule definition, a Token classification system and an optimized analysis algorithm; a syntactic analyzer in ANTLR4 constructs an abstract syntax tree according to a lexical analysis result and a syntactic rule defined based on a context-independent grammar; traversing the abstract syntax tree, and extracting key configuration information; and converting the specific configuration format of each manufacturer into a unified standard model. According to the method and the system, network equipment configuration files of different manufacturers can be automatically identified and analyzed, and key configuration information is extracted and converted into a unified model.
Owner:CHINA UNITECHS

Domain-Specific Shorthand for Generation of Data Visualizations based on Context Free Grammar

System, method and interface for generating data visualizations are provided. The system receives a user input to specify a natural language command directed to a data source. The system also generates a prompt for generating a data visualization based on relevant data fields and data values, rules that characterize the data visualization, and a context free grammar. The system also prompts a trained large language model using the prompt to generate a structured document following a domain-specific schema based on a shorthand notation. The system also uses a parser that uses the context free grammar to map the structured document to a visual specification. The visual specification specifies the data source, visual variables, and data fields from the data source. The system also generates and displaying a data visualization based on the visual specification, including displaying visual marks representing data, retrieved from the data source, for the data fields.
Owner:SALESFORCE INC

Intelligent constrained decoding

A system provides a language model that utilizes an optimized parser and operates at the byte- level in a context free grammar (CFG) and a tokenizer vocabulary. The CFG is constrained and automatically transformed to a byte-level grammar. A prediction mechanism is used to predict the allowed sequences of bytes that can appear after a given prefix. In some instances, only the next token is constrained so that candidates for the next token can be intersected with tokens in the tokenizer vocabulary. To achieve this, lattice parsing is performed using a finite state automaton (FSA) that is generated and then minimized.
Owner:SCALED COGNITION INC

Induced and dynamic grammar generation

The present technology, roughly described, generates grammars, such as context free grammars, dynamically and by induction, that can specify constraints for a decoding system. The grammar can be created to support an automated agent involved in an interaction (e.g., a conversation) with a client. In some instances, grammars can be generated dynamically based on copying portions of an interaction history and based on business logic rules. Grammars can also be induced automatically from API specifications and collections of strings. The newly generated context free grammars can be used by a language model to perform constrained decoding.
Owner:SCALED COGNITION INC

Method, system and equipment for solving context-independent grammar reachability problem between program processes and storage medium

The invention relates to the technical field of program analysis, in particular to a method, a system and equipment for solving a context-independent grammar accessibility problem between program processes and a storage medium. The method comprises the following steps: constructing a hypergraph corresponding to a to-be-solved program, and solving a fact propagation abstract between each pair of function call points and function call return points in the hypergraph to obtain a fact propagation abstract set; edges between function entrances and function calling points of all function bodies in the hypergraph are not reserved, and all fact propagation abstracts in a fact propagation abstract set are added to obtain an air conditioner stack layer; edges between function outlets of all function bodies in the hypergraph and function call return points are not reserved, all fact propagation abstracts in a fact propagation abstract set are added, and a non-air-conditioning stack layer is obtained; and connecting the air-conditioning stack function calling point with the non-air-conditioning stack function inlet to obtain a feasible path diagram. By the adoption of the scheme, accurate solving of the reachability problem of the context-independent grammar between the program processes can be achieved.
Owner:TSINGHUA UNIVERSITY

Multi-modal property prediction method based on syntax tree constraint molecular representation

The invention discloses a multi-modal property prediction method based on syntax tree constraint molecular representation. The method comprises the following steps: combining syntax tree representation based on context-independent grammar with a molecular property prediction task; setting a multi-modal feature fusion framework, and establishing strong relevance between features and prediction results; and the fusion features are finally input into the predictor network module to complete the prediction of the properties of the target molecules. According to the method, syntax tree representation based on context-independent grammar is combined with a molecular property prediction task, a hierarchical structure and a chemical grammar rule of coding molecules are displayed, it is ensured that prediction molecules meet SMILES grammar specifications, and the problem that grammar constraints of a traditional sequence model are missing is fundamentally solved.
Owner:NANTONG UNIV

Heterogeneous migration method for multiple databases

The invention discloses a heterogeneous migration method for multiple databases, which comprises the following steps of: converting an SQL (Structured Query Language) script of a source database into an operable data structure through the combination of regular expression preprocessing and context-independent grammar analysis; obtaining a migration sequence according to the operable data structure; generating a code according to the migration sequence; and migrating the source database to the target database according to the generated code. According to the method, the database heterogeneous migration accuracy is remarkably improved.
Owner:NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP

A method for optimizing instruction scheduling of a just-in-time compiler, a storage medium and an apparatus

The application discloses a kind of based on the instruction scheduling optimization method of Bisheng compiler of Peng platform, storage medium, equipment and computer program product, comprising: obtaining the source program to be scheduled by Bisheng compiler on Peng platform, whether source program is legal using context-independent grammar judgment;The power consumption required for scheduling illegal source program is calculated and sorted, and the sub-functions in the illegal source program are rearranged by dependency graph construction algorithm in turn to the illegal source program sorted from small to large;Illegal source program in sub-function is modified by log analysis method in turn to the illegal source program sorted from large to small;Illegal source program is handled using the above two methods from two ends to middle, and then whether the source program is legal after processing is judged;If still illegal, exchange two kinds of methods to handle illegal source program, judge whether the source program is legal again, if legal, carry out instruction scheduling by Bisheng compiler;Otherwise, mark the illegal source program, and alarm.
Owner:CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD

A method for nucleic acid sequence generation based on reinforcement learning and context-free grammar

The present invention discloses a method for generating nucleic acid sequences based on reinforcement learning and context-free grammar. The structure of the nucleic acid sequence is described by a context-free grammar tree. An intelligent agent uses a neural network based on a self-attention mechanism to encode and process the grammar tree of the nucleic acid sequence, selects non-terminal symbols and production rules, and transmits them to the environment as actions. The environment updates the grammar tree of the nucleic acid sequence based on the actions of the intelligent agent and generates a new environment. A reward function evaluates the actions of the intelligent agent based on the current environmental information and returns a reward value to guide the next action of the intelligent agent. The above operation is repeated until the environment determines that the current nucleic acid sequence has been generated. This method can solve the problem of random libraries containing a large number of useless sequences in SELEX screening experiments.
Owner:HANGZHOU INSTITUTE OF MEDICAL SCIENCES CHINESE ACADEMY OF SCIENCES

Programming language processing method and device and electronic equipment

PendingCN120821476ATransformation of program codePushdown automatonProcessing
The invention provides a programming language processing method and device and electronic equipment. The method comprises the steps that a programming language is acquired; the programming language is obtained through conversion based on a visual node flow chart edited by a user; performing field detection and conversion on the programming language to obtain a target character string; the field corresponds to a grammar structure name in a predefined context-independent grammar rule; inputting the target character string into a preset push-down automaton, so that the push-down automaton checks whether the target character string accords with a context-independent grammar rule or not; the push-down automaton is obtained through conversion based on a context-independent grammar rule; and performing subsequent processing based on the verification result. A structured programming language is converted into a specific character string to be input, a push-down automaton obtained through context-independent grammar conversion is used for performing pre-operation verification, and the prior mode can solve the problem that large-granularity input is illegal.
Owner:NETEASE (HANGZHOU) NETWORK CO LTD

Data reachability analysis method and program analysis system and method

The invention provides a data reachability analysis method, which is used for program data flow path analysis, and comprises the following steps: S1, obtaining a to-be-analyzed program, and processing the to-be-analyzed program to obtain an original label graph corresponding to the to-be-analyzed program; s2, determining a context-independent grammar according to the path analysis task, and converting the context-independent grammar into a bracket matching grammar containing a terminator and a non-terminator and a regular grammar containing the terminator and the non-terminator generated by the bracket matching grammar according to a preset rule; s3, processing the original label graph by adopting a bracket matching grammar to obtain a new label graph; and S4, processing the new label graph by adopting a regular grammar to obtain a target label graph, and determining all data flow paths in the to-be-analyzed program on the basis of the target label graph. By decoupling the context-independent grammar, the solution complexity of data reachability analysis is reduced, the derivation of an independent edge in the solution process is avoided, and the solution efficiency is improved. And the execution time of program analysis is shortened.
Owner:INST OF COMPUTING TECH CHINESE ACAD OF SCI

A method for synthesizing and guiding SMT solver fuzz testing based on large language model generator

This invention discloses a fuzzy testing method for Satisfiability Modulo Theories (SMT) solvers based on large language model generator synthesis and skeleton guidance, belonging to the field of software testing technology. The method includes: extracting context-free grammars from documents using a large language model and synthesizing corresponding Boolean term generators; generating a small number of samples and parsing them using SMT solvers, collecting error information and feeding it back to the large language model for iterative self-correction until the generator outputs valid terms; randomly removing sub-formulas from seed formulas to extract the structural skeleton; calling the generator to generate new Boolean terms and filling them into the structural skeleton to synthesize new test formulas; inputting the test formulas into multiple SMT solvers for differential testing to detect solver defects. This invention requires only a one-time model interaction, significantly reducing runtime overhead while ensuring the grammatical validity of the test formulas, and can efficiently trigger deep defects in the SMT solvers.
Owner:NANJING UNIV

A sql injection sentence transformation method based on context-free grammar

The application discloses a SQL injection sentence transformation method based on context-free grammar. When network security attack and defense research is carried out, a large number of semantic equivalent transformations of SQL injection sentences need to be generated. The application is based on an improved context-free grammar and combined with a semantic matching method, can generate theoretically infinite equivalent replacements according to a single SQL injection sentence, and the semantic equivalence is that the functionality and maliciousness of the SQL injection sentence are retained. The application uses a semantic-based mode to match the generated entry, processes the SQL injection sentence in a more fine-grained manner, and avoids the damage of a regular matching method to the functionality of the SQL injection sentence.
Owner:ZHEJIANG UNIV