CN114356294A - Instance generation method and system based on FQLTL language - Google Patents

Instance generation method and system based on FQLTL language Download PDF

Info

Publication number
CN114356294A
CN114356294A CN202111570950.4A CN202111570950A CN114356294A CN 114356294 A CN114356294 A CN 114356294A CN 202111570950 A CN202111570950 A CN 202111570950A CN 114356294 A CN114356294 A CN 114356294A
Authority
CN
China
Prior art keywords
formula
function
result
logic
fqltl
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111570950.4A
Other languages
Chinese (zh)
Other versions
CN114356294B (en
Inventor
陈羽
李建文
张小禹
蒲戈光
王燕芩
李卫娟
张程
魏民
朱迎春
张铭瑶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Industrial Control Safety Innovation Technology Co ltd
Casco Signal Ltd
East China Normal University
Original Assignee
Shanghai Industrial Control Safety Innovation Technology Co ltd
Casco Signal Ltd
East China Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Industrial Control Safety Innovation Technology Co ltd, Casco Signal Ltd, East China Normal University filed Critical Shanghai Industrial Control Safety Innovation Technology Co ltd
Priority to CN202111570950.4A priority Critical patent/CN114356294B/en
Publication of CN114356294A publication Critical patent/CN114356294A/en
Application granted granted Critical
Publication of CN114356294B publication Critical patent/CN114356294B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses an example generation method based on FQLTL, which comprises the steps of acquiring configuration information such as system equipment sets, equipment properties, equipment relationships and the like, performing logic calculation by traversing a syntax tree of a formula, judging whether each object/object set meets a range defined in the formula, filtering out sets of truth/false from a finally obtained logic operation result, and leaving equipment sets which really need to be verified, namely equipment sets with uncertain states, without performing next verification on the sets. The method comprises the following steps: carrying out grammar analysis on the formula; pre-treating; traversing the syntax tree and carrying out satisfiability check; and outputting the satisfiability checking result. Since the verifier cannot perform property verification including the scope, the new formalization language specifies the scope of the set to be verified. Therefore, the invention solves the problem that the whole equipment set of the system is reduced to the real to-be-verified example in the verification project.

Description

Instance generation method and system based on FQLTL language
The patent application is subsidized by the national science foundation youth project (project number: 62002118) and the Pujiang talent planning project (project number: 20PJ1403500) of Shanghai city.
Technical Field
The invention belongs to the technical field of formal verification of software engineering, and relates to an instance generation method based on an FQLTL language.
Background
The formalization method is an important theoretical basis of computer science, and is based on strict mathematics and mechanization methods to model, reduce and verify the mathematics theory or the computing system, and solve and improve a series of problems in the aspects of mathematics or software security. In recent years, with the development of formal verification techniques and tools, formal methods have shown irreplaceable potential in dealing with software development complexity and improving software reliability, and are introduced into a variety of large-scale verification scenarios such as rail transit, autopilot, aerospace, and the like.
Model checking is an important method for formal verification. The main idea is to create an abstract model M of a finite automaton for the operation of a system or model, to be verifiedProperties of certificates create specification of formal language descriptions
Figure BDA0003423321930000011
Judging whether the model M can meet the requirements or not through automatic operation
Figure BDA0003423321930000012
Namely, it is
Figure BDA0003423321930000013
The specification herein is generally described using sequential logic such as LTL, CTL. Formally validating a system in an application in a real-world scenario often has many entities, and it is often necessary to describe such properties: a range of entities needs to satisfy a sequential logic.
FQLTL (quantified Linear Temporal Logic overlay firmware Domain) language: the syntax semantics comprises the existence and full-weight words of predicate logic, and also comprises sequential operators such as next, always and unitil in sequential logic; and two types of functions can be written in the language, one is a function for limiting the range, and the other is a function for representing the state of the entity. Such language may be used to describe a specification of a temporal property for an entity within a particular scope, and is suitable for describing properties that have both scope and temporal.
Disclosure of Invention
In order to solve the defects in the prior art, the invention aims to provide an example generation method based on FQLTL. According to an FQLTL language formula, analyzing the FQLTL language formula, eliminating quantifier words and limited range parts in the language, filtering out results of constant truth and constant false, and leaving uncertain results to obtain a plurality of examples to be verified.
The language describes the properties of a certain range of entities in a certain category, and the invention focuses on whether a specific entity meets the properties in verification; therefore, before verifying whether the property is satisfied, an operation of mapping the entity type to a specific instance is required, one property of one type of entity may obtain a plurality of instances to be verified of the entity, and some instances do not need to be verified; in the process of mapping the types to specific examples, namely, a satisfiability checking process is carried out on the language; and if the result is not satisfied, the result is instantiated and verified through a verifier.
The present invention provides a method for instantiating a language to an instance to be verified, corresponding to the dashed box portion as in fig. 1.
FIG. 2 depicts the architecture diagram of the system implementing the method of the present invention, and the core is three parts of a parser, a semantic interpreter and a function executor, which form the whole instantiation system.
The method mainly comprises the following steps:
step 1, carrying out grammar analysis on a formula:
inputting FQLTL formula, the syntax structure of FQLTL is as follows:
Formula::=T|⊥|p|f|~Formula|
Formula&Formula|Formula#Formula|Formula→Formula|
ALL object Formula|SOME object Formula|object=object|
PRE Formula|X Formula|Formula S Formula|Formula U Formula
the definition of the above syntax structure follows the rules of the bax paradigm BNF. The meaning of this is that the Formula (Formula) is defined recursively, which can consist of several cases:
1) the atomic T-P-F-T-P-T, p-T-P-F, p-F represents a function;
2) the logic of the formula, and the logic combination of &, ' # ' → ' between the formula and the formula;
3) quantifier, individual (object) and formula combination, wherein the quantifier comprises a full quantifier (ALL) and a presence quantifier (SOME);
4) an equation, defined here as an equation that can only be on an individual level;
5) a time sequence operator: PRE, X, S, U. Where PRE represents the previous cycle and X represents the next cycle; u denotes the Until operator and S denotes the Since operator.
Definition of the f function:
Figure BDA0003423321930000021
the parameters of the above definition function are also defined by the BNF rule, wherein the number indicates]The inner element occurs zero or more times. The meaning is that the function is composed of a function Name (Name), parameters and an FQLTL formula; the parameters are in small brackets, and the formula is in curly brackets; wherein the parameter may be an empty set
Figure BDA0003423321930000022
Or a set of parametric individuals (v), separated by commas. After the formula is read by the grammar parser in the system, the formula is parsed according to the grammar structure of the formula, and a corresponding grammar tree (shown in figure 3) is generated and transmitted to the semantic interpreter.
The building of the syntax tree is constructed by adopting a syntax compiler antlr, and comprises the following steps:
1) and defining the syntax rule of the antlr according to the FQLTL syntax structure. The rules after definition are as follows:
Figure BDA0003423321930000031
Figure BDA0003423321930000041
Figure BDA0003423321930000051
2) automatically generating corresponding analysis codes according to the grammar rules by using an antlr tool kit;
3) and calling the generated analysis code by the grammar analyzer to obtain a grammar tree.
Step 2, pretreatment:
the FQLTL formula comprises a relation function and a state function; before the satisfiability quality inspection, preprocessing the syntax tree generated in the step 1, namely marking a state function which needs to be identified and verified by a verifier in an FQLTL formula, replacing the state function with a variable which can be identified by the verifier, and marking a state function label for distinguishing from the relation function, so that the subsequent steps are only carried out aiming at the relation function.
Relational functions refer to those functions that define a range, which refers to the nature of the individuals in the formula and the relationship between the individuals, and state functions are all functions other than relational functions. The value of the relationship function is determined during the satisfiability check, while the state function needs to have its boolean value determined later by the verifier.
Replacing the state function with a variable which can be identified by the verifier through a data structure containing a function name-variable correspondence; in the data structure, each function name has a corresponding variable; the verifier verifies a boolean value of a variable.
The data structure is embodied in the form of a dictionary, the key of which is the function name, and the value of which is the variable value corresponding to the function name. The dictionary corresponding relation is obtained by reading an external input resource file. When the variable is replaced, the corresponding variable can be obtained only by reading the dictionary and searching the key to obtain the corresponding value.
Step 3, the semantic interpreter carries out satisfiability check:
the main body for carrying out satisfiability check in the semantic interpreter is a recursive algorithm, the core idea is to carry out recursion from a root node according to the obtained FQLTL formula syntax tree, carry out downward analysis layer by layer, carry out processing in different modes according to different classes of tree nodes and return results upwards step by step; when the returned result logical value is needed, the result instance is retained for subsequent verification.
During the traversal of the nodes of the grammar tree, the tree nodes have four categories which are respectively quantifier nodes, logic symbol nodes, function nodes and time sequence symbol nodes; and when the nodes of different classes are traversed, performing operation corresponding to the node classes.
In the present invention, the recursively processed return value is in the form of a binary, [ string s, number n ], where s is the returned string result and n is the logical return value, either-1 or 0 or 1. The character string result is used for keeping the last example needing to be verified, the logic return value is used for calculating the logic result of the formula in a recursive mode, and when the final logic result meets the requirement, the example of the character string result is kept.
When the logic is calculated, the invention adopts three-value logic to calculate. According to the classification of the functions in the above mentioned formulas, one formula contains a relation function with a limited range and a state function needing to be identified by a verifier, when a logic return value of one formula is calculated, the relation function has an explicit 0 or 1 return value, and the state function can determine the return value only in the verification process, so that under the condition of current unknown, the return value does not belong to 0 or 1. In the logic employed in the present invention, therefore, the logical return values are specified to be possible values of 0 (false), 1 (true), and-1 (indeterminate or unknown).
In the system to be inspected, the device refers to the generic term of a certain kind of object, i.e. the collection of all individual individuals of the same kind; an object refers to a single individual, i.e., an instance of a device, often identified by a device number, with one and only one in a specified domain.
During recursion, according to the current node type, the algorithm has the following calculation methods:
method A1:
mode a1 is used when the current root node is a quantifier.
Quantifier refers to ALL (full quantifier) and SOME (presence quantifier) which are starting points in the formula to traverse different devices. When a quantifier node is encountered, traversing the equipment constrained by the quantifier, adding each object of the equipment into the current equipment set, and entering the next layer by the equipment set for calculation. If the logical return value in the return value is (-1), which is an indeterminate case, the object of the device set is certified to need further verification, and the result is retained at this time. The return value is true and false, and the result is not retained, and the return value is only returned to the upper layer as the return value of the recursion of the layer.
While the string result is preserved, ALL differs from SOME in that if the result is satisfied under the ALL node, ALL satisfied results are logically anded together, whereas if the result is satisfied under the SOME node, ALL satisfied results are logically ored together, and the generated formula is returned to the upper layer as a string.
The processing of ALL and SOME is also slightly different while the logical result is retained. If ALL meets the condition of not meeting the requirement, directly returning to 0, and if ALL meets 1, continuing to cycle the next value; SOME is a direct return 1 that encounters a satisfaction, and continues to loop to the next value when 0 is encountered.
Method A2:
the current root node is a logical symbol such as "&" # "→" to "(corresponding to logical and", "or", "inclusion", and "not", respectively), and a mode a2 is adopted.
And carrying out corresponding operation according to the meaning corresponding to the logic symbol by the algorithm. For the character string return value, the character string results of recursion on the left and right of "&" # "→" are added with a logic operator and returned as the result of the layer, and the character string results of the formula on the right of the "-" and the "-" operator are added as the result of the layer and returned. And directly carrying out corresponding logical operation on the logical return value and returning the obtained result to the previous layer.
Suppose SΦReturning results for strings of "phi", NΦIf the result is returned for the logical value of phi, the returned result of phi is [ -S ]Φ1,N~Φ1],“Φ12"the returned result is [ S ]Φ1&SΦ2,NΦ1&Φ2]。
The logic return calculation mode of the related ternary logic can be seen in the following tables 1 and 2, wherein the table 1 is a logic return rule of unit logic operation- ", and the table 2 is a logic return rule of binary operation" & "" # "" → ".
TABLE 1 NOT-ORTHOGONAL TRIVALUE LOGIC RETURN RULES
Figure BDA0003423321930000071
TABLE 2 binary ternary logic Return rule
Figure BDA0003423321930000072
Mode a 3:
the current root node is a function node, using mode a 3.
Whether it is a state function or a relation function, the string return result is null.
The state function has been tagged with a logical return value of-1; whereas a relational function requires an operation to perform a range calculation, the recursive algorithm calls the function to perform the operation and obtains the returned result as a logical return result. Function execution sends the relevant information to the function executor, and the function executor calls method B.
The method B comprises the following steps:
when different relation functions are encountered, the function executor performs corresponding calculation according to the function name and the parameters and returns the calculation to the semantic interpreter of the core.
The calculation of the executor is mainly to judge some properties and relations, and the properties and relations are inherent in the equipment and the equipment. The property is whether a device is represented by a certain attribute, and is generally represented by a single-parameter relationship function, such as whether a class a device will emit red light, whether a class B device is paired, and the like. The relationship, i.e. whether there is some relationship between some devices, is generally represented by a multi-parameter relationship function, such as whether a class a device is a child device of a class B device, whether a class a and a class B device are in the same working area, and so on.
Since these properties or relationships exist before the instance is generated, in the process of satisfiability check, it can be determined only by system-related configuration files, the contents of which include some attribute configuration documents, association information tables, etc., and the properties and relationships existing before the instance is generated are saved.
When the device set is input, the function executor can retrieve the relevant files of the system to match the properties and the relations according to different objects of the device set.
Method A4:
the current root node is a timing symbol, and method a4 is used.
For the cell timing operators PRE, X, the character string returns the reserved operator and the return of the non-operator part, and the logic returns only the part of the non-operator, namely the right part. The operator and the left and right character strings are also reserved by the binary time sequence operator and returned, and the logic returns the calculation result according to the corresponding logic rule.
Suppose SΦReturning results for strings of "phi", NΦIf the logical value of "Φ" returns a result, the return result of "PRE Φ" is [ PRE SΦ,NΦ],“Φ12"the returned result is [ S ]Φ1U SΦ2,NΦ1UΦ2]
The logic return calculation method of the relevant binary timing symbols U and S can be seen in table 3 below.
Table 3 logical Return rules for the U and S operators
Figure BDA0003423321930000081
Step 4, outputting the satisfiability checking result
Due to the recursive algorithm, the finally obtained logic formula is a whole logic formula, and the finally obtained logic formula needs to be split, and the logic symbol on the outermost layer is removed, so that a plurality of examples to be verified are obtained.
The constituent structure of the finally obtained logical formula is as follows (phi)1)&(Φ2)&…&(Φn) Where Φ is a logical sub-formula of similar structure;
the splitting method is bracket matching; separate phi is generated after splitting1、Φ2、…ΦnThus n instances.
The invention has the beneficial effects that:
1) the invention can automatically generate the example to be verified which can be identified by the verifier according to the input system related information and the property specification, so that the verification process can be smoothly carried out. And the instantiation efficiency and the result accuracy are high, and the support can be effectively provided for the verification process.
2) The invention can analyze the property of the FQLTL language and check the satisfiability through the logic process generated by the example, the FQLTL language is a new formalized language, and at present, the invention rarely adopts the perfection measure for checking the property language integrating the range and the time sequence, which is also the innovation point of the invention. FQLTL is an extension of the LTL language, and although there are currently many extensions and related efforts to LTL, the work of the present invention is the first to propose a truly viable satisfiability checking solution for quantifier linear sequential logic.
3) The invention is applied to the rail transit interlocking system at present, can carry out example generation on the safety requirement of the interlocking system, and provides support for ensuring the safety verification of the system. Similarly, the invention can be applied to a large-scale system with multiple devices and multiple relations and needing to maintain the safety, and provides guarantee for the safety verification process of the system.
Drawings
FIG. 1 illustrates the location of the method of the present invention throughout the formal verification process.
FIG. 2 shows the steps of the method of the present invention.
FIG. 3 is a syntax tree generated by a sample formula.
FIG. 4 shows the result of the syntax tree after preprocessing.
Detailed Description
The present invention will be described in further detail with reference to the following specific examples and the accompanying drawings. The procedures, conditions, experimental methods and the like for carrying out the present invention are general knowledge and common general knowledge in the art except for the contents specifically mentioned below, and the present invention is not particularly limited.
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings.
Take such a formula as an example:
Figure BDA0003423321930000091
in the formula, ALL and SOME are quantifiers in predicate logic, and devB and devA refer to a set of certain equipment; ALL devB means that this property is to be met for ALL class B devices, while SOME devA means that it needs to be met only for class A devices of the current class B device zone. in _ area (devA, devB) is a relation function, which is used to determine whether the entities of devA and devB of the incoming function are in the same area, and Released (devB) and Released (devA) are state functions, which is a determination of whether the entities of devA and devB are released, and this determination cannot be made in the process of instance generation, so it is transmitted to the verifier.
Therefore, the specific meaning of this formula is: for all class B devices, if it releases resources, the class a device in the area where it is located also releases resources in the last cycle. An example generation step is shown next.
Step 1, parsing a formula to generate a syntax tree, wherein the syntax tree is shown in a figure 3;
and 2, replacing related variables, namely replacing the related variables, namely, because the state function is Released, replacing the Released (devB) and the Released (devA) on the graph, wherein the variable which can be identified by the verifier is the Released, and a part which is framed is replaced once according to the following figure 4.
That is, the formula at this time becomes:
Figure BDA0003423321930000101
step 3, entering a replacement formula for analysis
1) Enter the first qExpr, for ALL, is a quantifier, using method a 1: traversing all objects of the B-type equipment, and entering the next layer of the syntax tree during each traversal;
2) go to the second qExpr, which is a quantifier for SOME, using method a 1: traversing all objects of the class-A equipment, and entering the next layer of the syntax tree during each traversal;
3) entry implication →, implication is a logical operator, using method a 2: the left side is in _ area (devA, devB) & devB-RELEASED, the right side is PRE devA-RELEASED, and the entry into the inclusion left side continues recursion;
4) enter and, and is the logical operator, using method a 2: left side is in _ area (devA, devB), right side is devB-RELEASED, enter left side calculation;
5) entering the relation function in _ area, using method a 3: calling a related system file, and calculating a logic return value of in _ area;
6) entering a state function devB-RELEASED, using method A3: directly returning to a null value, -1;
7) entering a state function devA-RELEASED, using method a 3: directly returning to a null value, -1;
8) the upward return calculation is started. Returning to the previous layer of AND, if the logical return is 0, then the entire AND is 0. Returning to the previous layer of implications →, since implication → left formula is 0, the whole implication → returns to 1, the whole formula is 1, and the result is not retained; if the logic return is 1, the right side of the AND is calculated. The right side is the state function, then the logical computed value of and at this time is 1& -1 ═ 1, and the return value is-1. Returning to the previous layer of implications →, the value of implications → 1, and the result is also-1, at which point the result string is retained.
That is, when in _ area (devA, devB) is satisfied, the resulting strings are retained, and if not, they are discarded, satisfying the desired result. Here, the calculation of the in _ area (devA, devB) relation function uses method B.
The method B comprises the following steps:
suppose there are 5 class B devices, objB1, objB2, objB3, objB4, objB5, and there are 4 class A devices, objA1, objA2, objA3, objA4, their area relationships are shown in Table 4 below
TABLE 4 relationship table
Figure BDA0003423321930000111
And providing the table as a resource file to a function executor, wherein the instantiation result is as follows:
(objB1-RELEASED→PRE objA1-RELEASED)&
(objB2-RELEASED→PRE objA2-RELEASED#PRE objA3-RELEASED)&
(objB3-RELEASED→PRE objA3-RELEASED#PRE objA4-RELEASED)&
(objB5-RELEASED→PRE objA4-RELEASED)
wherein due to objB2And objB3Corresponding to a plurality of class A devices, so the result is OR' ed; and objB4There is no corresponding class a device, the calculated logical value is 1, and the result is not retained.
The above example results in the replacement of all device types with specific objects with return values of-1, with quantifier removed from the formula. I.e. the satisfiability check has completed the checking of eternal true (return value 1) and eternal false (return value 0) in the loop and the results of eternal true and eternal false are discarded, leaving the uncertain object to be checked next.
Step 4, removing the outermost layer, and generating a formula to be checked
Namely, carrying out bracket splitting and character string operation to generate four instantiation results to be finally checked:
objB1-RELEASED→PRE objA1-RELEASED
objB2-RELEASED→PRE objA2-RELEASED#PRE objA3-RELEASED
objB3-RELEASED→PRE objA3-RELEASED#PRE objA4-RELEASED
objB5-RELEASED→PRE objA4-RELEASED
the protection of the present invention is not limited to the above embodiments. Variations and advantages that may occur to those skilled in the art may be incorporated into the invention without departing from the spirit and scope of the inventive concept, which is set forth in the following claims.

Claims (12)

1. An example generation method based on FQLTL is characterized by comprising the following steps:
step 1, carrying out grammar analysis on a formula:
inputting an FQLTL formula, after a grammar parser in the system reads the formula, parsing according to a grammar structure of the formula to generate a corresponding grammar tree and transmitting the grammar tree to the next step;
step 2, pretreatment:
the FQLTL formula comprises a relation function and a state function; before satisfiability check, preprocessing the syntax tree generated in the step 1, namely marking a state function which needs to be identified and verified by a verifier in an FQLTL formula, replacing the state function with a variable which can be identified by the verifier, and marking a state function label and a relation function for distinguishing so that the subsequent steps are only carried out on the relation function;
step 3, traversing the syntax tree, and checking the satisfiability:
the satisfiability check is carried out in a semantic interpreter, a main body is a recursive algorithm, recursion is carried out from a root node according to an obtained FQLTL formula syntax tree, downward analysis is carried out layer by layer, different modes of processing are carried out according to different classes of tree nodes, and a result is returned upwards step by step; when the returned result logic value is needed, the result instance is reserved for subsequent verification;
and 4, outputting a satisfiability checking result:
and splitting the finally obtained logic formula, and removing the outermost logic symbol to obtain a plurality of examples to be verified.
2. The method of claim 1, wherein in step 1, the syntax structure of the FQLTL formula is as follows:
Formula::=T|⊥|p|f|~Formula|
Formula&Formula|Formula#Formula|Formula→Formula|
ALL object Formula|SOME object Formula|object=object|
PRE Formula|X Formula|Formula S Formula|Formula U Formula,
the Formula is recursively defined and includes the following five parts:
1) the atomic T-P-F-T-P-T, p-T-P-F, p-F represents a function;
2) the logic of the formula, and the logic combination of &, ' # ' → ' between the formula and the formula;
3) quantifier, individual object and formula combination, wherein the quantifier comprises a full quantifier ALL and an existence quantifier SOME;
4) equations, here, the equations can only be individual level equations;
5) a time sequence operator: PRE, X, S, U; where PRE represents the previous cycle and X represents the next cycle; u represents a Until operator, and S represents a Since operator;
definition of the f function:
Figure FDA0003423321920000011
Figure FDA0003423321920000021
the function consists of a function Name, parameters and an FQLTL formula; the parameters are in the small brackets of the functional formula, and the formula is in the curly brackets of the functional formula; wherein the parameter may be an empty set
Figure FDA0003423321920000022
Or a set of parametric individuals v, separated by commas.
3. The method of claim 1, wherein in step 1, the building of the syntax tree comprises the steps of:
1) defining a grammar rule of a grammar compiler antlr according to the FQLTL grammar structure;
2) automatically generating corresponding analysis codes according to the grammar rules by using an antlr tool kit;
3) and calling the generated analysis code by the grammar analyzer to obtain a grammar tree.
4. The method of claim 1, wherein in step 2, the relationship function refers to a function defining a range, the range refers to the property of the individual in the formula and the relationship between the individual and the individual; the state function refers to all functions except the relation function; replacing the state function with a variable which can be identified by the verifier through a data structure containing a function name-variable correspondence; in the data structure, each function name has a corresponding variable; the verifier verifies a boolean value of a variable.
5. The method of claim 4, wherein the data structure is embodied in the form of a dictionary whose key is a function name and whose value is a variable value corresponding to the function name; the dictionary corresponding relation is obtained by reading an external input resource file; when the variable is replaced, the corresponding variable can be obtained only by reading the dictionary and searching the key to obtain the corresponding value.
6. The method of claim 1, wherein in step 3, during the traversal of the syntax tree nodes, the tree nodes have four categories, which are quantifier nodes, logical symbol nodes, function nodes, and timing symbol nodes; and when the nodes of different classes are traversed, performing operation corresponding to the node classes.
7. The method of claim 6, wherein the respective operations of the different nodes are:
1) when the current node is a quantifier node, traversing the equipment constrained by the quantifier, adding each object of the equipment into the current equipment set, and then entering the next layer by using the equipment set for calculation; if the logic return value in the return values is-1, namely the result is uncertain, the object of the equipment set is proved to need further verification, and the result is reserved at the moment; when the return value is 1 or 0, namely the result is respectively true or false, the result is not kept, and the return value is only used as the return value of the recursion of the layer and returned to the upper layer;
2) when the current node is a logic symbol node, corresponding calculation is carried out according to the meaning corresponding to the logic symbol, and a return result is obtained;
3) when the current node is a function node, if the current node is a state function, directly returning a result; if the relation function is the relation function, calling a function executor, performing corresponding calculation according to the function name and the parameter, and returning the calculation to a core semantic interpreter;
4) and when the current node is a time sequence symbol node, performing corresponding calculation according to the corresponding meaning of the time sequence symbol to obtain a returned result.
8. The method of claim 7, wherein when the current node is a function node, the function executor is computed by retrieving system-related files for matching to determine properties and relationships based on different objects of the device set; the properties and relationships are inherent properties between devices.
9. A method according to claim 4 or 8, characterized in that said property, i.e. whether a device has a certain property, is represented by a single-parameter relationship function; the relation, namely whether some associations exist between some devices or not, is represented by a multi-parameter relation function;
the system-related file content comprises an attribute configuration document and an associated information table, and the system-related file content stores the properties and the relationships existing before the generation of the instance.
10. The method of claim 7, wherein when a current node is a logical symbol node or a time series symbol node, the corresponding computed return results include a logical return result and a string return result; the calculation rule for the logic to return the result is a three-valued logic: the possible values of the logic return value are specified to be 0, 1 and-1, which respectively represent false, true, uncertain or unknown; and the character string returning result is that the corresponding character string splicing operation is carried out according to different symbols.
11. The method of claim 1, wherein in step 4, the constituent structure of the finally obtained logical formula is configured as (Φ)1)&(Φ2)&…&(Φn) Wherein each phi is a logical sub-formula with a similar structure;
the splitting method is bracket matching; separate phi is generated after splitting1、Φ2、…ΦnThus n instances.
12. A system for implementing the method according to any of claims 1-11, comprising a parser, a semantic interpreter and a function executor.
CN202111570950.4A 2021-12-21 2021-12-21 FQLTL language-based instance generation method and system Active CN114356294B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111570950.4A CN114356294B (en) 2021-12-21 2021-12-21 FQLTL language-based instance generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111570950.4A CN114356294B (en) 2021-12-21 2021-12-21 FQLTL language-based instance generation method and system

Publications (2)

Publication Number Publication Date
CN114356294A true CN114356294A (en) 2022-04-15
CN114356294B CN114356294B (en) 2023-07-14

Family

ID=81100835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111570950.4A Active CN114356294B (en) 2021-12-21 2021-12-21 FQLTL language-based instance generation method and system

Country Status (1)

Country Link
CN (1) CN114356294B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037492A1 (en) * 2000-03-16 2001-11-01 Holzmann Gerard J. Method and apparatus for automatically extracting verification models
US20100058256A1 (en) * 2008-09-02 2010-03-04 International Business Machines Corporation Co-optimization of embedded systems utilizing symbolic execution
CN106708595A (en) * 2016-12-30 2017-05-24 北京航空航天大学 Program statement formalization transformation method and device
CN110532166A (en) * 2019-07-05 2019-12-03 华东师范大学 A kind of state machine model timing Property Verification system based on model conversion
CN110532167A (en) * 2019-07-05 2019-12-03 华东师范大学 A kind of state machine model timing property verification method based on model conversion
CN112667215A (en) * 2020-12-11 2021-04-16 中山大学 Automatic repairing method for formalized requirement specification

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037492A1 (en) * 2000-03-16 2001-11-01 Holzmann Gerard J. Method and apparatus for automatically extracting verification models
US20100058256A1 (en) * 2008-09-02 2010-03-04 International Business Machines Corporation Co-optimization of embedded systems utilizing symbolic execution
CN106708595A (en) * 2016-12-30 2017-05-24 北京航空航天大学 Program statement formalization transformation method and device
CN110532166A (en) * 2019-07-05 2019-12-03 华东师范大学 A kind of state machine model timing Property Verification system based on model conversion
CN110532167A (en) * 2019-07-05 2019-12-03 华东师范大学 A kind of state machine model timing property verification method based on model conversion
CN112667215A (en) * 2020-12-11 2021-04-16 中山大学 Automatic repairing method for formalized requirement specification

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
DENIS KUPERBERG等: "On Finite Domains in First-Order Linear Temporal Logic", AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS, pages 211 *
JIANWEN LI等: "SAT-based explicit LTLf satisfiability checking", ARTIFICIAL INTELLIGENCE, vol. 289, pages 1 - 19 *
MD. IMRAN ALAM等: "A deductive reasoning approach for database applications using verification conditions", JOURNAL OF SYSTEMS AND SOFTWARE, vol. 175, pages 1 - 26 *
YU CHEN等: "Finite Quantified Linear Temporal Logic and Its Satisfiability Checking", ARTIFICIAL INTELLIGENCE LOGIC AND APPLICATIONS, pages 3 *
李建文: "线性时态逻辑中若干基础问题的研究", 中国博士学位论文全文数据库 信息科技辑, no. 10, pages 138 - 4 *
蒋凡 等: "基于反馈的可信网络软件验证与测试集成框架研究", 中国科学技术大学学报, vol. 40, no. 02, pages 197 - 202 *
陈云云: "线性时序逻辑公式的可监控性量化和优化算法研究", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 7, pages 138 - 124 *

Also Published As

Publication number Publication date
CN114356294B (en) 2023-07-14

Similar Documents

Publication Publication Date Title
US11221832B2 (en) Pruning engine
CN108446540B (en) Program code plagiarism type detection method and system based on source code multi-label graph neural network
US20100083215A1 (en) Method and an apparatus for automatic extraction of process goals
Libkin et al. Querying graph databases with XPath
US7853549B2 (en) Method for rule compliance situation checking and related checking system
US9122540B2 (en) Transformation of computer programs and eliminating errors
US20180075161A1 (en) Extensible automatic query language generator for semantic data
EP2795481A1 (en) Detecting cases with conflicting rules
CN114547619B (en) Vulnerability restoration system and restoration method based on tree
WO2024027279A1 (en) Code completion method and apparatus, and device
Dong et al. A combined approach to checking web ontologies
CN112883202A (en) Knowledge graph-based multi-component modeling method and system
CN115292347A (en) Active SQL algorithm performance checking device and method based on rules
CN114356294B (en) FQLTL language-based instance generation method and system
Ferrarotti et al. The polylog-time hierarchy captured by restricted second-order logic
Yusuf et al. An automatic approach to measure and visualize coupling in object-oriented programs
CN115374258A (en) Knowledge base query method and system combining semantic understanding with question template
CN112698836B (en) Code quality attribute judgment method for complex user comments
US11983640B2 (en) Generating question templates in a knowledge-graph based question and answer system
CN116502140B (en) Encryption algorithm identification method and device based on similarity of control flow graphs
Serafini et al. Matching hierarchical classifications with attributes
Ma et al. A Semi-Automatic Semantic Consistency-Checking Method for Learning Ontology from Relational Database. Information 2021, 12, 188
Jahnke et al. The varlet analyst: employing imperfect knowledge in database reverse engineering tools
Dovier et al. Model-checking based data retrieval
CN115373738A (en) Algorithm blood margin management method and device based on feature fusion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant