计算机工程与应用
計算機工程與應用
계산궤공정여응용
COMPUTER ENGINEERING AND APPLICATIONS
2001年
23期
136-138,156
,共4页
形式推导%变换%循环不变式%算法结构%可重用部件
形式推導%變換%循環不變式%算法結構%可重用部件
형식추도%변환%순배불변식%산법결구%가중용부건
对算法程序的功能规约进行等价变换,可以自然而且方便地得到求解问题设计思想的精确表达,即循环不变式.抽象算法又可以通过循环不变式获得.对算法程序中的算子进行提取、抽象就可以得到算法框架,而算法框架可以设计出可重用部件.文章通过对数组段极值问题的求解,展示了形式化推导不仅可以得到正确、高效的算法程序,而且具有软件重用的功能,并进一步给出了利用可重用部件求解数组段极值问题的C++实现.
對算法程序的功能規約進行等價變換,可以自然而且方便地得到求解問題設計思想的精確錶達,即循環不變式.抽象算法又可以通過循環不變式穫得.對算法程序中的算子進行提取、抽象就可以得到算法框架,而算法框架可以設計齣可重用部件.文章通過對數組段極值問題的求解,展示瞭形式化推導不僅可以得到正確、高效的算法程序,而且具有軟件重用的功能,併進一步給齣瞭利用可重用部件求解數組段極值問題的C++實現.
대산법정서적공능규약진행등개변환,가이자연이차방편지득도구해문제설계사상적정학표체,즉순배불변식.추상산법우가이통과순배불변식획득.대산법정서중적산자진행제취、추상취가이득도산법광가,이산법광가가이설계출가중용부건.문장통과대수조단겁치문제적구해,전시료형식화추도불부가이득도정학、고효적산법정서,이차구유연건중용적공능,병진일보급출료이용가중용부건구해수조단겁치문제적C++실현.