A Denotational Approach to Measuring Complexity in Functional Programs
6
CHAPTER 1. INTRODUCTION
Compositionality: Th
e meaning of an expression will be dependent only on the meaning of its
subparts. We can thus analyze the properties of an expression without needing to know in what context the expression occurs. In particular, the context can a ect the cost associated with evaluating an expression under the call-by-name strategy, so the compositional semantics must contain su cient information so that its meaning is still accurate regardless of the context. Soundness: We will relate all the semantic functions to a relatively abstract operational model: one that other researchers ( 37]) have studied. One particularly important relationship we will show is that the denotational semantics is sound. A denotational semantics is sound relative to an operational semantics if, whenever an expression e evaluates to v under the operational semantics, the (extensional) meanings of e and v are the same. With intensional semantics the relationship is more complicated; e.g., if e evaluates to v in time t in the intensional operational semantics, then the denotational meaning of e should be closely related to the meaning of v except that it should also include an additional cost of t. Once we de ne the intentional semantics we will make precise the meaning of\including an additional cost." Adequacy: Another important relationship between the denotational and operational semantics concerns the behavior of programs that fail to terminate. A denotational semantics is adequate when a program fails to terminate in the operational model precisely when its denotational meaning indicates non-termination. With soundness and adequacy we can generally use the denotational model to analyze properties of programs and know that the properties hold for the operational model as well. In this dissertation the adequacy property will also ensure that, although the mathematical model may contain cost in unusual locations, the meaning of an expression will either indicate non-termination or be essentially a pairing of a nal value and the cost it took to evaluate it. Separability: Each intensional semantic function will have a related extensional semantics, one that gives the same nal results but does not contain any consideration of costs. It is important to be able to recover this semantics to make sure that the intensional semantics treats the data the same way it would extensionally. We will be de ning each semantic function such that we can easily obtain their extensional versions. Furthermore, the semantic functions are robust and exible in that the technique used to de ne the semantic functions applies to more than one operational semantics and more than one language. Thus the overall structure for both semantic functions will be very similar, each based on the same general cost construction. In addition we can easily add new constants, or adjust the meaning of old ones, and show that the new language is still sound, adequate, and separable. These properties indicate that other semantic f
unctions may also be created to work with a variety of languages or operational de nitions.
1.5 Related Work When a program contains neither high-order nor lazy data types, we can analyze its complexity using many of the same techniques that have been used to analyze the complexity of imperative programs (e.g., see 2]). In these cases the applicative nature of functional programming is helpful, making it easy to convert a program to a functional description of its complexity. Some early work in automatic cost or complexity calculations ( 50], 22]) took advantage of the structure of functional programs to develop recursive de nitions of program complexity ( 22]) or cost ( 50]).
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: ...
热门文档