首页> 中文期刊> 《哈尔滨工业大学学报》 >活动图并发语义代码自动生成算法设计

活动图并发语义代码自动生成算法设计

         

摘要

Compared with state diagram, activity diagram can be used to display the concurrent behavior of program in a more natural and intuitive way. Six primitives of initial, fork, join, flow final, activity final and activity were selected as the basis for graphical modeling and automatic code generation. A XML document for- mat was defined to describe the activity diagram, then the XML document was parsed based on DOM, after that original activity diagram was split into separate activity sub-diagrams; and then each activity diagram was parsed into a number of processes and semaphores and codes. The methods and algorithms proposed were test- ed by designing and implementing a software system and good results were achieved, it showed that the meth- ods and algorithms were right and effective.%针对活动图能够比状态图更自然和直观地显示程序的并发行为,为达到图形化描述程序的并发行为并自动生成代码的目标,通过分析活动图的图元语义,以fork、join、activity、initial、activity final、flow final等6个图元作为图形建模和代码生成的基础,提出了一套代码自动生成算法.该算法把活动图拆分成若干独立的活动子图;再把每个活动子图解析成若干进程和信号量;最后对每一个进程和信号量进行代码生成.实验证明,基于本算法开发的原型系统取得了较满意的效果,同时也证明了所提出的方法和算法的正确性、有效性.

著录项

相似文献

  • 中文文献
  • 外文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号