A Denotational Approach to Measuring Complexity in Functional Programs
4
CHAPTER 1. INTRODUCTION
to correspond in some useful fashion. In this dissertation the operational semantics is arguably more intuitive and closer in spirit to machine-level implementation, but for ease of analysis we want a compositional semantics. Therefore we create a denotational semantics for analysis, and compare it with the operational semantics to show that our semantics is computationally reasonable.
1.1.2 Extensional vs. Intensional Another way of classifying semantics concerns the level of abstraction at which a semantics is pitched. A semantics (operational or denotational) is extensional if it is primarily concerned with the nal result and not other aspects of computation such as the time it takes to complete, the amount of space required, or the path traversed during computation. Conversely, a semantics is intensional precisely when it is concerned with such internal details. These two classi cations are relative more than absolute, as the de nition of\ nal result" and\internal details" may vary depending on the purpose of the semantic model. Most traditional semantic models focus on extensional properties alone. Sometimes, to get a extensional de nition, one must start with an intensional one and then abstract away the internal details, as was done f
or the example in the game semantics of 1]. In particular, a transition semantics technically is concerned with the path of a computation as well as the nal result, but in practice when using a transition semantics we ignore the path and consider only the extensional properties. In this dissertation, however, the intensional properties are what is of interest so the semantics used must be intensional, although we also need to relate it to an extensional semantics.
1.2 Complexity versus Cost Whenever we mention the cost of an expression or program, we are referring to a precise evaluation time, measured in some number of basic operations (recursive calls, CPU operations, etc.). Costs come in two varieties, the more abstract macro cost counts major operations such as function applications, and the more concrete micro cost counts low-level operations such as register accesses, which often better re ect the actual time it takes for the expression to be evaluated. Complexity, on the other hand, refers to an asymptotic relation between the measure of the input to a function and the time it takes to determine the output. For example, the complexity of the reverse function for lists is typically written as O(n), where n is the length of the list, meaning that the cost of reversing the list is bounded by a linear function on n for su ciently large lists. Those who analyze the e ciency of algorithms traditionally work with complexities because exact costs are frequently machine or compiler dependent. Language pro lers, however, work with costs, primarily because determining costs is an easy task for a computer to do and in many cases the goal of a pro ler is to nd extra costs, such as constants costs, that asymptotic complexity analysis would not necessarily distinguish as signi cant. In this dissertation we will concentrate on cost information rather than complexity. Our primary reason is one of feasibility: there is no standard for measuring the size of input for some data types, particularly higher-order types. We will, however, work only with macro costs, as our semantics would otherwise only be relevant to a particular machine whereas we want to nd a more abstract notion of evaluation time. Furthermore, using macro costs, the semantic functions will be more easily converted to complexity functions (where it is possible to de ne complexity) because complexity functions also usually measure time by counting high-level operations. Our semantic functions will have su cient mathematical structure so that measures and nal costs can be derived from the more precise cost analysis. For example, the call-by-value semantics will tell us that the
Managing Code Complexity... 暂无评价 4页 免费 A Denotational Approach ... 暂无评价 256页 免费 Measuring relational com... 暂无评价 14页 免费 ...
A Denotational Approach ... 暂无评价 256页 免费 Comparing the Complexity.... Measuring relational complexity in oddity discrimination tasks A relation-based...
Tilbury Methods of measuring the size and complexity of PLC programs in different logic control design methodologies? Received: 26 June 2003 / Accepted: 8...
Measuring Functional siz... 暂无评价 4页 免费 A Vector-Based Approach .... FROM MEASUREMENT OF SOFTWARE FUNCTIONAL SIZE TO MEASUREMENT OF COMPLEXITY D....
Computational Complexity and Lexical.Functional Grammar Computational Complexity ...Denotational Semantics for "Natural" Language Question-Answering Programs Main,...
Communication Complexity Method for Measuring Nondeterminism in Finite Automata While deterministic nite automata seem to be well understood, surprisingly many ...
A principled approach to detecting surprising ... or computational complexity reasons, is problematic...belongs to the same functional family as the ...
Functional Dependencies ... 暂无评价 5页 2.00...The metrics reflect the complexity of event ...The reactive approach aims at measuring dependencies...
functional and implementation/(software solutions) ...Complexity of CI Mutual dependency of CIs ...Vulnerability Measuring/identification possibility ...
Functional knowledge Sociolinguistic knowledge Strategic... measuring general ability or skill Aptitude tests...complexity of response Discrete-point tests: ...
热门文档