Programming with Sequence Variables: the Sequentica Package
Programming with Sequence Variables: the Sequentica Package
复制标题
使用序列变量进行编程:Sequentica 包
DOI:
10.1142/9781848161313_0003
复制
发表时间:
2003
期刊:
影响因子:
--
通讯作者:
Dorin Tepeneu
中科院分区:
文献类型:
--
作者:
M. Marin;Dorin Tepeneu
Sequence variables are an advanced feature of modern programming languages. They enhance the support for writing programs in a declarative and easily understood way. To our knowledge, Mathematica provides the best support for programming with sequence variables, but it requires a good understanding of how the interpreter chooses the matcher. This is so because matching against patterns with sequence variables is in general not unitary. We claim that there is room to improve the programming style with sequence variables. We propose a number of new programming constructs which impose certain strategies on the pattern matching process. Our constructs enable to control the selection of a matcher by annotating sequence variables with binding priorities and ranges for their lengths, and to compute optimal values characterized by a score function to be optimized. To this end we have developed the package Sequentica. With Sequentica the Mathematica programmers and users get additional support for defining functions and transformation rules in an easy and convenient way. We outline the algorithmic difficulties to support these extensions and describe how they are implemented in Sequentica. The usefulness of these extensions is illustrated with various examples. We regard these extensions as a first step towards identifying a new programming style: programming with sequence variables. Such a programming style is useful to solve problems based on sequence analysis such as bio-informatics, cryptography or data mining.