[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-655943-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-655943-en":131,"doc-similar-655943":163},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","model-checking-and-code-generation-for-uml-state-machines-and-collaborations","Model Checking and Code Generation for UML State Machines and Collaborations","","Formal methods connect different UML views to improve design correctness and implementation confidence. The text describes tools (tentatively called HUGO) that use model checking to relate UML state machines to interaction (collaboration/sequence) diagrams, treating the state machine view as the model and the interaction view as the property. It then proposes direct code generation from the same UML model to reduce discrepancies. An ATM example explains validation, erroneous interactions, and execution semantics.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/research-report/","Research & Report",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/model-checking-and-code-generation-for-uml-state-machines-and-collaborations/655943/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/model-checking-and-code-generation-for-uml-state-machines-and-collaborations/655943.png","ImageObject",300,407,{"name":42,"@type":43},"Helloiii","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-26","2026-10-25",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",13,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What role does model checking play in relating UML views?","Question",{"text":63,"@type":64},"Model checking is used to ensure a system run described by an interaction (collaboration/sequence) diagram can be realized by interacting UML state machines, treating the state machine view as the model and the interaction view as the property.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does the ATM example support the approach?",{"text":68,"@type":64},"The ATM example illustrates a UML model with a class diagram and state machine diagrams for ATM and Bank, focusing on PIN and card validation behavior, including detection of erroneous collaborations.",{"name":70,"@type":61,"acceptedAnswer":71},"Why is direct code generation from UML proposed?",{"text":72,"@type":64},"Since coding errors can still occur after design verification, generating code directly from the UML state machine aims to apply formal analysis and code generation to the same model, increasing confidence in correctness.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},655943,1793073561,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,106,111,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":103,"show_sort_weight":104,"slug":105},6,"Technology",50,"technology",{"id":107,"doc_module":4,"doc_module_name":25,"category_name":108,"show_sort_weight":109,"slug":110},7,"Healthcare",40,"healthcare",{"id":112,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":113,"slug":114},8,30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":112,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":102,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145,"preview_page_count":33,"preview_urls":146},5909897196768,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Model Checking and Code Generation for UML State Machines and Collaborations  \nAlexander Knapp and Stephan Merz  \nInstitut fr Informatik, Ludwig-Maximilians-Universitt Mnchen fknapp,[merz](merzg@informatik.uni-muenchen.de)[g](merzg@informatik.uni-muenchen.de)[@informatik.uni-muenchen.de](merzg@informatik.uni-muenchen.de)[ ](merzg@informatik.uni-muenchen.de)[http://www.pst.informatik.uni-muenchen.de/projekte/hugo/](http://www.pst.informatik.uni-muenchen.de/projekte/hugo/)  \n1 Supporting the UML by Formal Methods  \nThe “Uniﬁed Modeling Language”(UML [1]) is generally accepted as the de facto standard notation for the analysis and design of object-oriented software systems. It provides diagrams for the description of static, dynamic, and architectural aspects of systems at different levels of detail. In particular, dynamic aspects of system behavior can be speciﬁed with the help of interaction (i.e., collaboration or sequence) diagrams that describe single system runs. A more operational view is provided by UML state machines, a variant of the Statechart notation introduced by Harel [2], that are associated with instances of classes.  \nThe UML deliberately encourages the use of redundant descriptions of the same aspects of a system, for example during different phases of software development. This redundancy generates an obvious opportunity for veriﬁcation and validation techniques to ensure the consistency of these descriptions. Moreover, formal methods are generally most beneﬁcial when applied to abstract descriptions. We describe an ongoing project to develop a set of tools, tentatively called HUGO, where model checking technology is applied to relate UML state machines and interaction diagrams. Considering the state machine view as the “model” and the interaction view as the “property”, model checking can be used to ensure that a system run as speciﬁed by the interaction diagram can indeed be realised by a set of interacting state machines. In some cases, the absence of errors can be expressed as the impossibility to realise certain “erroneous” interactions. As is typical for applications of model checking, we concentrate on the control part of UML models and largely abstract from the data manipulations.  \nWhile veriﬁcation technology such as model checking can reveal errors in system designs, coding errors during later implementation stages may still occur. Since state machines can specify an object’s behavior in full detail, we propose to generate code directly from the UML model. Ideally, formal analysis and code generation are applied to the same model, raising the conﬁdence in the correctness of the resulting system.  \n2 ATM Example  \nWe will illustrate our approach at the hand of a simple UML model shown in Fig. 1 that describes the interaction of an automatic teller machine (ATM), a bank computer, and a single user (left implicit) . The simulation focuses on the validation of the user’s  \n«signal» PINVerified «signal» reenterPIN  \n«signal» abort  \natm  \n1  \nbank  \n1  \nverifyPIN()  \nATM  \n«signal» done  \n\n| Bank\u003Cbr>boolean cardValid = true int numIncorrect = 0\u003Cbr>int maxNumIncorrect = 2 |\n| --- |\n|  |\n\n(a) Class diagram  \n1: verifyPIN()  \n3: verifyPIN()  \natm bank  \na : ATM b : Bank  \n2: reenterPIN  \n4: PINVerified  \n(b) Expected collaboration  \n1: verifyPIN()  \n3: verifyPIN()  \natm bank  \na : ATM b : Bank  \n2: abort  \n4: PINVerified  \n(c) Erroneous collaboration  \n(d) State machine diagram for class ATM  \n[numIncorrect \u003C maxNumIncorrect]/ numIncorrect++; ^atm. reenterPIN  \n(e) State machine diagram for class Bank  \nFig. 1. UML model of an ATM  \n60  \ncard and PIN, abstracting from the actual data and computation. The class diagram in Fig. 1(a) lays out the static structure of the system. The dynamic behavior is speciﬁed by state machines for the classes ATM and Bank in Fig. 1(d) and 1(e) .  \nState machines consist of states, which may be simple (like CardEntry), composite (GivingMoney), or concurrent composite (Verifyin","cbCairzxYCKsiq2d","https://ap.wps.com/l/cbCairzxYCKsiq2d","pdf",55078,"English","# Supporting the UML by Formal Methods\n## ATM Example","[{\"question\":\"What role does model checking play in relating UML views?\",\"answer\":\"Model checking is used to ensure a system run described by an interaction (collaboration/sequence) diagram can be realized by interacting UML state machines, treating the state machine view as the model and the interaction view as the property.\"},{\"question\":\"How does the ATM example support the approach?\",\"answer\":\"The ATM example illustrates a UML model with a class diagram and state machine diagrams for ATM and Bank, focusing on PIN and card validation behavior, including detection of erroneous collaborations.\"},{\"question\":\"Why is direct code generation from UML proposed?\",\"answer\":\"Since coding errors can still occur after design verification, generating code directly from the UML state machine aims to apply formal analysis and code generation to the same model, increasing confidence in correctness.\"}]","Model Checking and Code Generation for UML State Machines and Collaborations | PDF",1792965028,15,[147,151,155,159],{"page_no":22,"url":148,"width":149,"height":150},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/73527ea49e3ea4a135829b77a3a94039.webp",983,1390,{"page_no":26,"url":152,"width":153,"height":154},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/2cf1f481e3129241e099d18383c081f0.webp",982,1388,{"page_no":30,"url":156,"width":157,"height":158},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/3610281cb5dc413fb37e98ef123e0c12.webp",981,1387,{"page_no":33,"url":160,"width":161,"height":162},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/c317be90c358d376aa58105280de420d.webp",980,1385,{"list":164,"token":11},[165,171,177,183,189,195,201,207,214,220],{"doc_id":166,"doc_title":167,"file_type":138,"home_preview_img_url":168,"slug":169,"view_count":55,"category_name":29,"create_tm":170},655945,"Electronic Notes in Theoretical Computer Science - 55 No. 3 - Model Checking","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294681/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=xn1F8OCk6Hxru5c1WL9gmjcICuQ%3D","electronic-notes-in-theoretical-computer-science-volume-55-issue-3-model-checking",1792965036,{"doc_id":172,"doc_title":173,"file_type":138,"home_preview_img_url":174,"slug":175,"view_count":124,"category_name":29,"create_tm":176},655739,"UML 2 Activity and Action Models - Part 5 - Partitions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975288585/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=W8XLC3wCUBnMcLy3LbyMAWWpSmA%3D","uml-2-activity-and-action-models-part-5-partitions",1792963529,{"doc_id":178,"doc_title":179,"file_type":138,"home_preview_img_url":180,"slug":181,"view_count":116,"category_name":29,"create_tm":182},655937,"Class and State machine Reﬁnement in UML-B","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294603/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=ihTS4QE2iQjIvCCYKH0L9u%2Fnshc%3D","class-and-state-machine-refinement-in-uml-b",1792965012,{"doc_id":184,"doc_title":185,"file_type":138,"home_preview_img_url":186,"slug":187,"view_count":124,"category_name":29,"create_tm":188},655775,"LAB 5 - Interaction Diagram - UML Communication Diagram - Lab Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229974776825/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=JoK8B8vS2dzPYgzRhux05JGznTo%3D","lab-5-interaction-diagram-uml-communication-diagram-lab-notes",1792963729,{"doc_id":190,"doc_title":191,"file_type":138,"home_preview_img_url":192,"slug":193,"view_count":112,"category_name":29,"create_tm":194},655592,"A Formal Semantics for UML Activity Diagrams","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285723/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=zFp5Ug%2FDPywO1aVSSEKDBUIw98c%3D","a-formal-semantics-for-uml-activity-diagrams",1792962764,{"doc_id":196,"doc_title":197,"file_type":138,"home_preview_img_url":198,"slug":199,"view_count":107,"category_name":29,"create_tm":200},655650,"A UML profile for feature diagrams - Initiating a model driven engineering approach for software product lines","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975286660/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=leZc8NqndfrpyB7L4d%2F7jG4TqVo%3D","a-uml-profile-for-feature-diagrams-initiating-a-model-driven-engineering-approach-for-software-product-lines",1792963021,{"doc_id":202,"doc_title":203,"file_type":138,"home_preview_img_url":204,"slug":205,"view_count":107,"category_name":29,"create_tm":206},655588,"Towards a Semantics of Activity Diagrams with Semantic Variation Points - Semantic Variation Points","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975285694/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=gKVDkD6sbMS0CgTUGY5I2dNa2dI%3D","towards-a-semantics-of-activity-diagrams-with-semantic-variation-points-semantic-variation-points",1792962755,{"doc_id":208,"doc_title":209,"file_type":138,"home_preview_img_url":210,"slug":211,"view_count":212,"category_name":29,"create_tm":213},655915,"A Fully General Operational Semantics for UML 2.0 Sequence Diagrams - Potential and Mandatory Choice - Mass Soldal Lund and Ketil Stølen","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975293976/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=IFSSIQhcv7uHYl9ROdGRmm8Yk9o%3D","a-fully-general-operational-semantics-for-uml-20-sequence-diagrams-potential-and-mandatory-choice-mass-soldal-lund-and-ketil-stolen",11,1792964799,{"doc_id":215,"doc_title":216,"file_type":138,"home_preview_img_url":217,"slug":218,"view_count":107,"category_name":29,"create_tm":219},655932,"Logical View - Static Structures - Interactions - Dynamic Behavior - Example: Logical View for the ATM","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975294539/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=kT1b9rWmh6vWK9frEqSPGaeIYGA%3D","logical-view-static-structures-interactions-dynamic-behavior-example-logical-view-for-the-atm",1792964991,{"doc_id":221,"doc_title":222,"file_type":138,"home_preview_img_url":223,"slug":224,"view_count":116,"category_name":29,"create_tm":225},505054,"Properties of Stable Model Semantics Extensions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229932021442/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796110619&Signature=%2F9Fmqpe9ACH3kix%2BYS6ZXsfr7S0%3D","properties-of-stable-model-semantics-extensions",1791087566]