CN109725890A - 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法 - Google Patents

复杂软件系统Event-B模型到时间自动机网络的转换工具及方法 Download PDF

Info

Publication number
CN109725890A
CN109725890A CN201811624203.2A CN201811624203A CN109725890A CN 109725890 A CN109725890 A CN 109725890A CN 201811624203 A CN201811624203 A CN 201811624203A CN 109725890 A CN109725890 A CN 109725890A
Authority
CN
China
Prior art keywords
model
event
networks
timed
meta
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
CN201811624203.2A
Other languages
English (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.)
Rocket Force University of Engineering of PLA
Original Assignee
Rocket Force University of Engineering of PLA
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 Rocket Force University of Engineering of PLA filed Critical Rocket Force University of Engineering of PLA
Priority to CN201811624203.2A priority Critical patent/CN109725890A/zh
Publication of CN109725890A publication Critical patent/CN109725890A/zh
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

本发明公开了一种复杂软件系统Event‑B模型到时间自动机网络的转换工具及方法。该工具包括Event‑B元模型、时间自动机网络元模型、EventB2NTA模型转换引擎和EventB2NTA模型转换配置模块。方法为:将Event‑B中buc格式的Context模型与bum格式的Machine模型,合并存储为xmi格式的Event‑B模型;将预处理后的xmi格式的Event‑B模型,转换为xmi格式的时间自动机网络模型;将xmi格式的时间自动机网络模型,存储为时间自动机网络工具UPPAAL能够识别的xml格式,然后根据用户需求添加相应的时间属性,完成建模。本发明能够集成到Eclipse平台上,且融合了Event‑B模型的逐步精化与时间自动机网络模型的时间特性显式刻画的优点。

Description

复杂软件系统Event-B模型到时间自动机网络的转换工具及 方法
技术领域
本发明涉及计算机软件工程技术领域,特别是一种复杂软件系统Event-B模型到时间自动机网络的转换工具及方法。
背景技术
在早期进行软件建模与设计,能够降低复杂软件系统,如复杂军事信息系统、信息物理融合系统CPS等的开发难度,提高系统开发效率。其中,Event-B模型是一种用于系统级建模和分析的形式化方法,其具有严格的数学基础,而且Event-B能够以“逐步精化”的方式建模复杂系统,建模人员可以从抽象的需求规格开始,逐步迭代引入更多的实现细节,最终完成系统的建模。由于具有逐步精化的特点,使用Event-B进行复杂软件系统建模能够显著降低系统的建模难度。
然而,Event-B模型缺乏对软件系统时间特性的显式刻画与分析,很难用于时间攸关(time-critical)领域的建模。而时间自动机网络(Network of Timed Automata,简称NTA)模型是对有限自动机的时间特性扩展,其在有限自动机模型基础上添加了对连续时间变量的刻画,非常适用于系统实时特性的显式刻画与分析。目前尚未有报道将复杂软件系统的Event-B模型转换为时间自动机网络,因此无法汲取Event-B模型逐步精化与时间自动机网络时间特性显式刻画的优点。
发明内容
本发明的目的在于提供一种能够实现复杂软件系统Event-B模型到时间自动机网络模型的自动转换工具及方法。
实现本发明目的的技术解决方案为:一种复杂软件系统Event-B模型到时间自动机网络的转换工具,其特征在于,包括Event-B元模型、时间自动机网络元模型、EventB2NTA模型转换引擎和EventB2NTA模型转换配置模块:
所述Event-B元模型,用于定义和规范Event-B模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述时间自动机网络元模型,用于定义和规范时间自动机网络模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述EventB2NTA模型转换引擎,用于实现Event-B模型元素到时间自动机网络模型元素的逐一转换,EventB2NTA模型转换引擎符合ATL语言的语法和语义规范,且基于Event-B元模型和时间自动机网络元模型而构建;
所述EventB2NTA模型转换配置模块,用于实现Event-B模型到时间自动机网络模型的转换,EventB2NTA模型转换配置模块以Event-B元模型、时间自动机网络元模型、EventB2NTA模型转换引擎和xmi格式的Event-B模型作为输入,通过Debug调试生成xmi格式的时间自动机网络模型。
作为一种具体示例,所述Event-B元模型包括:
集合carrierSet、常量constant、公理axiom、变量variable、不变式invariant、事件event、卫式guard和动作action,其中,公理axiom用于描述集合carrierSet与常量constant之间的关系。
作为一种具体示例,所述时间自动机网络元模型包括:
系统system、常量constant、变量variable、变迁transition、卫式guard、赋值assignment和时钟变量clock。
作为一种具体示例,所述EventB2NTA模型转换引擎包括六条基于ATL语言的Event-B模型到时间自动机网络模型的转换规则:
carrierSet2system、axiom2constant、invariant2variable、event2transition、guard2guard、action2assignment。
一种复杂软件系统Event-B模型到时间自动机网络的转换方法,包括以下步骤:
步骤1,预处理复杂软件系统的Event-B模型:将Event-B中buc格式的Context模型与bum格式的Machine模型,合并存储为xmi格式的Event-B模型;
步骤2,将复杂软件系统的Event-B模型转换为时间自动机网络模型:利用构造的模型转换工具EventB2NTA,将预处理后的xmi格式的Event-B模型,转换为xmi格式的时间自动机网络模型;
步骤3,将转换后的时间自动机网络模型进行后处理:将xmi格式的时间自动机网络模型,存储为时间自动机网络工具UPPAAL能够识别的xml格式,然后根据用户需求添加相应的时间属性,完成建模。
本发明与现有技术相比,其显著优点在于:能够集成到Eclipse平台上,且融合了Event-B模型逐步精化与时间自动机网络模型时间特性显式刻画的优点。
附图说明
图1为本发明复杂软件系统Event-B模型到时间自动机网络的转换工具的结构示意图。
图2为本发明中复杂软件系统Event-B和时间自动机网络的元模型即EVENTB.ecore和NTA.ecore的结构示意图。
图3为本发明中复杂软件系统EventB2NTA模型转换引擎的结构示意图。
图4为本发明中复杂软件系统EventB2NTA模型转换配置模块的结构示意图。
图5为本发明复杂软件系统Event-B模型到时间自动机网络模型的转换方法的流程示意图,其中,(a)为待转换的Event-B模型片段,(b)为转换后的时间自动机网络模型片段;
具体实施方式
本发明复杂软件系统Event-B模型到时间自动机网络的转换工具,包括Event-B元模型a、时间自动机网络元模型b、EventB2NTA模型转换引擎c和EventB2NTA模型转换配置模块d:
所述Event-B元模型a,用于定义和规范Event-B模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述时间自动机网络元模型b,用于定义和规范时间自动机网络模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述EventB2NTA模型转换引擎c,用于实现Event-B模型元素到时间自动机网络模型元素的逐一转换,EventB2NTA模型转换引擎c符合ATL语言的语法和语义规范,且基于Event-B元模型a和时间自动机网络元模型b而构建;
所述EventB2NTA模型转换配置模块d,用于实现Event-B模型到时间自动机网络模型的转换,EventB2NTA模型转换配置模块d以Event-B元模型a、时间自动机网络元模型b、EventB2NTA模型转换引擎c和xmi格式的Event-B模型作为输入,通过Debug调试生成xmi格式的时间自动机网络模型。
进一步地,所述Event-B元模型a包括:
集合carrierSet、常量constant、公理axiom、变量variable、不变式invariant、事件event、卫式guard和动作action,其中,公理axiom用于描述集合carrierSet与常量constant之间的关系。
进一步地,所述时间自动机网络元模型b包括:
系统system、常量constant、变量variable、变迁transition、卫式guard、赋值assignment和时钟变量clock。
进一步地,所述EventB2NTA模型转换引擎c包括六条基于ATL语言的Event-B模型到时间自动机网络模型的转换规则:
carrierSet2system、axiom2constant、invariant2variable、event2transition、guard2guard、action2assignment。
一种复杂软件系统Event-B模型到时间自动机网络的转换方法,包括以下步骤:
步骤1,预处理复杂软件系统的Event-B模型:将Event-B中buc格式的Context模型与bum格式的Machine模型,合并存储为xmi格式的Event-B模型;
步骤2,将复杂软件系统的Event-B模型转换为时间自动机网络模型:利用构造的模型转换工具EventB2NTA,将预处理后的xmi格式的Event-B模型,转换为xmi格式的时间自动机网络模型;
步骤3,将转换后的时间自动机网络模型进行后处理:将xmi格式的时间自动机网络模型,存储为时间自动机网络工具UPPAAL能够识别的xml格式,然后根据用户需求添加相应的时间属性,完成建模。
下面结合附图及具体实施例对本发明作进一步详细说明。
实施例
结合图1,本发明复杂软件系统Event-B模型到时间自动机网络模型的转换工具,包括Event-B元模型a、时间自动机网络元模型b、EventB2NTA模型转换引擎c和EventB2NTA模型转换配置模块d:
结合图2,所述Event-B元模型a,用于定义和规范Event-B模型的元素构成和元素之间的关系,其定义符合Ecore元模型规范;
进一步地,所述Event-B元模型a包括集合carrierSet、常量constant、公理axiom、变量variable、不变式invariant、事件event、卫式guard和动作action,其中,公理axiom用于描述集合carrierSet与常量constant之间的关系。
结合图2,所述时间自动机网络元模型b,用于定义和规范时间自动机网络模型的元素构成和元素之间的关系,其定义符合Ecore元模型规范;
进一步地,所述时间自动机网络元模型b包括系统system、常量constant、变量variable、变迁transition、卫式guard、赋值assignment和时钟变量clock。
结合图3,所述EventB2NTA模型转换引擎c,用于实现Event-B模型元素到时间自动机网络模型元素的逐一转换,其符合ATL语言的语法和语义规范,且基于Event-B元模型和时间自动机网络元模型而构建;
进一步地,所述EventB2NTA模型转换引擎c包括六条基于ATL语言的Event-B模型到时间自动机网络模型的转换规则:
carrierSet2system、axiom2constant、invariant2variable、event2transition、guard2guard、action2assignment。
结合图4,所述EventB2NTA模型转换配置模块d,用于实现Event-B模型到时间自动机网络模型的转换,其以Event-B元模型a、时间自动机网络元模型b、EventB2NTA模型转换引擎c和xmi格式的Event-B模型作为输入,通过Debug调试生成xmi格式的时间自动机网络模型。
结合图5,一种复杂软件系统Event-B模型到时间自动机网络模型的转换方法,包括以下步骤:
步骤1,预处理复杂软件系统的Event-B模型:将Event-B中buc格式的Context模型与bum格式的Machine模型,合并存储为xmi格式的Event-B模型;
如图5(a)所示,待转换的Event-B模型由monitor_c和monitor两部分组成,其中,monitor_c为buc格式的Context模型,monitor为bum格式的Machine模型;模型转换前,需将Context模型与Machine模型合并,并存储为xmi格式。
步骤2,将复杂软件系统的Event-B模型转换为时间自动机网络模型:利用构造的模型转换工具EventB2NTA,将预处理后的xmi格式的Event-B模型,转换为xmi格式的时间自动机网络模型;
步骤3,将转换后的时间自动机网络模型进行后处理:将xmi格式的时间自动机网络模型,存储为时间自动机网络工具UPPAAL能够识别的xml格式,如图5(b)所示的模型,然后根据用户需求添加相应的时间属性,完成建模。
综上所述,本发明通过构造模型转换方法和工具,将复杂软件系统的Event-B模型转换为时间自动机网络,汲取Event-B模型逐步精化与时间自动机网络时间特性显式刻画的优点。

Claims (5)

1.一种复杂软件系统Event-B模型到时间自动机网络的转换工具,其特征在于,包括Event-B元模型(a)、时间自动机网络元模型(b)、EventB2NTA模型转换引擎(c)和EventB2NTA模型转换配置模块(d):
所述Event-B元模型(a),用于定义和规范Event-B模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述时间自动机网络元模型(b),用于定义和规范时间自动机网络模型的元素构成和元素之间的关系,定义符合Ecore元模型规范;
所述EventB2NTA模型转换引擎(c),用于实现Event-B模型元素到时间自动机网络模型元素的逐一转换,EventB2NTA模型转换引擎(c)符合ATL语言的语法和语义规范,且基于Event-B元模型(a)和时间自动机网络元模型(b)而构建;
所述EventB2NTA模型转换配置模块(d),用于实现Event-B模型到时间自动机网络模型的转换,EventB2NTA模型转换配置模块(d)以Event-B元模型(a)、时间自动机网络元模型(b)、EventB2NTA模型转换引擎(c)和xmi格式的Event-B模型作为输入,通过Debug调试生成xmi格式的时间自动机网络模型。
2.根据权利要求1所述的复杂软件系统Event-B模型到时间自动机网络的转换工具,其特征在于,所述Event-B元模型(a)包括:
集合carrierSet、常量constant、公理axiom、变量variable、不变式invariant、事件event、卫式guard和动作action,其中,公理axiom用于描述集合carrierSet与常量constant之间的关系。
3.根据权利要求1所述的复杂软件系统Event-B模型到时间自动机网络的转换工具,其特征在于,所述时间自动机网络元模型(b)包括:
系统system、常量constant、变量variable、变迁transition、卫式guard、赋值assignment和时钟变量clock。
4.根据权利要求1所述的复杂软件系统Event-B模型到时间自动机网络的转换工具,其特征在于,所述EventB2NTA模型转换引擎(c)包括六条基于ATL语言的Event-B模型到时间自动机网络模型的转换规则:
carrierSet2system、axiom2constant、invariant2variable、event2transition、guard2guard、action2assignment。
5.一种复杂软件系统Event-B模型到时间自动机网络的转换方法,其特征在于,包括以下步骤:
步骤1,预处理复杂软件系统的Event-B模型:将Event-B中buc格式的Context模型与bum格式的Machine模型,合并存储为xmi格式的Event-B模型;
步骤2,将复杂软件系统的Event-B模型转换为时间自动机网络模型:利用构造的模型转换工具EventB2NTA,将预处理后的xmi格式的Event-B模型,转换为xmi格式的时间自动机网络模型;
步骤3,将转换后的时间自动机网络模型进行后处理:将xmi格式的时间自动机网络模型,存储为时间自动机网络工具UPPAAL能够识别的xml格式,然后根据用户需求添加相应的时间属性,完成建模。
CN201811624203.2A 2018-12-28 2018-12-28 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法 Pending CN109725890A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811624203.2A CN109725890A (zh) 2018-12-28 2018-12-28 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811624203.2A CN109725890A (zh) 2018-12-28 2018-12-28 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法

Publications (1)

Publication Number Publication Date
CN109725890A true CN109725890A (zh) 2019-05-07

Family

ID=66297489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811624203.2A Pending CN109725890A (zh) 2018-12-28 2018-12-28 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法

Country Status (1)

Country Link
CN (1) CN109725890A (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062009A (zh) * 2019-05-21 2019-07-26 杭州逍邦网络科技有限公司 一种信息物理融合系统防御的形式化检测方法
CN115933485A (zh) * 2022-12-21 2023-04-07 华侨大学 基于控制结构层次划分的安全攸关系统控制方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150855A1 (en) * 2007-12-05 2009-06-11 Elaasar Maged E Computer Method and Apparatus for Model Transformation Reapply
CN102520925A (zh) * 2011-11-18 2012-06-27 北京航空航天大学 Aadl2tasm模型转换方法
CN102609260A (zh) * 2012-02-08 2012-07-25 北京航空航天大学 Tasm2uppaal模型转换方法
CN105335161A (zh) * 2015-11-13 2016-02-17 华中师范大学 一种从tasm时间抽象状态机到扩展nta自动机的转换方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150855A1 (en) * 2007-12-05 2009-06-11 Elaasar Maged E Computer Method and Apparatus for Model Transformation Reapply
CN102520925A (zh) * 2011-11-18 2012-06-27 北京航空航天大学 Aadl2tasm模型转换方法
CN102609260A (zh) * 2012-02-08 2012-07-25 北京航空航天大学 Tasm2uppaal模型转换方法
CN105335161A (zh) * 2015-11-13 2016-02-17 华中师范大学 一种从tasm时间抽象状态机到扩展nta自动机的转换方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110062009A (zh) * 2019-05-21 2019-07-26 杭州逍邦网络科技有限公司 一种信息物理融合系统防御的形式化检测方法
CN115933485A (zh) * 2022-12-21 2023-04-07 华侨大学 基于控制结构层次划分的安全攸关系统控制方法及装置

Similar Documents

Publication Publication Date Title
Berthomieu et al. Fiacre: an intermediate language for model verification in the topcased environment
Hu et al. Mapping UML Diagrams to a Petri Net Notation for System Simulation.
Spichkova et al. Do we really need to write documentation for a system? CASE tool add-ons: generator+ editor for a precise documentation
CN109725890A (zh) 复杂软件系统Event-B模型到时间自动机网络的转换工具及方法
Spichkova Architecture: Requirements+ decomposition+ refinement
Baresi et al. From interaction overview diagrams to temporal logic
Graf et al. Timed annotations in UML
Ebeid et al. Generation of SystemC/TLM code from UML/MARTE sequence diagrams for verification
Alhroob et al. Transforming UML sequence diagram to high level Petri Net
Lindsay Behavior trees: from systems engineering to software engineering
Bae et al. Verifying ptolemy ii discrete-event models using real-time maude
Alshareef et al. An an approach for activity-based DEVS model specification
Popovic et al. A generic model-based test case generator
CN107944184A (zh) 结合生命系统理论和fbs的产品概念设计方法
Buneman et al. Hierarchical Models of Provenance.
Hu et al. Extended DEVSML as a Model Transformation Intermediary to Make UML Diagrams Executable.
KR101170546B1 (ko) 차종별 시스템의 사양 설계 방법
Colin et al. Duration calculus: A real-time semantic for b
Urdahl et al. Architectural system modeling for correct-by-construction RTL design
Diallo et al. A formal, model-driven design flow for system simulation and multi-core implementation
Chernenok et al. The application of coloured Petri nets to verification of distributed systems specified by message sequence charts
Treharne et al. Automatic generation of integrated formal models corresponding to UML system models
Li et al. Synthesizing cooperative controllers from global tasks of multi-robot systems
Santa et al. Relations of UML and OETPN Models
Haqiq et al. Verification of multi decisional reactive agent using SMV model checker

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
CB03 Change of inventor or designer information

Inventor after: Han Deshuai

Inventor after: Ma Guanglian

Inventor after: Wang Tao

Inventor after: Wang Bo

Inventor after: Feng Guoyan

Inventor after: Su Yanzhao

Inventor before: Han Deshuai

Inventor before: Ma Guanglian

Inventor before: Yang Qiliang

Inventor before: Wang Tao

Inventor before: Wang Bo

Inventor before: Feng Guoyan

Inventor before: Su Yanzhao

CB03 Change of inventor or designer information
RJ01 Rejection of invention patent application after publication

Application publication date: 20190507

RJ01 Rejection of invention patent application after publication