可扩展的逻辑表达式求值系统的设计与实现  被引量:7

Design and implementation of expandable logical expression evaluation

在线阅读下载全文

作  者:熊风光[1] 况立群[1] 韩焱[2] 

机构地区:[1]中北大学电子与计算机科学技术学院,山西太原030051 [2]中北大学信息与通信工程学院,山西太原030051

出  处:《计算机工程与设计》2012年第10期3858-3861,3958,共5页Computer Engineering and Design

基  金:国家自然科学基金项目(61071193)

摘  要:针对目前逻辑表达式求值算法中运算符的名称、优先级和运算规则都以硬编码的形式固化在算法中所带来的算法无法扩展的问题,通过将运算符的名称、优先级和运算规则抽象为接口的方法,设计并实现了一种新的逻辑表达式求值系统。该系统既保证了表达式求值算法的独立性,又允许用户自定义运算符和更新原有运算符运算规则,从而实现了逻辑表达式求值的可扩展性。Aiming at the problem that operator's name, priority, and operation rule are hard-coded in the expression evaluation algorithm, which causes the algorithm can't be expanded, a novel method is proposed, which makes operator's name, priority and operation rule as a interface, and a novel expression evaluation is designed and implemented, which the independence of ex pression evaluation algorithm is supported, and user can customize operator and update the operation rule of the original opera tor, and thus the expansibility of logical expression evaluation is achieved.

关 键 词:逻辑表达式求值 中缀表达式 后缀表达式 运算符 接口 扩展性 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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