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.
High-level languages operating through interpreters have performed satisfactorily in small applications. However, as applications grow, it becomes necessary to find means to adapt these languages to execute in less s...
详细信息
High-level languages operating through interpreters have performed satisfactorily in small applications. However, as applications grow, it becomes necessary to find means to adapt these languages to execute in less space and in less time. In list processing systems, much of the program execution time is spent setting up linkages between functions and for recursion. By optimizing the linkages and expediting the recursion, these programs can execute much faster. Also, the calling sequences can be adapted in such a fashion that some of the parameters will be already in the accumulators at the time the call is issued. As regards execution space, the language LISP, for example, allocates storage whenever a CONS operation is performed. An examination is made of dynamic space optimization in the context of reducing the frequency of occurrence of garbage collection. Some language extensions are proposed which lessen the amount of storage which needs to be allocated and hence, may result in a decrease in the frequency of garbage collection.
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 varity of programminglanguages, in particular, Ada.
A design for a separate compilation facility for the SIMULA 67 programminglanguage is presented. The paper explores the problems with existing separate compilation schemes, and proposes a new scheme that allows top-d...
详细信息
A design for a separate compilation facility for the SIMULA 67 programminglanguage is presented. The paper explores the problems with existing separate compilation schemes, and proposes a new scheme that allows top-down, bottom-up, or even parallel development and integration of program modules. An evaluation of the proposal and a discussion of its applicability to other languages are then given.
This paper describes the considerations behind the design of the programminglanguage Edison including the reasons why a large number of well-known language featuges were excluded. It also discusses the linguistic pro...
详细信息
This paper describes the considerations behind the design of the programminglanguage Edison including the reasons why a large number of well-known language featuges were excluded. It also discusses the linguistic problems of writing a concise language report.
Reduction rules in Interaction Nets are constrained to pattern match exactly one argument at a time. Consequently, a programmer has to introduce auxiliary rules to perform more sophisticated matches. We propose an ext...
详细信息
Reduction rules in Interaction Nets are constrained to pattern match exactly one argument at a time. Consequently, a programmer has to introduce auxiliary rules to perform more sophisticated matches. We propose an extension of Interaction Nets which facilitates nested pattern matching on interaction rules. We then define a practical compilation scheme from extended rules to pure interaction rules. We achieve a system that provides convenient ways to express Interaction Net programs without defining auxiliary rules.
Scope delimiters, such as BEGIN-END or DO-END, are used in many programminglanguages, but they can lengthen and clutter a program listing. This paper provides experimental evidence that ENDIF or ENDWHILE statement te...
详细信息
Scope delimiters, such as BEGIN-END or DO-END, are used in many programminglanguages, but they can lengthen and clutter a program listing. This paper provides experimental evidence that ENDIF or ENDWHILE statement terminators make for easier to comprehend programs than BEGIN-END pairs surrounding compound statements.
Quantum algorithms often apply classical operations, such as arithmetic or predicate checks, over a quantum superposition of classical data;these so-called oracles are often the largest components of a quantum program...
详细信息
Quantum algorithms often apply classical operations, such as arithmetic or predicate checks, over a quantum superposition of classical data;these so-called oracles are often the largest components of a quantum program. To ease the construction of efficient, correct oracle functions, this paper presents VQO, a high-assurance framework implemented with the Coq proof assistant. The core of VQO is OQASM, the oracle quantum assembly language. OQASM operations move qubits between two different bases via the quantum Fourier transform, thus admitting important optimizations, but without inducing entanglement and the exponential blowup that comes with it. OQASM's design enabled us to prove correct VQO's compilers-from a simple imperative language called OQIMP to OQASM, and from OQASM to sqir, a general-purpose quantum assembly language-and allowed us to efficiently test properties of OQASM programs using the QuickChick property-based testing framework. We have used VQO to implement a variety of arithmetic and geometric operators that are building blocks for important oracles, including those used in Shor's and Grover's algorithms. We found that VQO's QFT-based arithmetic oracles require fewer qubits, sometimes substantially fewer, than those constructed using "classical" gates;VQO's versions of the latter were nevertheless on par with or better than (in terms of both qubit and gate counts) oracles produced by Quipper, a state-of-the-art but unverified quantum programming platform.
Most current approaches to mechanical program verification transform a program and its specifications into first-order formulas and try to prove these formulas valid. Since the first-order predicate calculus is not de...
详细信息
Most current approaches to mechanical program verification transform a program and its specifications into first-order formulas and try to prove these formulas valid. Since the first-order predicate calculus is not decidable, such approaches are inherently limited. This paper proposes an alternative approach to program verification: correctness proofs are constructively established by proof justifications written in an algorithmic notation. These proof justifications are written as part of the program, along with the executable code and correctness specifications. A notation is presented in which code, specifications, and justifications are interwoven. For example, if a program contains a specification 3x P(x), the program also contains a justification that exhibits the particulat value of x that makes P true. Analogously, justifications may be used to state how universally quantified formulas are to be instantiated when they are used as hypotheses. Programs so justifiled may be verified by proving quantifier-free formulas. Additional classes of justifications serve related ends. Formally, justifications reduce correctness to a decidable theory. Informally, justifications establish the connection between the executable code and correctness specifications, documenting the reasoning on which the correctness is based.
Functional programminglanguages typically support expressive pattern-matching syntax allowing programmers to write concise and type-safe code, especially appropriate for manipulating algebraic data types. Many featur...
详细信息
Functional programminglanguages typically support expressive pattern-matching syntax allowing programmers to write concise and type-safe code, especially appropriate for manipulating algebraic data types. Many features have been proposed to enhance the expressiveness of stock pattern-matching syntax, such as pattern bindings, pattern alternatives (a.k.a. disjunction), pattern conjunction, view patterns, pattern guards, pattern synonyms, active patterns, 'if-let' patterns, multi-way if-expressions, etc. In this paper, we propose a new pattern-matching syntax that is both more expressive and (we argue) simpler and more readable than previous alternatives. Our syntax supports parallel and nested matches interleaved with computations and intermediate bindings. This is achieved through a form of nested multi-way if-expressions with a condition-splitting mechanism to factor common conditional prefixes as well as a binding technique we call conditional pattern flowing. We motivate this new syntax with many examples in the setting of MLscript, a new ML-family programminglanguage. We describe a straightforward desugaring pass from our rich source syntax into a minimal core syntax that only supports flat patterns and has an intuitive small-step semantics. We then provide a translation from the core syntax into a normalized syntax without backtracking, which is more amenable to coverage checking and compilation, and formally prove that our translation is semantics-preserving. We view this work as a step towards rethinking pattern matching to make it more powerful and natural to use. Our syntax can easily be integrated, in part or in whole, into existing as well as future programming language designs.
暂无评论