针对算法组件的自动替换蕴含的算法组件的兼容性判定问题,提出了一个算法组件的约束模型,从而将算法组件的兼容性判定转化为约束模型的兼容性判定。为解决转化后的兼容性判定,采用了分治思想,即只需判定原子约束强度,约束模型间的兼容性可由原子约束强度结合约束强度推导规则与放松的组件接口兼容性判定规则自动导出。为使算法自动替换更具实用性,提出了支持算法自动替换的编程范式,使得自动替换前期涉及的手工工作在编程所涉及的不同角色之间得到合理分配。设计了编译框架原型,或支持算法与编译优化选项的自动选择。实验结果显示,该系统在9个测试用例上获得的平均加速比为2.29。
Considering that automatic replacement of algorithm components implies the problem of compatibility checking of the algorithm components, a constraint model for algorithm components is proposed to transfer the compatibility checking of algorithm component into the compatibility checking of constraint models. To solve the compatibility checking, a strategy of "Divide and Conquer", is used. According to it, only the related constraint strength between atomic constraints needs to be checked. The compatibility between constraint models can be deduced from atomic constraints, by making use of the derivate rule of constraints strength and the relaxed rule of compatibility checking for component interfaces. To make it practical, a programming roles in the development of software is presented. The new paradigm that normalizes the behaviors of different paradigm helps to balance the manual work in the first stage of the replacement of the algorithm components between different roles. The proposed prototype compiler framework supports automatic selection of algorithms and compiler optimization options. Using this system, an aver- age speedup of 2.29 x is achieved on 9 benchmarks.