Abstract

Algebraic specifications are now widely used for data structuring and they turn out to be quite useful for various aspects of program development, such as prototyping, assisted program construction, proving properties, etc. [3, 12, 13, 1.5, 16, 17, 181. Some of these applications require adding a notion of computation to algebraic specifications, for instance by providing a (convergent) rewrite rule system that expresses the properties of the operators. In this context, it may be of prime interest to define a notion of algorithmic complexity for an algebraic specification, or, more precisely, a notion of complexity for each operator defined in the specification. Computing operator complexity within a given specification helps understanding how evaluation costs are distributed; it may single out “costly” operators, and motivate the search for an equivalent, but “cheaper”, specification. In [5], the cost of a term is defined as the number of rewriting steps for reducing it to its normal form, and the cost of an operator is defined as the genera1 cost of a term obtained by applying this operator to terms in normal form. In this paper, we further formalize this notion of operator complexity and investigate its computation through analysis methods developed for instance in [24,9]. We show how these methods apply to the computation of the enumerative series related to the terms of an algebraic specification. We define the notion of regular rewriting systems, and consider cost series associated with operators that are described by such systems. We show how these analysis methods apply to compute such costs and provide an asymptotic evaluation of the average cost of an operator. Our results allow costs to be computed without any explicit manipulation of series. We provide the user with ready-to-use formulae, where the different parameters only depend on the “geometry” of the system, e.g. the number of constructors in the left-hand side of rules, number of occurrences of a derived operator in the right-hand side, etc. Quantitative evaluation of rewriting systems had not yet been studied under such an approach (except in [5]), to our knowledge. From a different point of view, complexity of algebraic implementations has been studied in [2,8 etc.] w.r.t computability issues.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.