CN112099764B - Formal conversion rule-based avionics field requirement standardization method - Google Patents

Formal conversion rule-based avionics field requirement standardization method Download PDF

Info

Publication number
CN112099764B
CN112099764B CN202010811986.6A CN202010811986A CN112099764B CN 112099764 B CN112099764 B CN 112099764B CN 202010811986 A CN202010811986 A CN 202010811986A CN 112099764 B CN112099764 B CN 112099764B
Authority
CN
China
Prior art keywords
requirement
natural language
statement
normalized
sentence
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.)
Active
Application number
CN202010811986.6A
Other languages
Chinese (zh)
Other versions
CN112099764A (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.)
Nanjing University of Aeronautics and Astronautics
Original Assignee
Nanjing University of Aeronautics and Astronautics
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 Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN202010811986.6A priority Critical patent/CN112099764B/en
Publication of CN112099764A publication Critical patent/CN112099764A/en
Application granted granted Critical
Publication of CN112099764B publication Critical patent/CN112099764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking

Abstract

The invention discloses a normalization method of avionics field requirements based on formal conversion rules, which comprises the following steps: s1, defining sentence composition structure in natural language requirement sentence; s2, making a conversion rule from the original natural language requirement to the normalized requirement; s3, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by using the Stanford Parser lexical analyzer, extracting the sentence structure content required by the normalized requirement from the original natural language requirement, storing the sentence structure content into a set, extracting the corresponding sentence structure content from the set, and outputting according to the conversion rule in the step S2 to obtain the corresponding normalized requirement. The method successfully solves the problems of ambiguity, non-verifiability and the like in the traditional natural language requirement sentences, and carries out correct requirement analysis on the avionic electronic display control system.

Description

Formal conversion rule-based avionics field requirement standardization method
Technical Field
The invention relates to the technical field of natural language requirement standardization, in particular to a method for standardizing avionics field requirements based on formal conversion rules.
Background
The Stanford Parser is an open source syntax parsing tool based on Java implementation, and is mainly a syntax parsing method based on optimized probability rule set and lexical dependency. The probability model is used for selecting the analysis result with the highest possibility from a plurality of analysis results of the input sentence, and dictionary-dependent grammar analysis gives the interdependency among all the components in the sentence, namely, the central word analysis is added on the basis of a simple phrase structure tree. Through the two functional components, the syntactic function of each component in the sentence and the syntactic structure of the sentence can be obtained. This information will provide important reference information for the identification of relationships between entities.
With the continuous enhancement of the functions and the increasing demand of avionic display and control systems, the traditional natural language demand analysis presents a great challenge. The traditional natural language description requirements are difficult to avoid the problems of expression fuzziness, non-verifiability and the like, so that the requirements of requirements analysts, development programmers and specific users have different understandings on requirements documents, the developed systems are inconsistent with the systems expressed by the users, a large number of errors exist, and the engineering cost is increased. How to provide a more applicable natural language requirement standardization processing method becomes a problem which needs to be solved urgently.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a normalization method of avionics field requirements based on formal conversion rules, which outputs a syntax tree of an original natural language requirement statement through Stanford Parser, then completes the conversion of the original natural language requirements by traversing the syntax tree and utilizing the rules, successfully solves the problems of ambiguity, non-verifiability and the like in the traditional natural language requirement statement, and carries out correct requirement analysis on an avionic electronic display control system.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for normalizing avionics field requirements based on formal transformation rules, the method comprising:
s1, defining sentence composition structure in natural language requirement sentence;
s2, making a conversion rule from the original natural language requirement to the normalized requirement;
s3, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by adopting a Stanford Parser lexical analyzer, extracting the sentence structure content required by the normalized requirement from the original natural language requirement, storing the sentence structure content into a set, extracting the corresponding sentence structure content from the set, and outputting according to the conversion rule in the step S2 to obtain the corresponding normalized requirement.
In order to optimize the technical scheme, the specific measures adopted further comprise:
further, in step S1, the sentence component elements in the natural language requirement sentence include a sentence form, a subject, a predicate, and an object;
the natural language requirement set is defined as R ═ { R ═ R1,r2,r3,……},riIs the ith natural language requirement statement; the corresponding normalized requirement set is defined as
Figure BDA0002631323960000011
friIs the ith natural languageA normalized requirement statement corresponding to the requirement statement, a ═ a1,a2,a3…, as subject set, B ═ B1,b2,b3… is a set of predicates, C ═ C1,c2,c3…. } is a set of objects; wherein the verb-of-episodic and verb-of-predicate in the natural language requirement sentence are considered as a whole.
Further, in step S2, a conversion rule from the original natural language requirement to the normalized requirement is formulated by using the ensemble theory and the cartesian product concept.
Further, in step S2, the making of the conversion rule from the original natural language requirement to the normalized requirement includes the following steps:
s21, judging the sentence form of the original natural language requirement, if the sentence form is a statement sentence form, turning to S22, and if the sentence form is a sentence form with conditions, turning to S23;
s22, obtaining a subject set A, a predicate set B and an object set C in the natural language requirement statement, and carrying out Cartesian product operation on the subject set A, the predicate set B and the object set C to obtain a corresponding normalized requirement statement set FR: if FR is AxB xC, ending the conversion process;
s23, normalizing each natural language requirement statement in the original natural language requirement by the conversion method in the step S22 to obtain a corresponding normalized requirement statement, and performing Cartesian product operation by combining the planning requirement statements obtained by splitting the original natural language requirement to obtain a planning requirement set FR of the whole original natural language requirement*,FR*=fr1×fr2×…。
Further, in step S3, the Stanford Parser lexical analyzer is used to obtain an abstract syntax tree corresponding to the original natural language requirement sentence, the sentence structure content required by the normalized requirement is extracted from the original natural language requirement and stored in the set, and then the corresponding sentence structure content is extracted from the set and output according to the conversion rule in step S2, so as to obtain the corresponding normalized requirement, which includes the following steps:
s31, judging the sentence form of the original natural language requirement, if the sentence form is a statement sentence form, turning to the step S32, if the sentence form is a conditional sentence form, turning to the step S33;
s32, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by adopting a Stanford Parser lexical analyzer, traversing the abstract syntax tree, independently refining the subject to a subject set, refining the predicate to a predicate set, and refining the object to an object set;
carrying out Cartesian product operation on elements in the subject or object set and elements in the predicate set, storing the elements by using a character string set, combining the elements in the subject or object set and the elements in the character string set, and outputting corresponding normalized requirements;
ending the flow;
s33, analyzing the condition sentence contained in the original natural language requirement:
(1) if the situation is composed of a normalized requirement statement and a natural language requirement statement: firstly, independently extracting the normalized requirement statements, and putting the normalized requirement statements into a normalized requirement statement set; traversing each natural language requirement statement, putting a traversal result into the normalized requirement statement set, re-taking out elements from the normalized requirement statement set according to corresponding situations, and performing normalized processing in combination to obtain a corresponding normalized requirement statement; finally, carrying out Cartesian product operation on all the normalized requirement statements and outputting the results;
(2) if it is a case consisting of multiple natural language requirement statements: taking out each natural language requirement statement, recombining according to the corresponding conversion rule to complete the standardization processing to obtain the corresponding standardization requirement statement, and finally carrying out Cartesian product operation on all the standardization requirement statements and outputting;
(3) if it is a case consisting of multiple normalized statements: traversing main statement branches in the original natural language requirement, taking leaf nodes of the main statement branches, putting the leaf nodes into a corresponding normalized requirement statement set, and outputting elements in the normalized requirement statement set again to obtain the corresponding normalized requirement.
Further, in step S32, the combination processing is preferentially performed for a set containing only one element.
The invention has the beneficial effects that:
the syntax tree of the original natural language requirement statement is output through the Stanford Parser, then the original natural language requirement conversion is completed through traversing the syntax tree and utilizing the rule, the problems of ambiguity, non-verifiability and the like in the traditional natural language requirement statement are successfully solved, and the accurate requirement analysis is carried out on the avionic display control system.
Drawings
FIG. 1 is an algorithmic schematic of the single subject, single predicate, multiple object case of the present invention.
FIG. 2 is an algorithmic schematic of the multiple subject, single predicate, single object case of the present invention.
FIG. 3 is an algorithmic schematic of the multiple subject, single predicate, multiple object case of the present invention.
FIG. 4 shows a conditional expression of (r) in the present invention1r2…rn,fr1fr2…frn) Algorithmic schematic of the scenario.
FIG. 5 shows a conditional expression of (r) in the present invention1r2…rn) Algorithmic schematic of the scenario.
FIG. 6 shows a conditional expression (fr) of the present invention1fr2…frn) Algorithmic schematic of the scenario.
FIG. 7 is a diagram of the parse tree corresponding to the original requirement statement of the present invention.
FIG. 8 is a diagram illustrating the conversion process of the natural language requirement into the normalized requirement according to the present invention.
FIG. 9 is a diagram of a domain concept library corresponding to the requirement statement structure.
FIG. 10 is a diagram of the display results of the requirement statement structure in the VRM modeling tool.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
It should be noted that the terms "upper", "lower", "left", "right", "front", "back", etc. used in the present invention are for clarity of description only, and are not intended to limit the scope of the present invention, and the relative relationship between the terms and the terms is not limited by the technical contents of the essential changes.
Detailed description of the preferred embodiment
With reference to fig. 8, the present invention provides a normalization method for avionics field requirements based on formal transformation rules, where the normalization method includes:
s1, defining the sentence composition structure in the natural language requirement sentence.
And S2, making a conversion rule from the original natural language requirement to the normalized requirement.
S3, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by adopting a Stanford Parser lexical analyzer, extracting the sentence structure content required by the normalized requirement from the original natural language requirement, storing the sentence structure content into a set, extracting the corresponding sentence structure content from the set, and outputting according to the conversion rule in the step S2 to obtain the corresponding normalized requirement.
The invention mainly solves the problems of ambiguity, non-verifiability and the like in natural language requirement sentences. To solve this problem, the present invention mainly includes two parts. Firstly, a conversion rule from an original natural language requirement to a normalized requirement is established. Secondly, the designed algorithm is utilized to operate an abstract syntax tree corresponding to the original requirement statement obtained by the Stanford Parser lexical analyzer, the statement structural content required by the standardized requirement is extracted from the original requirement statement and stored in a set, and then the statement structural content is extracted from the set and output according to the rule to obtain the standardized requirement statement.
The method comprises the following core steps:
step 1: defining sentence component elements in an original requirement sentence
Step 2: formulating conversion rules for different types of raw requirements
And step 3: making corresponding algorithm according to the syntax tree output by the Stanford Parser
Wherein each step is described in detail as follows:
step 1:
by collectively defining the components in the natural language requirement sentence, the components in the natural language requirement sentence are collectively defined as follows.
Definition 1: a natural language requirement statement.
The natural language requirement sentence is a language (such as Chinese, English, Japanese, etc.) naturally evolving with culture to describe the requirement of the interest-related person for a project. Wherein a natural language requirement sentence is represented by a lowercase letter r.
Definition 2: natural language requirement
The natural language requirement is a set formed by natural language requirement sentences (r), and different natural number subscripts are used for distinguishing different natural language requirement sentences. Natural language requirements are represented by the capital letter R. For example: the natural language requirement set R is represented as: r ═ R1,r2,r3,……}。
Definition 3: subject of natural language requirement statement
The subject of the natural language requirement sentence (r) is a person or object to be expressed and described in the requirement sentence written in the natural language, and is the main body of the requirement statement. In the present invention, all subjects in the natural language requirement are represented by a lowercase letter a. Different natural number subscripts are used for distinguishing different subjects, and all subjects in the requirement form a set of subjects and are indicated by capital letters A. For example: the set of subjects A is represented as: a ═ a1,a2,a3…..}。
Definition 4: predicate of natural language requirement statement
In the natural language requirement statement (r), a predicate is used to describe an action performed by a subject or a state faced by the subject. The predicate may be acted upon by a verb, generally placed after the subject. Sometimes, an emotional verb and a predicate verb appear in the natural language requirement, and in the invention, the emotional verb and the predicate verb appearing in the natural language requirement are uniformly taken as a whole to be divided into partsAnalysis, while all predicates are represented using the lower case letter b. Different predicates are distinguished using different natural number indices, and all predicates in demand make up a set of predicates, denoted by the capital letter B. For example: the predicate set B is represented as: b ═ B1,b2,b3…..}。
Definition 5: object of natural language requirement sentence
In natural language requirement statements (r), objects are the subject or recipient of an action, often behind transitive verbs or prepositions. Objects may be acted upon by nouns, pronouns, numerologies, nounced adjectives, ambiguities, vernouns, object clauses, and the like. In the present invention, all objects are represented by a lower case letter c. Different natural number indices are used for different objects, all objects in the requirement constituting a set of objects, denoted by the capital letter C. For example: object set C is represented as: c ═ C1,c2,c3…..}。
Definition 6: normalized natural language requirement statement and normalized natural language requirement
The normalized demand statement is a demand statement with a complete single subject, single predicate and single object. In the present invention, fr is used. Different natural number subscripts are used for distinguishing different normalization requirement sentences (FR), and a set formed by all normalization requirement sentences is a normalization requirement of a system and is indicated by FR. In this context, the normalization requirements are defined as follows:
Figure BDA0002631323960000051
step 2: a series of conversion rules are established by using the theory of set and Cartesian product in discrete mathematics. The conversion rule from natural language requirement to normalized requirement is as follows;
(1) the natural language requirement is a case where one subject, one predicate, and a plurality of objects in the form of a statement sentence
In this case, the natural language requirement sentence will be usedOne subject, one predicate and multiple objects to describe the requirements. In the present invention, the symbol (a) is used1,b1,c1c2…cn) To express the natural language requirement statement of this situation. For example, the set: a ═ a1},B={b1},C={c1,c2,c3And the conversion rule of the type is to perform Cartesian product operation on the set A, the set B and the set C to obtain a normalized requirement statement set FR of the natural language requirement statement of the situation. Namely:
FR=A×B×C={(a1,b1,c1),(a1,b1,c2),(a1,b1,c3)}。
(2) the natural language requirement is a case where a plurality of subjects, one predicate, and one object in the form of a statement sentence are required
This case expresses the case where multiple subjects, one predicate, and one object are used in a natural language requirement statement to describe a requirement. In the present invention, the symbol (a) is used1a2…an,b1,c1) To express this type of natural language requirement statement. For example, the set: a ═ a1,a2,a3},B={b1},C={c1And the conversion rule of the type is to perform Cartesian product operation on the set A, the set B and the set C to obtain a normalized requirement statement set FR of the natural language requirement statement of the situation. Namely:
FR=A×B×C={(a1,b1,c1),(a2,b1,c1),(a3,b1,c1)}。
(3) the statement sentence is composed of a plurality of subjects, a predicate, and a plurality of objects
In this case, multiple subjects, one predicate, and multiple objects will be used in the natural language requirement statement to describe the requirement. In the present invention, the symbol (a) is used1a2…an,b1,c1c2…cn) To express this type of natural language requirement statement. For example, the set: a ═ a1,a2},B={b1},C={c1,c2And the conversion rule is to perform Cartesian product operation on the set A, the set B and the set C to obtain the normalized requirement statement set FR of the natural language requirement statement in the situation. Namely:
FR=A×B×C={(a1,b1,c1),(a1,b1,c2),(a2,b1,c1),(a2,b1,c2)}。
(4) natural language requirements are situations consisting of normalized statements and natural requirement statements in the form of conditional statements
This situation means that only a part of the requirement statements in the conditional statement and the statement of the execution result after the condition is satisfied need to be normalized, and some other requirement statements already satisfy the condition of the normalized requirement statement. This situation is symbolically represented as: (r)1r2…rn,fr1fr2…frn). In this case, in a natural language requirement sentence for which normalization needs to be performed, normalization processing is performed using a certain requirement sentence pattern appearing in the above statement sentence. For example: the natural language requirement is (r)1Fr). Natural language requirement statement (r) to be normalized1) After normalization, a normalized requirement statement fr is obtained1. The other statement (fr) is a normalized requirement statement fr2. Then fr is removed1、fr2And performing Cartesian product operation to obtain a set FR of the normalized requirements of the whole statement. Namely:
FR=fr1×fr2
(5) natural language requirement is a condition statement form composed of a plurality of natural language requirement statements
In this case, both the conditional statement in the natural language requirement statement and the statement whose execution result is after the condition is satisfied need to be normalized. In the present invention, the symbol (r) is used1r2…rn) To illustrate this situation. At this time, the natural language requirement sentences are usually divided and then are respectively as aboveAnd carrying out standardized processing on a certain requirement statement mode appearing in the statement sentence. For example, a natural language requirement (r) consisting of two natural language requirement statements1r2) In the case of (1), only two natural language requirement sentences need to be normalized respectively, and then the normalized requirement fr obtained by the two sentences is obtained1、fr2Through the Cartesian product operation, the set FR of the normalization requirement of the whole statement can be obtained. Namely:
FR=fr1×fr2
(6) natural language requirements are situations in the form of conditional statements made up of multiple normalized requirement statements
In this case, neither the conditional sentence representing the natural language requirement nor the sentence representing the execution result after the condition is satisfied needs to be normalized. In the present invention, the symbol (fr) is used1fr2…frn) To illustrate this situation. At this time, the original natural language requirement sentence is usually split, and the normalized conversion can be completed by removing some connection words and associated words and then forming a normalized short sentence. For example: the natural language requirement statement is composed of two normalized requirement statements fr1、fr2The situation of composition. At this time, only need to unpack them to get the normalized requirement statement fr1And fr2And then, obtaining a set FR of the normalization requirements of the whole statement through Cartesian product operation. Namely:
FR=fr1×fr2
and step 3: and operating the syntax tree by using a designed algorithm to obtain a normalized requirement statement.
And carrying out mode judgment on the syntax analysis tree output by the Stanford Parser, judging which syntax rule the demand statement is suitable for, and compiling an algorithm according to the corresponding rule. The specific idea of carrying out algorithm design according to different requirement types is as follows;
(1) the natural language requirement is (a)1,b1,c1c2…cn) In the case of
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser requirement. Since the mode is the case of single subject, single predicate and multiple objects, when traversing the syntax tree, the subject and predicate in the requirement sentence are separately abstracted and put into the subject set and predicate set. Then, the part of the sentence object is traversed, and the traversal result is put into the object set. And finally, combining the subject and the predicate which are output in a set, re-outputting the subject and the predicate, and storing the subject and the predicate by using a character string variable. And combining the variable with different objects and outputting. The specific algorithm is shown in fig. 1.
(2) The natural language requirement is (a)1a2…an,b1,c1) In the case of
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser. Since the mode is the case of multi-subject single-predicate single-object, when traversing the syntax tree, the predicate and object in the requirement sentence are extracted separately and put into the set of predicate and object. Then, the part of the subject of the sentence is traversed, and the traversal result is put into the subject set. And finally, combining the object and the predicate which are output in a set, re-outputting the object and the predicate, and storing the object and the predicate by using a character string variable. And combining the variable with different subjects and outputting the variable. The specific algorithm is shown in fig. 2.
(3) The natural language requirement is (a)1a2…an,b1,c1c2…cn) In the case of
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser. Since the mode is the case of multi-subject single-predicate multi-object, when traversing the syntax tree, the predicate in the requirement sentence is separately extracted and put into the predicate set. Then go through the part of subject and object of the sentence, put the result of traversal into the set of subject and object. And finally, combining the elements in the subject set with the predicates respectively, storing the elements in the subject set by using the character string set, taking out the objects in the object set, combining the objects with the elements in the character string set, and outputting the combination. The specific algorithm is shown in fig. 3.
(4) The natural language requirement has a conditional sentence of (r)1r2…rn,fr1fr2…frn) In the case of
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser. Since the mode is composed of the normalized statement and the natural requirement statement, when traversing the syntax tree, the normalized requirement statement in the requirement statement is extracted separately and put into the normalized requirement statement set. And traversing the part of the statement which needs to be normalized, and putting the traversal result into a set. Then, elements are re-taken from the set according to the corresponding situation and combined for normalization. And finally, combining the two normalized statements and outputting the combined statement. The specific algorithm is shown in fig. 4.
(5) The natural language requirement has a conditional sentence of (r)1r2…rn) Situation(s)
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser. Since the mode is a situation composed of a plurality of natural language requirement statements, when traversing the syntax tree, each natural language requirement statement is taken out firstly, and then recombined according to the corresponding natural language rule to complete normalization. And recombining and outputting a plurality of partially normalized requirement statements. The specific algorithm is shown in fig. 5.
(6) The natural language requirement has a conditional sentence of (fr)1fr2…frn) In the case of
Algorithm design: and traversing the syntax tree obtained by the Stanford Parser. Since the mode is a situation composed of multiple normalized statements, when traversing the syntax tree, only the main statement branches in the requirement statement need to be traversed, and the leaf nodes are taken and then put into the corresponding normalized requirement statement sets. Finally, the elements in the set are output again, and the normalized requirement statement of the requirement statement can be obtained. The specific algorithm is shown in fig. 6.
Detailed description of the invention
According to the steps of the invention as described hereinbefore. The steps of converting the original natural language requirement into the normalized requirement are as follows(ii) a The natural language requirement is (a)1,b1,c1c2…cn) In the case of
Step 1, acquiring an original natural language requirement statement. The step takes the natural language requirement of the avionic display control system as reference, and provides raw materials for converting the natural language requirement into the standardized requirement.
The EICAS display interface displays important engine parameters,stabilizer trim and position,flap and slat positions,APU parameters,environmental control parameters,remaining fuel and‘brake handle status information’。
And step 2, obtaining a syntax analysis tree corresponding to the original requirement statement by using a Stanford Parser lexical analyzer, as shown in FIG. 7. In the step, the sentence components of the demand sentence, namely the subject, the predicate and the object, are output by the lexical analyzer, so that a foundation is laid for judging the sentence mode in the third step.
And 3, judging sentence structure modes according to the syntactic parse tree:
from the syntax tree output, it can be seen that there are a total of three branches among the requirement. The first branch is a Noun Phrase (NP), and as can be seen from its leaf nodes, NP branches down to the subject of the demand sentence and has no ambiguous, ambiguous words. The second branch is a Verb Phrase (VP), under which sub-trees are generated, one is a Verb (VBZ) in the requirement sentence, and the other is an NP branch consisting of a plurality of NPs, which constitute the object of the requirement sentence, as can be seen from the leaf nodes of the branches. It can be seen that the requirement statement is in the form of a single subject, single predicate, multiple objects, i.e., (a, b, c)1c2…cn) The situation is described. And in the above requirement statement, the subject set a is represented as: a { "The EICAS display interface" }, a predicate set B is denoted as B { "displays" }, and an object set C is denoted as:
Figure BDA0002631323960000081
the normalized requirement converted by A × B × C is expressed as:
Figure BDA0002631323960000082
in this step, the mode to which the demand sentences belong is obtained by traversing the syntax analysis tree output by the Stanford Parser lexical analyzer in step 2, and multiple objects are respectively combined with the subject and the predicate according to the rule of the mode to which the demand sentences belong by applying the thought of cartesian product, so that the demand sentences in the final FR set all form the mode of single subject single predicate single object with the simplest sentence structure.
Ambiguity, ambiguity of reference, is a characteristic of natural language and is an inevitable problem for most natural language requirements. The interpretation and understanding of anything described in natural language requirements may be influenced by geographic, psychological and personal factors. The job of the demand analyst is to examine and repair ambiguities, inconsistencies, etc. in the demand specification document. However, due to lack of relevant professional background knowledge, analysts may ignore the defects of the natural language requirements when reading the description of the natural language requirements, such as problems of fuzzy expression, non-verifiability, and the like, so that the comprehension difference is caused, the requirements represent various interpretations and situations that the implicit requirements are difficult to recover are caused, project achievements are contrary to the requirements of users, and the engineering cost is increased. And each demand statement has a unique subject, predicate and object based on the rule of the Cartesian product idea, so that the ambiguity characteristic of natural language and the characteristic of fuzzy reference are effectively eliminated.
And 4, obtaining normalized requirement output according to the algorithm design of the corresponding situation:
①The EICAS display interface displays important engine parameters。
②The EICAS display interface displays stabilizer trim and position。
③The EICAS display interface displays flap and slat positions。
④The EICAS display interface displays APU parameters。
⑤The EICAS display interface displays environmental control parameters。
⑥The EICAS display interface displays remaining fuel。
⑦The EICAS display interface displays`brake handle status information'。
and 5, automatically acquiring a corresponding statement structure from the obtained normalized requirement to a domain concept library in a modeling tool, as shown in fig. 9.
In this step, the subject, predicate and object in the normalized requirement statement are extracted. Based on the SCR method, the avionic electronic display control system utilizes a VRM modeling tool to realize demand modeling. The VRM (variable relationship model) model is a demand model with both tabular and formalized semantics. The VRM model takes a formal method of a 'four-variable theoretical model' as a core, comprehensively considers the field characteristics in the modern civil aviation and electrical software requirements, and the content of the VRM model comprises conditions, events, modes, environmental interaction and other elements, thus being a formal requirement model modeling method which is practical in engineering. And the statement component after the requirement is normalized can provide variables for the field concept library in the VRM model. The subject part corresponds to the output variable or the intermediate variable in the domain concept library, the predicate part corresponds to the proper noun part in the domain concept library, and the object part is the value range of the output variable or the intermediate variable. The concrete display is shown as step six.
And 6, carrying out requirement modeling according to the content of the input domain concept library. The modeling display in the VRM modeling tool is shown in FIG. 10.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above-mentioned embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may be made by those skilled in the art without departing from the principle of the invention.

Claims (4)

1. A normalization method of avionics field requirements based on formal transformation rules is characterized by comprising the following steps:
s1, defining sentence composition structure in natural language requirement sentence;
s2, making a conversion rule from the original natural language requirement to the normalized requirement;
s3, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by adopting a Stanford Parser lexical analyzer, extracting the sentence structure content required by the normalized requirement from the original natural language requirement, storing the sentence structure content into a set, extracting the corresponding sentence structure content from the set, and outputting according to the conversion rule in the step S2 to obtain the corresponding normalized requirement;
in step S1, the sentence composition structure in the natural language requirement sentence includes a sentence form, a subject, a predicate, and an object of the sentence;
the natural language requirement set is defined as R ═ { R ═ R1,r2,r3,……},riIs the ith natural language requirement statement; the corresponding normalized requirement set is defined as
Figure FDA0003387751090000011
friIs the normalized requirement statement corresponding to the ith natural language requirement statement, A ═ a1,a2,a3... } is the subject set, B ═ B1,b2,b3... } is a set of predicates, C ═ C1,c2,c3... } is a set of objects; wherein, the emotional verb and the predicate verb in the natural language requirement sentence are regarded as a whole;
in step S2, the step of formulating the conversion rule from the original natural language requirement to the normalized requirement includes the following steps:
s21, judging the sentence form of the original natural language requirement, if the sentence form is a statement sentence form, turning to S22, and if the sentence form is a sentence form with conditions, turning to S23;
s22, obtaining a subject set A, a predicate set B and an object set C in the natural language requirement statement, and carrying out Cartesian product operation on the subject set A, the predicate set B and the object set C to obtain a corresponding normalized requirement statement set FR: if FR is AxB xC, ending the conversion process;
s23, normalizing each natural language requirement statement in the original natural language requirement by the conversion method in the step S22 to obtain a corresponding normalized requirement statement, and performing Cartesian product operation by combining the planning requirement statements obtained by splitting the original natural language requirement to obtain a planning requirement set FR of the whole original natural language requirement*,FR*=fr1×fr2×…。
2. The method for standardizing requirements in the avionics domain based on formal conversion rules according to claim 1, wherein in step S2, the conversion rules from original natural language requirements to standardized requirements are formulated using the aggregation theory and the cartesian product concept.
3. The method as claimed in claim 1, wherein in step S3, a Stanford Parser lexical analyzer is used to obtain an abstract syntax tree corresponding to an original natural language requirement statement, the syntax tree is traversed, statement structural content required by the normalized requirement is extracted and stored in a set, corresponding statement structural content is extracted from the set and output according to the conversion rule in step S2, and the process of obtaining the corresponding normalized requirement includes the following steps:
s31, judging the sentence form of the original natural language requirement, if the sentence form is a statement sentence form, turning to the step S32, if the sentence form is a conditional sentence form, turning to the step S33;
s32, obtaining an abstract syntax tree corresponding to the original natural language requirement sentence by adopting a Stanford Parser lexical analyzer, traversing the abstract syntax tree, independently refining the subject to a subject set, refining the predicate to a predicate set, and refining the object to an object set;
sequentially combining elements in one set with elements in the other set respectively and storing the elements by using a character string set, then taking out the elements in the last set to be combined with the elements in the character string set, and outputting corresponding normalized requirements;
ending the flow;
s33, analyzing the condition sentence contained in the original natural language requirement:
(1) if the situation is composed of a normalized requirement statement and a natural language requirement statement: firstly, independently extracting the normalized requirement statements, and putting the normalized requirement statements into a normalized requirement statement set; traversing each natural language requirement statement, putting a traversal result into the normalized requirement statement set, re-taking out elements from the normalized requirement statement set according to corresponding situations, and performing normalized processing in combination to obtain a corresponding normalized requirement statement; finally, carrying out Cartesian product operation on all the normalized requirement statements and outputting the results;
(2) if it is a case consisting of multiple natural language requirement statements: taking out each natural language requirement statement, carrying out normalization processing according to the corresponding conversion rule to obtain the corresponding normalized requirement statement, and finally carrying out Cartesian product operation on all the normalized requirement statements and outputting the normalized requirement statements;
(3) if it is a case consisting of multiple normalized statements: traversing statement branches in the original natural language requirement, taking leaf nodes of the statement branches, putting the leaf nodes into a corresponding normalized requirement statement set, and outputting elements in the normalized requirement statement set again to obtain the corresponding normalized requirement.
4. The method for standardizing avionics requirements based on formal conversion rules according to claim 3, wherein in step S32, a combination process is preferentially performed on a set containing only one element.
CN202010811986.6A 2020-08-13 2020-08-13 Formal conversion rule-based avionics field requirement standardization method Active CN112099764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010811986.6A CN112099764B (en) 2020-08-13 2020-08-13 Formal conversion rule-based avionics field requirement standardization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010811986.6A CN112099764B (en) 2020-08-13 2020-08-13 Formal conversion rule-based avionics field requirement standardization method

Publications (2)

Publication Number Publication Date
CN112099764A CN112099764A (en) 2020-12-18
CN112099764B true CN112099764B (en) 2022-03-15

Family

ID=73753621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010811986.6A Active CN112099764B (en) 2020-08-13 2020-08-13 Formal conversion rule-based avionics field requirement standardization method

Country Status (1)

Country Link
CN (1) CN112099764B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733517B (en) * 2021-01-12 2022-12-06 上海复佳信息科技有限公司 Method for checking requirement template conformity, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8489648B1 (en) * 2011-01-13 2013-07-16 The United States Of America As Represented By The Secretary Of The Navy System of systems and method for software component system design and optimization through testing
CN105893346A (en) * 2016-03-30 2016-08-24 齐鲁工业大学 Graph model word sense disambiguation method based on dependency syntax tree
CN110705316A (en) * 2019-09-29 2020-01-17 南京大学 Method and device for generating linear time sequence logic protocol of smart home
CN110989997A (en) * 2019-12-04 2020-04-10 电子科技大学 Formal verification method based on theorem verification
CN111382253A (en) * 2020-03-02 2020-07-07 苏州思必驰信息科技有限公司 Semantic parsing method and semantic parser

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108985073B (en) * 2018-07-18 2020-05-22 成都链安科技有限公司 Highly-automated intelligent contract formalized verification system and method
CN110502642B (en) * 2019-08-21 2024-01-23 武汉工程大学 Entity relation extraction method based on dependency syntactic analysis and rules

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8489648B1 (en) * 2011-01-13 2013-07-16 The United States Of America As Represented By The Secretary Of The Navy System of systems and method for software component system design and optimization through testing
CN105893346A (en) * 2016-03-30 2016-08-24 齐鲁工业大学 Graph model word sense disambiguation method based on dependency syntax tree
CN110705316A (en) * 2019-09-29 2020-01-17 南京大学 Method and device for generating linear time sequence logic protocol of smart home
CN110989997A (en) * 2019-12-04 2020-04-10 电子科技大学 Formal verification method based on theorem verification
CN111382253A (en) * 2020-03-02 2020-07-07 苏州思必驰信息科技有限公司 Semantic parsing method and semantic parser

Also Published As

Publication number Publication date
CN112099764A (en) 2020-12-18

Similar Documents

Publication Publication Date Title
US11222181B2 (en) System for knowledge acquisition
Bajwa et al. SBVR business rules generation from natural language specification
US8423952B2 (en) Method and an apparatus for automatic extraction of process goals
US20180260474A1 (en) Methods for extracting and assessing information from literature documents
Pandita et al. Inferring method specifications from natural language API descriptions
JP3009215B2 (en) Natural language processing method and natural language processing system
US8650022B2 (en) Method and an apparatus for automatic semantic annotation of a process model
US11768677B2 (en) Method and system for software application optimization using natural language-based queries
US8762131B1 (en) Systems and methods for managing a complex lexicon comprising multiword expressions and multiword inflection templates
Kashmira et al. Generating entity relationship diagram from requirement specification based on nlp
Vokác An efficient tool for recovering Design Patterns from C++ Code.
Keszocze et al. Chatbot-based assertion generation from natural language specifications
Song et al. Methodologies for semi-automated conceptual data modeling from requirements
CN113609838A (en) Document information extraction and mapping method and system
CN112099764B (en) Formal conversion rule-based avionics field requirement standardization method
US11544468B2 (en) Document text extraction to field-specific computer executable operations
Bajwa et al. Automated generation of OCL constraints: NL based approach vs pattern based approach
Bais et al. A model of a generic natural language interface for querying database
Freitas et al. Representing texts as contextualized entity-centric linked data graphs
Ashfaq et al. Natural language ambiguity resolution by intelligent semantic annotation of software requirements
Kovalev et al. Methods for identification of objects of development of cross-platform on-board software for communication and navigation satellites
Choi TPEMatcher: A tool for searching in parsed text corpora
Rajbhoj et al. DocToModel: Automated Authoring of Models from Diverse Requirements Specification Documents
Haj et al. Automated generation of terminological dictionary from textual business rules
Bajwa et al. OCL usability: a major challenge in adopting UML

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