A General Framework for Formalizing Object-Oriented .ppt
《A General Framework for Formalizing Object-Oriented .ppt》由会员分享,可在线阅读,更多相关《A General Framework for Formalizing Object-Oriented .ppt(99页珍藏版)》请在麦多课文档分享上搜索。
1、A General Framework for Formalizing Object-Oriented Modeling Techniques,Betty H. C. Cheng Software Engineering and Network Systems Laboratory Department of Computer Science and Engineering Michigan State University East Lansing, Michigan 48824 Chengbcse.msu.edu www.cse.msu.edu/chengb,Acknowledgement
2、s,Joint work with the following people: Robert Bourdeau Laura Campbell William McUmber Enoch Wang Ryan Stephenson Sponsored in part by: National Science Foundation Grants: (CCR-9633391, CCR-9901017, EIA-0000433) DARPA Grant (EDCS Program): F30602-96-1-0298 Motorola Eaton Corporation Siemens Automoti
3、ve Detroit Diesel Corporation,Bridge the Gap Between Informal and Formal Methods,Object-Oriented “Blueprints”,Formal Representations,Informal specifications,graphical models,easy for humans toformulate, may be inconsistent andincomplete.,Objective:formal specificationsexecutable codethat can be veri
4、fiedfor correctnessand completeness,Benefits: Automated Analysis Consistency, completeness Rapid Prototyping Behavior SimulationDesign Transformations Test Case generation,Build a Bridge,Automated formalization and integration of the informal models can help properly bridge the two sides,Informal sp
5、ecifications,graphical models,easy for humans toformulate, may be inconsistent andincomplete.,Objective:formal specificationsexecutable codethat can be verifiedfor correctnessand completeness,Overview,Introduction Background/Related Work Formalization Framework Validation: Tool Support Case Study Co
6、nclusions and Future Investigations,Motivation,Embedded systems are difficult to develop Object-Oriented Design can be powerful for embedded systems Diagrammatic notations facilitate abstraction UML is de facto standard Object-Oriented Commonly used More intuitive But diagrams lack formality precise
7、ly predicting behavior is difficult,Objectives and Results,Overarching goals: Broaden base of developers who can use rigorous software engineering techniques Provide palatable path to more rigorous SE techniques Leverage existing expertise and technology Enable use of intuitive diagrammatic notation
8、s (UML) for embedded system design Provide path from UML to existing formal languages Existing user base Support ToolsEnable automated analyses of model Simulation Model checking,Additional Results,Provide precise semantics for diagrams Establish consistency of mapping rules Allow choice of formaliz
9、ation language,Background: Embedded Systems,Code difficult to design and analyze Time-dependent difficult to instrument often highly concurrent High level of robustness required control real-world, physical processes,Background: UML,“General-purpose” visual modeling language de facto Standard (At le
10、ast) nine different diagrams Diagrams described by metamodels: A graphical model that describes syntax of model Therefore, nine different metamodels,UML Class Diagram,Class A,Class A1,Class A2,Class A3,Class B,Class X,UML Metamodel,Metamodel defines UML syntax using class diagram notation. Semantics
11、 not defined by metamodel Note: Any language or diagram syntax can be defined with a metamodel,Example MetaModel,Program,Simple,Statement,Compound,Statement,Block,0*,Metamodel - Diagram - System Relationship,Metamodel,UMLDiagram Instance,Constrains syntax,System,Specifies aspect of,Background: VHDL,
12、IEEE standard language Intended for abstract description of hardware Uses multiple, concurrent, communicating processes Communication through “signals” Syntax is Ada-like, procedural in nature Models can be “executed” in simulation.,Background:VHDL Structure,entity port (sig.),architecture. beginpro
13、cesssig = value;endprocessend,Static description ofprocess interface,Dynamic description of entity behavior,entity port (sig),architecture. beginprocessendprocesswait for sig;end,One “unit” of execution containing multiple processes,Background: Promela (SPIN),Promela is language for SPIN model check
14、er Simulation and model checking of concurrent systems SPIN: commonly used in telecommunication domain Developed by Bell Labs (now Lucent) Protocol verification Guarded Command Language + CSP + C Collection of processes, channels, and variables,Background: Promela Example,typdef A_type int x; int y;
15、 bool unused; mtype vals; chan queue=3 of mtype; A_type A; mtype=on, off, none;init atomic A.x = 1; A.y = 2 run abc() proctype abc() int I; do : A.x 1 - A.y = A.y + 1; A.x = A.x + 1; od; queue!on; if : queue?vals : A.y 4 - goto skip1 fi,“structure” typedef,Guarded statement,Homomorphisms,Preserve op
16、erations, hence structure and semantics,Metamodel mapping,UML metamodel,Formal language metamodel,Homomorphism,Unified Class/Dynamic Metamodel,Model,Class,Relationships,Instance Variables,Aggregation,Generalization,Association,Behavior,State Vertex,Transition,Rest of dynamic model,Class related,Dyna
17、mic related,Dynamic Model Portion of Unified Metamodel,Behavior,State Vertex,Transition,Guard,Pseudostate,State,CompositeState,SimpleState,ActionSequence,Event,SignalEvent,TimeEvent,ChangeEvent,Start,Final,Join,History,01,01,01,01,01,01,01,01,1,1,1*,To Class,Example Metamodel Mapping,h:,Introduction
18、 to Mapping Rules,VHDL used for embedded systems VHDL contains time notations Many commercial tools available Comprehensive simulation capability SPIN used in industry Spin provides model simulation and checking Concurrency is a feature of both,VHDL Class Diagram Mapping Rules,Map static class struc
19、ture to Ent/Arch structure Provide “packages” for VHDL syntactic details, instance variables Map class relationships to port signatures,VHDL Dynamic Diagram Rules,Objects map to entity/architectures States map to processes each process dormant until state name on signal Transitions map to signal ass
20、ignments Composite states map to entity/architectures Other pseudo-states map to special processes,VHDL Mapping Rules Summary,entity port (sig.),architecture. beginprocesssig = value;endprocessend,Class,composite state,Simple state,relationships,Transition/event mechanism,VHDL Analyses,Widely unders
21、tood by and available in embedded systems community Extensive simulation capability “Signal tracing” in some tools Good for timing dependent systems Good for hardware-coupled simulation (if hardware modeled in VHDL),Promela Class Diagram Mapping Rules,Classes (objects) map to proctypes.Relationships
22、 map to channels.Instance variables map to global typdef structures.,Promela Dynamic Model Mapping Rules,Simple states map to blocks of Promela statements. Transitions map to goto and run() Composite states map to proctypes Events map to channel writes/receives Pseudo-states map to blocks of various
23、 Promela statements,SPIN Analyses,Random simulation Exhaustive search of states State transition system checked by temporal logic assertions Often provides counter-examples (path to problem state) “Easier” than theorem proving Better than simulation when precise timing not required,Summary of Mappin
24、gs,VHDL,Promela,Tool Support,MINERVA,Hydra,Analysis Tool*,HIL,Analysis results,Diagram reports,Analysis reports,Spec*,UML,Hydra Translation Tool,Hydra parser,Implements mapping rules for specific language,Uses library and parserto implement rules,Modular per formal language,Language Specific Class L
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- AGENERALFRAMEWORKFORFORMALIZINGOBJECTORIENTEDPPT

链接地址:http://www.mydoc123.com/p-373152.html