In Ada, private declarations are either totally public or totally opaque. In many circumstances, it is necessary to selectively export some private operations or certain aspects of the hidden representation to some pr...
详细信息
In Ada, private declarations are either totally public or totally opaque. In many circumstances, it is necessary to selectively export some private operations or certain aspects of the hidden representation to some privileged modules. In this paper, we present a mechanism in Ada to gain the access control of private declarations. It is similar to the friend mechanism in C + +, and needs no extension to current Ada.
Arrays of characters are a basic data type in many programminglanguages, but strings and substrings are seldom accorded first-class status as parameters and return values. Such status would enable a routine that call...
详细信息
Arrays of characters are a basic data type in many programminglanguages, but strings and substrings are seldom accorded first-class status as parameters and return values. Such status would enable a routine that calls a search function to readily access context on both sides of a return value. To enfranchise substrings, this paper describes a new data type for substrings as a special case of one for general subsequences. The key idea is that values are not sequences or references to positions in sequences, but rather references to subsequences. Primitive operations on the data type are constants, concatenation, and four new functions-base, start, next, and extent-which map subsequence references to subsequence references. This paper informally presents the data type, demonstrates its convenience for defining search functions, and shows how it can be concisely implemented. Examples are given in Ness, a language incorporating the new data type, which is implemented as part of the Andrew User Interface System.
Two innovations are enhancing programminglanguages' capabilities. First, modularity lets you combine independently developed languages without changing their respective definitions. A language is no longer a fixe...
详细信息
Two innovations are enhancing programminglanguages' capabilities. First, modularity lets you combine independently developed languages without changing their respective definitions. A language is no longer a fixed quantity; you can extend it with domain-specific constructs as needed. Second, projectional editing lets you build editors and IDEs that don't require parsers. Such editors and IDEs support a range of tightly integrated notations, including textual, symbolic, tabular, and graphical notations. In addition, by avoiding parsers, they avoid grammar composition's well-known limitations. Three examples illustrate how these two innovations affect programming-languagedesign. A set of modular extensions of C for embedded programming enables efficient code generation and formal analysis. A language for requirements engineering flexibly combines structured and unstructured (prose) data. Finally, a language for defining insurance rules uses mathematical notation. These examples all rely on the open source JetBrains MPS (Meta programming System) language workbench. This article is part of a special issue on Software Architecture.
Our experience of using Java is disappointing: as a programminglanguage (irrespective of its implementations and libraries), Java itself leaves much to be desired, This paper discusses a few serious problems with Jav...
详细信息
Our experience of using Java is disappointing: as a programminglanguage (irrespective of its implementations and libraries), Java itself leaves much to be desired, This paper discusses a few serious problems with Java's design, which leads us to suggest that the language definition should have been an integral part of the design process rather than, as appears, a retrospective commentary. Copyright (C) 1999 John Whey & Sons, Ltd.
Generic programming is an effective methodology for developing reusable software libraries. Many programminglanguages provide generics and have features for describing interfaces, but none completely support the idio...
详细信息
Generic programming is an effective methodology for developing reusable software libraries. Many programminglanguages provide generics and have features for describing interfaces, but none completely support the idioms used in generic programming. To address this need we developed the language g. The central feature of g, is the concept, a mechanism for organizing constraints on generics that is inspired by the needs of modern C++ libraries. g provides modular type checking and separate compilation (even of generics). These characteristics support modular software development, especially the smooth integration of independently developed components. In this article we present the rationale for the design of g. and demonstrate the expressiveness of g, with two case studies: porting the Standard Template Library and the Boost Graph Library from C++ to g,. The design of g. shares much in common with the concept extension proposed for the next C++ Standard (the authors participated in its design) but there are important differences described in this article. (C) 2008 Elsevier B.V. All rights reserved.
The context-free grammars and parsers conventionally used to define and interpret concrete syntax lead to constrained expression notations. This paper gives algorithms which support less constrained, more intuitive no...
详细信息
The context-free grammars and parsers conventionally used to define and interpret concrete syntax lead to constrained expression notations. This paper gives algorithms which support less constrained, more intuitive notations. These algorithms can be viewed as context-sensitive parsers, where the context that is taken into account is the type structure of the expression. Or they can be viewed as type checkers that determine the form of the abstract syntax. The approach taken seamlessly integrates parsing and type-checking in the formalism of Markov algorithms. The interpretation of concrete syntax by these algorithms is unambiguous. At least one algorithm, DMA-T, is practical;its worst case time is 0(tn2) where n is the length of the expression and t is the maximum length of any type expression.
The classical process of partitioning an array into subarrays is extended to a more useful array language operation. Various modes of partitioning are defined for different types of arrays, so that subarrays may vary ...
详细信息
The classical process of partitioning an array into subarrays is extended to a more useful array language operation. Various modes of partitioning are defined for different types of arrays, so that subarrays may vary over the original array in a nearly arbitrary manner. These definitions are motivated with several realistic examples to illustrate the value of partitioning for array *** general interest is the data structure for partitioning. This consists of dynamic tree structures which are used to derive and maintain the array control information. These are described in sufficient detail to be of value in the design of other array languages. The description presented in this paper is implemented in a new array language, OL/2, currently under development at the University of Illinois.
SP/k is a compatible subset of the PL/I language that has been designed for teaching programming. The features of the SP/k language were chosen to encourage structured problem solving by computers, to make the languag...
详细信息
SP/k is a compatible subset of the PL/I language that has been designed for teaching programming. The features of the SP/k language were chosen to encourage structured problem solving by computers, to make the language easy to learn and use, to eliminate confusing and redundant constructs, and to make the language easy to compile. The resulting language is suitable for introducing programming concepts used in various applications, including business data processing, scientific calculations and non-numeric computation. SP/k is actually a sequence of language subsets called SP/1, SP/2, … SP/8. Each subset introduces new programminglanguage constructs while retaining all the constructs of preceding subsets. Each subset is precisely defined and can be learned or implemented without the following subsets.
A standard technique for monitoring software testing activities is to instrument the module under test with counters or probes before testing begins; then, during testing, data generated by these probes can be used to...
详细信息
A standard technique for monitoring software testing activities is to instrument the module under test with counters or probes before testing begins; then, during testing, data generated by these probes can be used to identify portions of as yet unexercised code. In this paper the effect of the disciplined use of language features for explicitly delimiting control flow constructs is investigated with respect to the corresponding ease of software instrumentation. In particular, assuming all control constructs are explicitly delimited, for example, by END IF or equivalent statements, an easily programmed method is given for inserting a minimum number of probes for monitoring statement and branch execution counts without disrupting source code structure or paragraphing. The use of these probes, called statement probes, is contrasted with the use of standard (branch) probes for execution monitoring. It is observed that the results apply to well-delimited modules written in a wide variety of programminglanguages, in particular, Ada.
Code optimization is characterized as a time versus space tradeoff. Space optimizations are further decomposed into static and dynamic categories. Using this characterization, the optimization requirements of a list p...
详细信息
Code optimization is characterized as a time versus space tradeoff. Space optimizations are further decomposed into static and dynamic categories. Using this characterization, the optimization requirements of a list processing language such as LISP are examined. Scrutiny of the structure of programs written in such a language reveals that traditional code optimization techniques have little benefit. Instead, a collection of low-level time and static space optimizations is seen to lead to a potential decrease in space and execution time. Dynamic space optimization is also examined in the context of reducing the frequency of occurrence of garbage collection. Alternatively, some language extensions are proposed which reduce the amount of storage that needs to be allocated, and hence may result in a decrease in the frequency of garbage collection.
暂无评论