一种恢复状态模式的状态转换图的方法  

A Method to Recover State Transition Graph of State Pattern

在线阅读下载全文

作  者:尹恒[1] 周晓宇[1] 

机构地区:[1]东南大学计算机科学与工程学院,南京211189

出  处:《计算机与数字工程》2010年第1期71-73,154,共4页Computer & Digital Engineering

基  金:国家自然科学基金重大研究计划和重点项目(编号:90818027;60633010);国家高技术研究发展计划(八六三计划)目标导向类项目(编号:2009AA01Z147);国家自然科学(编号:60873049;60803008;60903026);江苏省自然科学基金项目(编号:BK2006094;2008292);武汉大学软件工程国家重点实验室开放基金(SKLSE20080717)资助

摘  要:现有研究不能从状态模式的代码中恢复状态转换图这一状态模式的核心语义信息。针对状态驱动的转换这种典型实现方式,通过分析类型传播图确定状态模式的状态变量在各次赋值前后所属的具体状态类,并由此恢复该模式的状态转换图。给出了具体算法,通过实例分析验证了方法的可行性。Existing researches can't recover state translation graph from codes of state pattern, which is the core semantic of state pattern. An approach is proposed to recover state translation graph from codes of typical implementation of state pattern. By analysis of type propagation graph, the approach figures out which concrete state class the current state variable belongs to before and after it has been assigned, and thus the state transition graph is recovered. The algorithm of the approach is presented, and the effectiveness of the approach is verified by a case study.

关 键 词:设计模式 状态模式 类型传播图 状态转换图 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象