Ness(ID:2727/nes002)

Embedded Language in Andrew Toolkit 


Embedded Algebraic Language in Andrew Toolkit
- features subsequence algebra for string representation



Structures:
References:
  • Hansen, Wilfred J. "The Computational Power of an Algebra for Subsequences", CMU-ITC-083, Information Technology Center, Carnegie-Mellon Univ., 1989. view details
  • Wilfred J. Hansen, "Ness Language Reference Manual", available on X-windows distribution tape as .../contrib/andrew/atk/ness/doc/nessman.d, Information Technology Center, Carnegie-Mellon Univ., 1989. view details
  • Hansen, Wilfred J. "Programming Language Support for Multi-Media Strings with an Algebra for Subsequences" CMU 27 February 1990 view details Abstract: String constants and expressions are a basic data type in most programming languages, but these facilities have not yet evolved to cope with today's rich range of string contents: typographic information, letters from non-English alphabets, and embedded pictures, spreadsheets, and other objects. This paper catalogs the options for string facilities in programming languages and presents a new algebra for subsequences that supports string operations. With it programs can directly refer to any subsequence of a string or other sequence. This is especially natural for passing substrings to functions and returning results; for instance, a pattern matching function can return a single substring value from which the caller can access both the string that was matched and its surrounding text. Examples are given in Ness, an experimental language incorporating the algebra. External link: online copy
  • Hansen, Wilfred J., "Enhancing documents with embedded programs: How Ness extends insets in the Andrew ToolKit" view details
          in Proceedings of 1990 International Conference on Computer Languages (ICCL), March 12-15, 1990, New Orleans, IEEE Computer Society Press (Los Alamitos, CA, 1990), view details
  • Hansen, Wilfred J., "Enhancing documents with embedded programs: How Ness extends insets in the Andrew ToolKit" view details
          in Proceedings of 1990 International Conference on Computer Languages (ICCL), March 12-15, 1990, New Orleans, IEEE Computer Society Press (Los Alamitos, CA, 1990), view details
  • Hansen, Wilfred "A Subsequence Algebra: First Class Values for Substrings" view details Abstract: Strings are a basic data type in most programming languages, but substrings are seldom accorded first class status on a par with, say, integers. Substrings are important as the result of search and parsing algorithms since the calling routine may need to access both the matched substring and adjacent text or punctuation. To promote substrings, this paper describes a new algebra for subsequences which, when specialized to substrings, yields appropriately first class values. The key idea is that the basic data type is not sequences or references to positions in sequences, but rather references to subsequences. Primitive operations for the algebra are constants, concatenation, and four new functions--base, start, next, and extent--which map subsequence references to subsequence references.
    This paper informally presents the algebra, shows that it is sufficient to define search functions, and then contrasts it with other models of substring values. Later sections of the paper contrast various models of substring values, show how the subsequence algebra can be concisely implemented, and touch on the many other aspects and advantages of the algebra. Examples are given in Ness, a language incorporating the algebra which is implemented as part of the Andrew Toolkit.
          in Proceedings of 1990 International Conference on Computer Languages (ICCL), March 12-15, 1990, New Orleans, IEEE Computer Society Press (Los Alamitos, CA, 1990), view details
  • Hansen, Wilfred J. "Subsequence References: First-Class Values for Substrings" ACM Trans. Programming Languages and Systems, 14 (4), Oct., 1992, pp. 471-489. view details Abstract: Arrays of characters are a basic data type in many programming languages, 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 Toolkit.

    Extract: ct and Ness
    The subsequence reference data type has been implemented in two languages: Ness [Hansen, 1989b; Hansen, 1990] and cT [CDEC, 1989]. Both were originally implemented under the Andrew Toolkit (ATK) [Morris, 1986; Palay, 1988], although cT has recently been re-implemented. The capability range of ATK is illustrated by this paper: a single file with various embedded objects created using ATK's ez text editor. Examples below are given in Ness, the implementation of which permits typographic styling and embedded objects in program text and constants; the program fragments below were compiled and executed with the styles as shown.

          in Proceedings of 1990 International Conference on Computer Languages (ICCL), March 12-15, 1990, New Orleans, IEEE Computer Society Press (Los Alamitos, CA, 1990), view details