A constructive method of program development is presented. It seeks to unify two important ideas about program development. Namely that programming is a goal-oriented activity and that there should be a correspondence...
详细信息
A constructive method of program development is presented. It seeks to unify two important ideas about program development. Namely that programming is a goal-oriented activity and that there should be a correspondence between data and program structures. The latter concept is seen to be extensible beyond the data processing context in which it was originally proposed. Induction provides the vehicle for program development by stepwise refinement, with the final program being constructed by application of a sequence of progressively more powerful generalizations. The design process employed guarantees the correctness of the final program provided that each of the refinement steps have been correctly taken. The method is illustrated by a number of samples.
A methodology for constructing distributed programs is presented that is different from existing methodologies. It is based on the well-known notion of developing distributed programs via synchronous and centralized ...
详细信息
A methodology for constructing distributed programs is presented that is different from existing methodologies. It is based on the well-known notion of developing distributed programs via synchronous and centralized programs. The distinguishing features of the methodology are: 1. Specification includes process structure data, and distributed programs are developed taking this information into account. 2. A new class of programs, called programs with processes involving shared actions, is employed in the development process. 3. A transformational approach is suggested to solve the problems inherent in the method of developing distributed programs through synchronous and centralized programs. The proposed methodology has been applied to many standard problems and found to be very useful.
Datatype-generic programs are programs that are parameterised by a datatype. We review the allegorical foundations of a methodology of designing datatype-generic programs. The notion of F-reductivity, where F parametr...
详细信息
Datatype-generic programs are programs that are parameterised by a datatype. We review the allegorical foundations of a methodology of designing datatype-generic programs. The notion of F-reductivity, where F parametrises a datatype, is reviewed and a number of its properties are presented. The properties are used to give concise, effective proofs of termination of a number of datatype-generic programming schemas. The paper concludes with a concise proof of the well-foundedness of a datatype-generic occurs-in relation.
Emerald is a general-purpose language with aspects of traditional object-oriented languages, such as Smalltalk, and abstract data type languages, such as Modula-2 and Ada. It is strongly typed with a nontraditional ob...
详细信息
Emerald is a general-purpose language with aspects of traditional object-oriented languages, such as Smalltalk, and abstract data type languages, such as Modula-2 and Ada. It is strongly typed with a nontraditional object model and type system that emphasize abstract types, allow separation of typing and implementation, and provide the flexibility of polymorphism and subtyping with compile-time checking. This paper describes the Emerald language and its programming methodology. We give examples that demonstrate Emerald's features, and compare and contrast the Emerald approach to programming with the approaches used in other similar languages.
In Pettorossi and Skowron (1983) a recursive-equations language is introduced. Its operational semantics is specified by means of computing agents which communicate and exchange messages. Those communications are, so ...
详细信息
In Pettorossi and Skowron (1983) a recursive-equations language is introduced. Its operational semantics is specified by means of computing agents which communicate and exchange messages. Those communications are, so to speak, zero-order, in the sense that the exchanged messages are values of a data structure, possibly defined by the programmer.
In this paper we extend that approach and we consider also ‘higher-order’ communications by allowing the exchange of agents behaviours, i.e. sets of computations, among computing agents. This extension leads to a new programming methodology which makes use of proofs of computing agents behaviours and their related strategies.
In answer set programming (ASP), a problem at hand is solved by (i) writing a logic program whose answer sets correspond to the solutions of the problem, and by (ii) computing the answer sets of the program using an a...
详细信息
In answer set programming (ASP), a problem at hand is solved by (i) writing a logic program whose answer sets correspond to the solutions of the problem, and by (ii) computing the answer sets of the program using an answer set solver as a search engine. Typically, a programmer creates a series of gradually improving logic programs for a particular problem when optimizing program length and execution time on a particular solver. This leads the programmer to a meta-level problem of ensuring that the programs are equivalent, i.e., they give rise to the same answer sets. To case answer set programming at methodological level, we propose a translation-based method for verifying the equivalence of logic programs. The basic idea is to translate logic programs P and Q under consideration into a single logic program EQT(P,Q) whose answer sets (if such exist) yield counter-examples to the equivalence of P and Q. The method is developed here in a slightly more general setting by taking the visibility of atoms properly into account when comparing answer sets. The translation-based approach presented in the paper has been implemented as a translator called LPEQ that enables the verification of weak equivalence within the SMODELS system using the same search engine as for the search of models. Our experiments with LPEQ and SMODELS suggest that establishing the equivalence of logic programs in this way is in certain cases much faster than naive cross-checking of answer sets.
Because large-scale software development is a struggle against internal program complexity, the modules into which programs are separated play an important role in software engineering. A module that encapsulates a da...
详细信息
Because large-scale software development is a struggle against internal program complexity, the modules into which programs are separated play an important role in software engineering. A module that encapsulates a data type permits the programmer to ignore both the details of its operations and of its value representations. It is a primary strength of program proving that, as modules divide a program and make it easier to understand, so do they divide its proof. Each module can be verified in isolation, then its internal details can be ignored in a proof of its use. Proofs of module abstractions that are based on functional semantics are described and, this is contrasted with the Alphard formalism based on Hoare logic.
In mathematical circles, there is the overall opinion that formulae, in their capacity of syntactic units, are dead things, and that formula manipulation tears the heart out of mathematics. In these circles, formulae ...
详细信息
In mathematical circles, there is the overall opinion that formulae, in their capacity of syntactic units, are dead things, and that formula manipulation tears the heart out of mathematics. In these circles, formulae largely live by virtue of what they stand for, of what they mean, of how they feel and appeal to our intuition-our(?) intuition? And their meanings then tell which formulae to consider next. Poor Leibniz, poor Lagrange, poor Boole, poor Hilbert, and all others who shifted their attention towards uninterpreted formulae manipulation: they were all wrong, weren't they? Oh, and poor we, Edsger W. Dijkstra and all those programmers who converted themselves to formulae manipulators, because their profession demanded it. (This cultural gap in doing mathematics was once expressed quite aptly by Dijkstra when he remarked, "Ik hou van wiskunde, maar spaar me de mathematen". [''I love mathematics, but it's the mathematicians I cannot stand'.]) Well, our profession of programming demanded a conscious and active engagement in formula manipulation and therefore we entered that field of endeavour;and we learned how mighty and powerful, how prosperous and effective, and how indicative of designing this change in attitude turned out to be, not only for the benefit of programming, but for vast parts of mathematics as well. And moreover, we learned to enjoy the activity. In this note we try to convey the effectiveness and joy of formula manipulation through a small number of simple examples from both mathematics and programming. (C) 2001 Elsevier Science B.V. All rights reserved.
Many functions on context-free languages can be expressed in the form of the least fixed point of a function whose definition mimics the grammar of the given language. Examples include the function returning the lengt...
详细信息
Many functions on context-free languages can be expressed in the form of the least fixed point of a function whose definition mimics the grammar of the given language. Examples include the function returning the length of the shortest word in a language, and the function returning the smallest number of edit operations required to transform a given word into a word in a language. This paper presents the basic theory that explains when a function on a context-free language can be defined in this way. It is shown how the theory can be applied in a methodology for programming the evaluation of such functions. Specific results include a novel definition of a regular algebra focusing on the existence of so-called "factors", and several constructions of non-trivial regular algebras. Several challenging problems are given as examples, some of which are old and some of which are new. (c) 2005 Elsevier Inc. All rights reserved.
Algorithms that deal with arrays in a complicated fashion are either explained informally in terms of pictures, explained more formally but with overwhelming details, or not explained at all. An attempt is made to pr...
详细信息
Algorithms that deal with arrays in a complicated fashion are either explained informally in terms of pictures, explained more formally but with overwhelming details, or not explained at all. An attempt is made to present some notations and concepts to make the development and proof of one such algorithm more appealing and convincing. The algorithm is developed for the in-situ inversion of a cyclic permutation represented in an array. The ring is introduced as a suitable representation of a cyclic permutation since conventional representations of cyclic permutations are not suited to manipulative needs. For the sake of manageability, few elements of rings should have a name, in contrast to the conventional notations for rings in which each element is named and in which even a simple rule becomes awkward to formulate. The exercise confirms that, in designing algorithms, the development of adequate mathematical notations is a key issue that is hardly addressed by traditional mathematics.
暂无评论