CN109558140A - A kind of consistency verification method of semantic of Software Design and Realization - Google Patents

A kind of consistency verification method of semantic of Software Design and Realization Download PDF

Info

Publication number
CN109558140A
CN109558140A CN201811427489.5A CN201811427489A CN109558140A CN 109558140 A CN109558140 A CN 109558140A CN 201811427489 A CN201811427489 A CN 201811427489A CN 109558140 A CN109558140 A CN 109558140A
Authority
CN
China
Prior art keywords
model
formal
consistency
demand
semantic
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.)
Pending
Application number
CN201811427489.5A
Other languages
Chinese (zh)
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 Aerospace Electronic Communication Equipment Research Institute
Original Assignee
Shanghai Aerospace Electronic Communication Equipment Research Institute
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 Aerospace Electronic Communication Equipment Research Institute filed Critical Shanghai Aerospace Electronic Communication Equipment Research Institute
Priority to CN201811427489.5A priority Critical patent/CN109558140A/en
Publication of CN109558140A publication Critical patent/CN109558140A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

A kind of consistency verification method of semantic of Software Design and Realization, comprising steps of being to be reorganized the information in design documentation to meet the demand model of Formal Verification demand by Formal Modeling language according to Formal Modeling is carried out with design documentation;It is to be reorganized the information in engineering code to meet the implementation model of Formal Verification demand by Formal Modeling language according to Formal Modeling is carried out with Project Realization;Formal Semantic consistency checking is carried out to demand model and implementation model, the consistency according to consistency checking result judgement Software Design and Realization.By carrying out Formal Modeling, then the method for carrying out refinement checking respectively to design documentation and engineering code, the consistency checking means between software design and realization are provided.It is to ensure with Strict Proof mathematically, confirms that software security provides strong available tool for tester.

Description

A kind of consistency verification method of semantic of Software Design and Realization
Technical field
The technical field for carrying out equivalence checking is realized the present invention relates to the algorithm model of software and code, and in particular to utilize Formal Modeling tool carries out Formal Modeling to software design and tests semantic equivalence between algorithm model and code realization Card method.
Background technique
In engineering field, there is a kind of embedded software to have extremely harsh requirement, such as large complicated machine to safety The control subsystem of tool system, once mistake, which occurs, often will cause equipment damage, casualties.Usually this kind of softwares are claimed Make safety-critical embedded software, safety, reliable sexual intercourse the success or failure of whole system task.
The test of safety-critical embedded software is usually tested in the method for manual review and dynamic test at this stage Card.Since control system is varied, different use environments or hardware environment can all lead to the variation of algorithm model, specific real Now also difference can be generated because of developing instrument the characteristics of, tester is caused to be difficult the consistency to software code and algorithm model It is verified.The selection of sample is also related with the experience of tester in dynamic test, lack a kind of theoretical method proving or Instruct the selection of test sample.For communication protocol, tester be difficult to carry out the continuous process of communications status simulation and Infer.
For the various state conversion process in parser control, tester needs a kind of method can be according to software Code and communication protocol refine various states, the transformational relation between summary state, to divide in mathematical theory The safety of analysis confirmation algorithm and software realization.
Summary of the invention
The purpose of the present invention is to provide a kind of semantic consistencies of Software Design and Realization based on Formal Modeling to test Card method, to solve the problems, such as that software design and code are realized inconsistent and introduce mistake in Project Realization and be difficult to confirm.
In order to solve the above-mentioned technical problem, the technical scheme is that providing a kind of software based on Formal Modeling Design and the consistency verification method of semantic realized, comprising the following steps:
It is according to carrying out Formal Modeling, by Formal Modeling language by the information weight in design documentation with design documentation New tissue is the demand model for meeting Formal Verification demand;
It is according to carrying out Formal Modeling, by Formal Modeling language by the information weight in engineering code with Project Realization New tissue is the implementation model for meeting Formal Verification demand;
Formal Semantic consistency checking is carried out to the demand model and implementation model, is sentenced according to consistency checking result Determine the consistency of Software Design and Realization.
In a kind of embodiment, described with design documentation is according to the specific steps for carrying out Formal Modeling are as follows:
Design documentation is decomposed, suitable modeling level is determined, extracts whole effective informations in document;
These effective informations are reorganized in the way of Formal Modeling, use form language restatement simultaneously models Form demand model;
According to the value of variable in model, the state space of model is divided into different state regions, it is automatic by domain These regions of machine tissue determine and about subtract domain of equal value, demand model is completely converted into formalization automatic machine.
In a kind of embodiment, the Project Realization refers to according to the design documentation, certain programmed tool is selected, with coding The resulting source code file that can be run or source code itself, and tissue and supporting paper.
In a kind of embodiment, described with Project Realization is according to the specific steps for carrying out Formal Modeling are as follows:
Project file is decomposed, suitable modeling level is determined, extracts whole effective informations in project file;
These effective informations are reorganized in the way of Formal Modeling, use form language restatement simultaneously models Form implementation model;
The state space of model is divided into different state regions, by these regions of Region automaton tissue, is determined simultaneously About subtract domain of equal value, implementation model is completely converted into formalization automatic machine.
In a kind of embodiment, demand model is respectively corresponded with implementation model and is converted to property automatic machine and behavior is automatic Machine;The specific steps of Formal Semantic consistency checking are carried out to the demand model and implementation model are as follows:
Compare demand model and whether property automatic machine corresponding to implementation model is consistent, and compares demand model and realization Whether the corresponding behavior automatic machine of model is consistent, to verify the consistency of software design requirement and Project Realization.
According to the consistency verification method of semantic of above-described embodiment, by carrying out shape respectively to design documentation and engineering code Formulaization modeling, then the method for carrying out refinement checking, provide the consistency checking means between software design and realization.With mathematics On Strict Proof be ensure, for tester confirmation software security provide strong available tool.
Detailed description of the invention
Fig. 1 is the consistency verification method of semantic flow chart of Software Design and Realization.
Specific embodiment
Below in conjunction with the drawings and specific embodiments to the Software Design and Realization proposed by the present invention based on Formal Modeling Consistency verification method of semantic be described in further details.
In embodiments of the present invention, the flow chart of the consistency verification method of semantic of the Software Design and Realization provided is as schemed Shown in 1, following steps are specifically included.
S1: being according to carrying out Formal Modeling, by Formal Modeling language by the letter in design documentation with design documentation It is the demand model for meeting Formal Verification demand that breath, which reorganizes,.
Design documentation refers to Demand Design or detailed design to a certain system or subsystem, generally describe a kind of algorithm or Control process.Algorithm design refers to that design documentation contains some to meet the particular procedure sequence of certain function design.
The object of Formal Modeling in this step is design documentation, and output is demand model, is contained in demand model All semantic included in design documentation, therefore, design documentation is restated as meeting Formal Verification requirement by this step Demand model.Formal Modeling therein, which refers to, utilizes the resource occupation of Formal Language Description system, system structure, calling The information such as relationship, timing and logic control, and form the process for meeting the mid-module of Formal Verification demand.
The specific steps of Formal Modeling in this step are as follows: decompose design documentation, determine suitable modeling level, extract Whole effective informations in document, effective information include but not limited to system composition, system subdivision mode, resource occupation, when Sequence and logic control, communication interface etc. describe the necessary information of a system or subsystem;The weight in the way of Formal Modeling Newly organize these effective informations, use form language restatement simultaneously models and forms demand model;By the state space of model It is divided into different state regions, by these regions of Region automaton tissue, determines and about subtracts domain of equal value, demand model is complete Be converted to formalization automatic machine.
S2: being according to carrying out Formal Modeling, by Formal Modeling language by the letter in engineering code with Project Realization It is the implementation model for meeting Formal Verification demand that breath, which reorganizes,.
Project Realization refers to according to design documentation, certain programmed tool is selected, to encode the resulting source generation that can be run Code file or source code itself, and tissue and supporting paper.
The object of Formal Modeling in this step is engineering code, and output is implementation model, is contained in implementation model All semantic included in engineering code, therefore, this step is according to specific Project Realization by all information weight in code Newly it is expressed as meeting the implementation model of Formal Verification requirement.
It should be noted that implementation model and demand model describe same function, but due to according to different, logic point Often there is larger difference in branch and resource occupation, therefore, mathematically show as state space with larger difference.
In this step is according to the specific steps for carrying out Formal Modeling with Project Realization are as follows: decomposes project file, really Fixed suitable modeling level, extracts whole effective informations in project file;This is reorganized in the way of Formal Modeling A little effective informations, use form language restatement and modeling form implementation model;Model state space is divided into difference State region determine and simultaneously about subtract domain of equal value, implementation model is completely converted into form by these regions of Region automaton tissue Change automatic machine.
S3: Formal Semantic consistency checking is carried out to demand model and implementation model, is sentenced according to consistency checking result Determine the consistency of Software Design and Realization.
By the semantic consistency between verifying demand model and implementation model, come determine design documentation and Project Realization it Between semantic consistency, to confirm that software security is reliable.
In step S1 and step S2, demand model further also respectively corresponds with implementation model to be converted to property automatic Machine and behavior automatic machine;Then in step S3, the specific of Formal Semantic consistency checking is carried out to demand model and implementation model Step are as follows: compare demand model and whether property automatic machine corresponding to implementation model is consistent, and compare demand model and realization Whether the corresponding behavior automatic machine of model is consistent, to verify the consistency of software design requirement and Project Realization.
It that is to say, refer to the behavior for describing system by executing demand model and implementation model with automatic machine and its should The property of satisfaction consistent with property automatic machine judges whether system meets wanting for specification by comparing behavior automatic machine is consistent It asks.Specifically, demand model and implementation model are loaded into improved Formal Verification tool, simulates execution with the mode of traversal The program execution path that demand model and implementation model are stated, until occurring not meeting or EP (end of program).Verify institute in model The semanteme for including, if not satisfied, providing ungratified path counter-example.Otherwise, that is, it can determine that model semantics are consistent, that is, demonstrate,prove a certain function The Project Realization and design documentation semantic congruence of energy.
The content of present invention is further explained below by way of example.As shown in Figure 1, the process of entire method includes three Stage, Requirements Modeling stage, Project Realization modelling phase and Formal Verification analysis phase.Requirements Modeling stage and Project Realization Stage, in the completed situation of Project Realization, two stages can carry out parallel without precedence requirement.Formal Verification analyzes rank Section is last to be carried out, by the step for can obtain consistency checking result between demand model and implementation model.If one Cause property verifies errorless, the then semanteme one being able to demonstrate that between the Project Realization of safety-critical embedded software and its design documentation It causes.If be not inconsistent during the consistency checking of model, illustrate that Project Realization deviates from the design of script.It needs at this time Unreasonable factor that may be present in specific aim modification, or investigation design is carried out to software according to the result of Formal Verification.
Use above specific case is illustrated the present invention, is merely used to help understand the present invention, not to limit The system present invention.For those skilled in the art, according to the thought of the present invention, can also make several simple It deduces, deform or replaces.

Claims (5)

1. a kind of consistency verification method of semantic of Software Design and Realization, which is characterized in that comprising steps of
It is according to carrying out Formal Modeling, by Formal Modeling language by the information in design documentation again group with design documentation It is woven to the demand model for meeting Formal Verification demand;
It is according to carrying out Formal Modeling, by Formal Modeling language by the information in engineering code again group with Project Realization It is woven to the implementation model for meeting Formal Verification demand;
Formal Semantic consistency checking is carried out to the demand model and implementation model, it is soft according to consistency checking result judgement Consistency part design and realized.
2. consistency verification method of semantic as described in claim 1, which is characterized in that described to be carried out with design documentation for foundation The specific steps of Formal Modeling are as follows:
Design documentation is decomposed, suitable modeling level is determined, extracts whole effective informations in document;
These effective informations are reorganized in the way of Formal Modeling, use form language restatement simultaneously models to be formed Demand model;
According to the variable-value in model, state space is divided into different state regions, by Region automaton tissue these Region determines and about subtracts domain of equal value, demand model is completely converted into formalization automatic machine.
3. consistency verification method of semantic as claimed in claim 2, which is characterized in that the Project Realization refers to according to Design documentation selects certain programmed tool, to encode the resulting source code file that can be run or source code itself, and tissue And supporting paper.
4. consistency verification method of semantic as claimed in claim 2, which is characterized in that described to be carried out with Project Realization for foundation The specific steps of Formal Modeling are as follows:
Project file is decomposed, suitable modeling level is determined, extracts whole effective informations in project file;
These effective informations are reorganized in the way of Formal Modeling, use form language restatement simultaneously models to be formed Implementation model;
The state space of model is divided into different state regions, by these regions of Region automaton tissue, determines and about subtracts Implementation model is completely converted into formalization automatic machine by domain of equal value.
5. consistency verification method of semantic as claimed in claim 4, which is characterized in that distinguish demand model and implementation model Corresponding conversion is property automatic machine and behavior automatic machine;Formal Semantic consistency is carried out to the demand model and implementation model The specific steps of verifying are as follows:
Compare demand model and whether property automatic machine corresponding to implementation model is consistent, and compares demand model and implementation model Whether corresponding behavior automatic machine is consistent, to verify the consistency of software design requirement and Project Realization.
CN201811427489.5A 2018-11-27 2018-11-27 A kind of consistency verification method of semantic of Software Design and Realization Pending CN109558140A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811427489.5A CN109558140A (en) 2018-11-27 2018-11-27 A kind of consistency verification method of semantic of Software Design and Realization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811427489.5A CN109558140A (en) 2018-11-27 2018-11-27 A kind of consistency verification method of semantic of Software Design and Realization

Publications (1)

Publication Number Publication Date
CN109558140A true CN109558140A (en) 2019-04-02

Family

ID=65867703

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811427489.5A Pending CN109558140A (en) 2018-11-27 2018-11-27 A kind of consistency verification method of semantic of Software Design and Realization

Country Status (1)

Country Link
CN (1) CN109558140A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338948A (en) * 2020-02-24 2020-06-26 华东师范大学 Formal verification system
CN111427565A (en) * 2020-02-24 2020-07-17 华东师范大学 Formal verification method
CN112596721A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Management method for safety subset of safety key software modeling language
CN115174143A (en) * 2022-05-30 2022-10-11 西南交通大学 Network space security credibility verification method based on security protocol

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266550A (en) * 2007-12-21 2008-09-17 北京大学 Malicious code detection method
CN101504687A (en) * 2009-03-16 2009-08-12 中国科学院计算技术研究所 Model abstract method and system in model detection
CN101872322A (en) * 2009-04-27 2010-10-27 武汉大学 Method for detecting software features on basis of system requirement model
CN102624476A (en) * 2012-01-10 2012-08-01 南京邮电大学 Wireless sensor network time synchronization testing method based on model checking
CN104216703A (en) * 2014-06-23 2014-12-17 武汉大学深圳研究院 Development method of embedded software system program
WO2018086711A1 (en) * 2016-11-14 2018-05-17 Siemens Aktiengesellschaft A method for composing an application using a plurality of distributed interaction patterns

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101266550A (en) * 2007-12-21 2008-09-17 北京大学 Malicious code detection method
CN101504687A (en) * 2009-03-16 2009-08-12 中国科学院计算技术研究所 Model abstract method and system in model detection
CN101872322A (en) * 2009-04-27 2010-10-27 武汉大学 Method for detecting software features on basis of system requirement model
CN102624476A (en) * 2012-01-10 2012-08-01 南京邮电大学 Wireless sensor network time synchronization testing method based on model checking
CN104216703A (en) * 2014-06-23 2014-12-17 武汉大学深圳研究院 Development method of embedded software system program
WO2018086711A1 (en) * 2016-11-14 2018-05-17 Siemens Aktiengesellschaft A method for composing an application using a plurality of distributed interaction patterns

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘伟: "《软件形式化方法概述》", 《HTTPS://WWW.CNBLOGS.COM/X_WUKONG/P/6864462.HTML》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111338948A (en) * 2020-02-24 2020-06-26 华东师范大学 Formal verification system
CN111427565A (en) * 2020-02-24 2020-07-17 华东师范大学 Formal verification method
CN111427565B (en) * 2020-02-24 2022-04-05 华东师范大学 Formal verification method
CN112596721A (en) * 2020-12-14 2021-04-02 中国航发控制系统研究所 Management method for safety subset of safety key software modeling language
CN112596721B (en) * 2020-12-14 2023-10-03 中国航发控制系统研究所 Management method for safety key software modeling language safety subset
CN115174143A (en) * 2022-05-30 2022-10-11 西南交通大学 Network space security credibility verification method based on security protocol
CN115174143B (en) * 2022-05-30 2024-01-26 西南交通大学 Network space security credibility verification method based on security protocol

Similar Documents

Publication Publication Date Title
CN109558140A (en) A kind of consistency verification method of semantic of Software Design and Realization
Oriat Jartege: a tool for random generation of unit tests for java classes
US8984496B2 (en) Extensible internal representation of systems with parallel and sequential implementations
Acharya et al. Bridge between black box and white box–gray box testing technique
CN108563572A (en) A kind of regression testing method, device and server
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN103885341B (en) Performance analysis system based on automotive performance simulator and method
Engels et al. Model-based verification and validation of properties
KR20090065742A (en) Apparatus and method for developing software
CN114077544A (en) Software testing method, device, equipment and medium
Heitmeyer Formal methods for specifying, validating, and verifying requirements.
CN111580409B (en) Fault simulation test method for real-time embedded system
US20050138602A1 (en) System and method for deriving a process-based specification
Arcaini et al. Automatic refinement of ASM abstract test cases
Rapos et al. Simevo: A toolset for simulink test evolution & maintenance
Karsai et al. On the correctness of model transformations in the development of embedded systems
Burnard et al. Verifying and validating automatically generated code
KR100501411B1 (en) Software modeling system by nonfunctional quality-factor and the method
Gibson et al. Achieving verifiable and high integrity instrumentation and control systems through complexity awareness and constrained design. final report
KR101601741B1 (en) Verification apparatus for verifying the identity of programs written in different languages
Smith et al. Testing, Verifying and Validating SAPHIRE Versions 6.0 and 7.0
Wang et al. Model-based simulation testing for embedded software
Mavridou et al. Bridging the Gap Between Requirements and Model Analysis: Evaluation on Ten Cyber-Physical Challenge Problems
Fantechi et al. Applications of Formal Methods, Modeling, and Testing Strategies for Safe Software Development
Schwarz et al. Reliable software development methodology for safety related applications: From simulation to reliable source code

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190402