检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]中国科学院软件研究所计算机科学开放实验室,北京100080
出 处:《计算机工程与应用》2001年第17期63-66,163,共5页Computer Engineering and Applications
基 金:国家自然科学基金(编号:69873042);国家"九五"攻关计划(编号:96-729-06-02)的资助
摘 要:模式匹配是包括LFC在内的大多数函数式语言都具有的特点。文章在LFC语言现有的模式匹配实现方法的基础上,结合常用的模式匹配树的构造思想,设计了一种模式匹配方法。这种模式匹配方法通过计算给定模式集合的扩展集合来构造模式匹配树。虽然在最坏情况下,该方法与LFC现有实现的空间复杂度一样,但当函数定义是部分构造式,而定义中的非项模式覆盖了较多项时,这种模式匹配方法可以避免LFC语言现有实现中较大的编码空间。这个方法略作修改即可用于复杂的嵌套模式,是一种通用的模式匹配方法。: Pattern matching is a feature of lots of functional languages including LFC.This article introduces a method of pattern matching,which is based on the implementation of LFC and the construction of pattern matching tree.Though the worst-case space complexity is comparable to that of the implementation of LFC,this method can decrease the large code space of the implementation of LFC when the definition of the function is good-natured.This method can be also used for nested pattern with little modification and is a general method for pattern matching.
关 键 词:函数式语言 模式匹配 简单模式 LFC语言 形式规约语言
分 类 号:TP301.2[自动化与计算机技术—计算机系统结构]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.74