首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 0 毫秒
1.
This paper deals with design considerations and implementation of a program structuring preprocessor for a macro assembly language. The macro assembly language is used for writing the code generation pass of a compiler. Macro instructions become lengthy, tedious and cumbersome when they incorporate some mild code improvement. This is chiefly because the macro assembly language lacks an adequate program structuring facility. Program structuring is a great help in improving ease of programming and the under-standability of the expansion control statements of a macro instruction in such a kind of programming. Considerations on the design of the source language and the outline of implementation are described. The design objective is ease of implementation and ease of use, and is fairly well satisfied by the language.  相似文献   

2.
M. T. Harandi 《Software》1983,13(9):825-846
Although COBOL lacks many features required to support structured programming, it can be used to simulate reasonably well-structured programs. This simulation is particularly important for restructuring of poorly structured old programs. This paper describes the formulation of and experiments with a practical methodology for conversion of unstructured COBOL programs into reasonably well-structured equivalents. The discussion includes the overview of an automatic COBOL restructuring system, the results of an experiment with this system and an interpretation of these results.  相似文献   

3.
Of the very few practical implementations of program slicing algorithms, the majority deal with C/C++ programs. Yet, preprocessor-related issues have been marginally addressed by these slicers, despite the fact that ignoring (or only partially handling) these constructs may lead to serious inaccuracies in the slicing results and hence in the program analysis task being performed. Recently, an accurate slicing method for preprocessor-related constructs has been proposed, which-when combined with existing C/C++ language slicers-can provide more complete slices and hence a more successful analysis of programs written in one of these languages. In this paper, we present our approach which combines the two slicing methods and, via practical experiments, describe its benefits in terms of the completeness of the resulting slices.  相似文献   

4.
We present a logic-based programming language that features meta-level composition operations over programs. Object programs are parameterised named collections of definite clauses which may contain formulae of the form A in Pexp, where A is a standard atomic formula and Pexp is a program expression obtained by applying composition operations over named object programs. The semantics of the language is presented in two different equivalent styles. An operational, top-down semantics is given by means of inference rules, while a denotational, bottom-up semantics is given via an immediate consequence operator associated with program expressions. A meta-programming implementation of the language is also presented by transforming the operational inference rules into meta-level axioms. Several programming examples are discussed to illustrate the expressive power of the language.  相似文献   

5.
6.
Formal properties of logic languages are largely studied; however, their impact on the practice of software design and programming is currently minimal. In this paper we survey some interesting representatives of the family of logic languages aiming at comparing the different capabilities they offer for designing and programming parallel systems. The logic languages Prolog, Aurora, Flat Concurrent Prolog, Parlog, GHC, and DeltaProlog were chosen, because a suitable set of relevant examples has been published, mostly by the language designers themselves. A number of sample programs is used to expose and compare the languages with respect to their object oriented programming capabilities for multiprocess coordination, interprocess communication, and resource management. Special attention is devoted also to metaprogramming as well, seen as a useful technique for specifying and building the operating environments of the languages themselves. The paper ends with a discussion on positive and negative features found comparing these languages, and indicates some guidelines to be followed in the design of new logic languages.  相似文献   

7.
This paper expands upon work begun in [Tho89], in building a logic for the Miranda functional programming language. After summarising the work in that paper, a translation of Miranda definitions into logical formulas is presented, and illustrated by means of examples. This work expands upon [Tho89] in giving a complete treatment of sequences of equations, and by examining how to translate the local definitions introduced by where clauses.The status of the logic is then examined, and it is argued that the logic extends a natural operational semantics of Miranda, given by the translations of definitions into conditional equations.Finally it is shown how the logic can be implemented in the Isabelle proof tool.Miranda is a trade mark of Research Software Ltd.  相似文献   

8.
In this paper we propose a new generic scheme CFLP풟, intended as a logical and semantic framework for lazy Constraint Functional Logic Programming over a parametrically given constraint domain 풟. As in the case of the well known CLP풟 scheme for Constraint Logic Programming, 풟 is assumed to provide domain specific data values and constraints. CFLP풟 programs are presented as sets of constrained rewrite rules that define the behavior of possibly higher order and/or non-deterministic lazy functions over 풟. As a main novelty w.r.t. previous related work, we present a Constraint Rewriting Logic CRWL풟 which provides a declarative semantics for CFLP풟 programs. This logic relies on a new formalization of constraint domains and program interpretations, which allows a flexible combination of domain specific data values and user defined data constructors, as well as a functional view of constraints. This research has been partially supported by the Spanish National Projects MELODIAS (TIC2002-01167), MERIT-FORMS (TIN2005-09207-C03-03) and PROMESAS-CAM (S-0505/TIC/0407).  相似文献   

9.
In a previous paper (Blair et al. 2001), the authors showed that the mechanism underlying Logic Programming can be extended to handle the situation where the atoms are interpreted as subsets of a given space X. The view of a logic program as a one-step consequence operator along with the concepts of supported and stable model can be transferred to such situations. In this paper, we show that we can further extend this paradigm by creating a new one-step consequence operator by composing the old one-step consequence operator with a monotonic idempotent operator (miop) in the space of all subsets of X, 2 X . We call this extension set based logic programming. We show that such a set based formalism for logic programming naturally supports a variety of options. For example, if the underlying space has a topology, one can insist that the new one-step consequence operator always produces a closed set or always produces an open set. The flexibility inherent in the semantics of set based logic programs is due to both the range of natural choices available for specifying the semantics of negation, as well as the role of monotonic idempotent operators (miops) as parameters in the semantics. This leads to a natural type of polymorphism for logic programming, i.e. the same logic program can produce a variety of outcomes depending on the miop associated with the semantics. We develop a general framework for set based programming involving miops. Among the applications, we obtain integer-based representations of real continuous functions as stable models of a set based logic program.   相似文献   

10.
O. K. Ferstl  E. J. Sinz 《Software》1982,12(5):455-474
COBOL is now more than 20 years old and will probably survive to become much older. Since it has some features which are out of date it is desirable to adapt at least the program style to some standards of modern programming languages. The adaption is not only a matter of style but also of costs of program production and program maintenance. This paper presents constructional rules for programming in COBOL which by-pass some of the drawbacks and allow more readable and more maintainable program structures. Finally a postprocessor is presented, that allows verification of the chosen constructional rules and documentation of the resulting programs.  相似文献   

11.
In this paper, we present an extension to PROLOG we call DISLOG which is designed to deal with relations between non-contiguous elements in a structure. This extension turns out to be well suited for syntactic analysis of natural and artificial languages. It is also well adapted to express traversal constraints in applications such as planning and expert systems and deductive systems involving, for example, temporal reasoning, DISLOG belongs to the constrained logic programming paradigm and turns out to be more declarative, transparent, and simple than PROLOG to deal with longdistance relations.  相似文献   

12.
In this paper, we investigate the feasibility of applying logic programming to structured design. We propose to use Prolog as a common machinery for the representation of various structured tools. We illustrate through examples how to produce structure charts from data flow diagrams, and evaluate them according to commonly recommended design guidelines. If the structure charts produced are not satisfactory, the inherent backtracking mechanism in Prolog will help to produce other versions for further evaluation.  相似文献   

13.
Logic Programs with Annotated Disjunctions (LPADs) provide a simple and elegant framework for representing probabilistic knowledge in logic programming. In this paper we consider the problem of learning ground LPADs starting from a set of interpretations annotated with their probability. We present the system ALLPAD for solving this problem. ALLPAD modifies the previous system LLPAD in order to tackle real world learning problems more effectively. This is achieved by looking for an approximate solution rather than a perfect one. A number of experiments have been performed on real and artificial data for evaluating ALLPAD, showing the feasibility of the approach. Editors: Stephen Muggleton, Ramon Otero, Simon Colton.  相似文献   

14.
One of the techniques employed by programmers during the development process is the use of code and design conventions. These are rules‐of‐thumb or best practices that improve the maintainability of software applications. In general, these conventions are maintained manually by the programmer since automated support is usually restricted to the automatic generation of code. However, the late discovery of convention errors can result in significant costs due to the effort required to correct them. In order to facilitate the early detection of these errors, the Practical Preprocessor for Programming Conventions system, P³ (pronounced P3),is proposed. This tool acts as a preprocessor to the Java compiler by providing facilities for the maintenance of specific object‐oriented code conventions and design principles during the creation of Java programs. This paper presents the design and implementation of the P³ system and also the practical experience of using this facility in a University programming environment. Copyright © 2002 John Wiley & Sons, Ltd.  相似文献   

15.
16.
General principles of structured programming, and practical aspects of applying those principles within the programming language PL/I, are discussed. Suitable extensions (and contractions) of that language are suggested.  相似文献   

17.
Narrowing is a computation implemented by some declarative programming languages. Research in the last decade has produced significant results on the theory and foundation of narrowing, but little has been published on the use of narrowing in programming. This paper introduces narrowing from a programmer’s viewpoint; shows, by means of examples, when, why and how to use narrowing in a program; and discusses the impact of narrowing on software development activities such as design and maintenance. The examples are coded in the programming language Curry, which provides narrowing as a first class feature.  相似文献   

18.
Interaction nets were introduced almost 15 years ago. Since then they have been put forward as both a graphical programming paradigm and as an intermediate language into which we can compile other languages. Whichever way we use interaction nets, a problem remains in that the language is very primitive. Drawing an analogy with functional programming, we have the λ-calculus but we are missing the functional programming language: syntactic sugar, language constructs, data-structures, etc. The purpose of this paper is to make a first step towards defining such a programming language for interaction nets.  相似文献   

19.
J. W. Hughes 《Software》1979,9(3):191-202
The key to Jackson's Program Design Method is the definition of the inputs and outputs of a program as labelled trees and the recognition of a correspondence between them. This paper gives a more formal definition of the trees and the correspondence. These definitions are then used to explain his basic method and methods for ‘structure clashes’ by reference to formal language theory.  相似文献   

20.
Ben Shneidebman 《Software》1976,6(4):555-567
The proliferation of papers on programming methodology focus on the program development process but only hint at the form of the final program. This paper distinguishes between the development process and the program product and presents a catalogue of possible program organizations and data structures with examples drawn from the published literature. The methods for sharing data among modules and a classification scheme for programs and data structures is presented.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号