首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 23 毫秒
1.
A class dictionary defines all data structures that appear in a program as well as a language for describing data specified by the data structures. We demonstrate that class dictionaries are ideal for simplifying object-oriented programming. Our class dictionary-based approach to object-oriented programming is independent of any particular programming language, so it is applicable to a large variety of object-oriented systems. The experience in designing and using over one hundred class dictionaries has resulted in a set of useful design techniques. This novel approach to object-oriented programming makes interesting links between language design, data structure design, and data-base design.  相似文献   

2.
The second of a series of papers on modern high-level programming languages for microprocessors introduces PASCAL, which was the first language to implement strong data typing and support for structured programming. The major language constructs — program structures, control structures, simple and structured data types etc. — are discussed with respect to their support for good software engineering practice. The development of a program to simulate the behaviour of a simple computer is outlined as a programming example.  相似文献   

3.
Extended unification algorithms are considered for the integration of a functional language into a logic programming language. The extended language is a particular case of logic programming language with equality. A comprehensive survey is given which is structured following the procedural semantics taken for the functional language. This survey includes past works based on evaluation and derivation (as procedural semantics of the functional language) and new algorithms based on surderivation. These algorithms are compared especially regarding their completeness. Also, we discuss issues arising in practice when different surderivation strategies are used, as these influence directly efficiency and especially termination. This leads us to propose an algorithm based on lazy surderivation which compares favorably with the others and endows logic programming with two advanced features of functional programming: automatic coroutining and handling of infinite data structures without extra control.  相似文献   

4.
5.
《Computer》1977,10(5):42-48
Since the expression is the fundamental building block of any programming language, its evaluation is an integral part of program compilation and execution. In particular, the evaluation techniques and data structures are determined by the class of expressions acceptable by the language. This paper serves as a framework for expression evaluation on a stack machine by presenting a set of optimized algorithms and internal data structures developed during the implementation of several compilers for the Hewlett-Packard computer systems.  相似文献   

6.
The procedural approach to data structures used in the SL5 programming language is described. The SL5 procedure mechanism forms the basis for this approach to data structures by treating procedures and their activation records (environments) as data objects and by decomposing the traditionally atomic operation of procedure invocation into more elementary components. The basic idea is that environments, since they are data objects, can also be used as data structures. The result is a single unified linguistic mechanism for constructing both procedures and data structures. Several examples are given.  相似文献   

7.
C语言凭借其丰富的数据结构、优良的机构性灵活性为电脑编程工作的人推崇学习。C语言作为一门基础课程,在高等院校计算机专业和很多的非计算机专业中开设,具有十分重要的作用和意义,它不仅能锻炼学生的思维逻辑能力,还为很多课程,如数据结构、单片机和其他程序设计语言打下良好的基础,具有引导性的作用。根据教学过程中学生常出现的问题,总结出了在C语言教学过程中的几点教学方法。  相似文献   

8.
Lloyd Allison 《Software》1989,19(2):99-109
A circular program creates a data structure whose computation depends upon itself or refers to itself. The technique is used to implement the classic data structures circular and doubly-linked lists, threaded trees and queues, in a functional programming language. These structures are normally thought to require updateable variables found in imperative languages. For example, a functional program to perform the breadth-first traversal of a tree is given. Some of the examples result in circular data structures when evaluated. Some examples are particularly space-efficient by avoiding the creation of intermediate temporary structures which would otherwise later become garbage. Lastly, the technique can be applied in an imperative language to give an elegant program.  相似文献   

9.
We provide a sequential denotational semantics for sequential programming languages, based on a new notion of sequential algorithm on the Kahn-Plotkin concrete data structures. Intuitively an algorithm may be seen either as a concrete object—a “program” in a simple output-driven language — or as an abstract object — the pair of a sequential function and of a computation strategy for it. The concrete and abstract presentations are equivalent, as shown by a representation theorem. The algorithms form a cartesian closed category with straightforward solutions to recursive domain equations. Hence they may replace functions in the denotational semantics of any sequential language. An applicative programming language based on sequential algorithms is presented in a companion paper.  相似文献   

10.
This paper describes an approach to teaching problem solving in an introductory programming course using the FORTRAN language. The course is oriented around a set of problems which are used to illustrate a problem solving methodology. Three pedagogic aids (data table, flow diagram, and program system chart) and two control structure extensions to the FORTRAN language are used in order to provide a more convenient framework in which students can practice good problem solving and programming techniques. The control structure extensions facilitate structured programming in FORTRAN. The use of the control structures and the pedagogic aids is illustrated in the solution of a simple statistics problem: the benefits derived from using these aids are also discussed.  相似文献   

11.
When applications must keep their data structures persistent, additional effort beyond transient modeling is necessary to realize suitable persistent storage. The most convenient approach is the use of a persistent programming language (PPL), which offers internal mechanisms for storing and loading data transparently for the application programmer. An alternative to a PPL is a universal programming language that has been extended by persistence concepts for any data typesThis paper introduces an extended generic mechanism that abstracts necessary functionality for realizing persistence of any C++ object structure. First, we discuss general problems of persistent storage and the motivation for this approach. The design aspects and the reasons for special features are described in detail with the data and implementation insides. Finally, we sketch the persistent data structure and present the integration of the library in three different example programs.  相似文献   

12.
Summary The concept of machine extension is a commonly used technique for implementing complex software: sets of object classes and operations on these objects are defined and used, often in a layered fashion, to construct the system. This paper addresses the adaptation of this technique to automatic programming. It discusses how such sets of data structures may be precisely specified, presents an axiomatization of a programming language suitable for machine verification, and shows how programs which realize these data structures may be proved correct. A range of data type classes is treated—including arrays, records, and pointers. Some new verification rules are presented to handle programs which use assignments and structured objects.  相似文献   

13.
Summary Many of the problems in programming languages today are a result of the model of computation offered by our machines. Structured programming combats these problems by restricting flow of control and storage references to a relatively safe set of control and data structures. Some current research attempts to aid programming reliability by enforcing such restrictions in the programming language. This paper proposes a simpler view of some basic language elements (variable, assignment, parameter), not based on our machines, that is safe without restriction. Structuring is then defined independently of what is being structured. A single, simple structure, applied to both values and assignments, yields equivalents for the safe set of data and control structures.This work was supported by the National Research Council of Canada  相似文献   

14.
The power and convenience of a programming language may be enhanced for certain applications by permitting treelike data structures to be defined by recursion. This paper suggests a pleasing notation by which such structures can be declared and processed; it gives the axioms which specify their properties, and suggests an efficient implementation method. It shows how a recursive data structure may be used to represent another data type, for example, a set. It then discusses two ways in which significant gains in efficiency can be made by selective updating of structures, and gives the relevant proof rules and hints for implementation. The examples show that a certain range of applications in symbol manipulation can be efficiently programmed without introducing the low-level concept of a reference into a high-level programming language.The work on this paper was supported in part by National Science Foundation under grant number GJ 36473X and ARPA Research Contract DAHC 15-73-0435.  相似文献   

15.
A new programming paradigm, an ontologic one, which is a developed paradigm of declarative programming, is described, as well as the data model the paradigm is based on and major language structures supported by examples.  相似文献   

16.
Various forms of data aggregates, e.g., arrays, lists, sets, etc., are usually provided by programming languages, either as primitive entities or as additional features made available by standard libraries. In conventional programming languages these data structures are usually specified by completely and precisely enumerating all their constituent elements. Conversely, in (constraint) logic programming languages it is common to deal with partially specified aggregates where either some elements or some parts of the aggregate are left unknown. In this paper we consider the case where partially specified aggregates can occur in a conventional O-O programming language. Specifically, we consider partially specified lists and sets as provided by the Java library JSetL. The definition of such data structures is strongly based on the notion of logical (or constrained) variable usually provided by languages and libraries to support constraint programming. We show through simple examples using Java and JSetL how partially specified lists and sets, along with a few basic constraints over them, can be conveniently exploited in a number of common programming problems.  相似文献   

17.
In object programming languages, the Visitor design pattern allows separation of algorithms and data structures. When applying this pattern to tree‐like structures, programmers are always confronted with the difficulty of making their code evolve. One reason is that the code implementing the algorithm is interwound with the code implementing the traversal inside the visitor. When implementing algorithms such as data analyses or transformations, encoding the traversal directly into the algorithm turns out to be cumbersome as this type of algorithm only focuses on a small part of the data‐structure model (e.g., program optimization). Unfortunately, typed programming languages like Java do not offer simple solutions for expressing generic traversals. Rewrite‐based languages like ELAN or Stratego have introduced the notion of strategies to express both generic traversal and rule application control in a declarative way. Starting from this approach, our goal was to make the notion of strategic programming available in a widely used language such as Java and thus to offer generic traversals in typed Java structures. In this paper, we present the strategy language SL that provides programming support for strategies in Java. Copyright © 2012 John Wiley & Sons, Ltd.  相似文献   

18.
STAPLE is a structured programming language with nested block structure in the source language to indicate flow of control. The semantics of the non-control structures are essentially the same as FORTRAN. The design goals were an easily implemented, easily modified tool for experiments and demonstrations of structured versus unstructured programming techniques.  相似文献   

19.
The computer code SEARCH-1 for the optimal design of steel structures is described. The algorithm is based on a gradient projection method with step correction of active constraint violations. The optimal design of prestressed steel structures is considered. Four numerical examples are presented. The programming language is presented. The programming language is FORTRAN-77, an IBM-PC/XT/AT with 512 K memory is required.  相似文献   

20.
Agent Programming in 3APL   总被引:8,自引:3,他引:5  
An intriguing and relatively new metaphor in the programming community is that of an intelligent agent. The idea is to view programs as intelligent agents acting on our behalf. By using the metaphor of intelligent agents the programmer views programs as entities which have a mental state consisting of beliefs and goals. The computational behaviour of an agent is explained in terms of the decisions the agent makes on the basis of its mental state. It is assumed that this way of looking at programs may enhance the design and development of complex computational systems.To support this new style of programming, we propose the agent programming language 3APL. 3APL has a clear and formally defined semantics. The operational semantics of the language is defined by means of transition systems. 3APL is a combination of imperative and logic programming. From imperative programming the language inherits the full range of regular programming constructs, including recursive procedures, and a notion of state-based computation. States of agents, however, are belief or knowledge bases, which are different from the usual variable assignments of imperative programming. From logic programming, the language inherits the proof as computation model as a basic means of computation for querying the belief base of an agent. These features are well-understood and provide a solid basis for a structured agent programming language. Moreover, on top of that 3APL agents use so-called practical reasoning rules which extend the familiar recursive rules of imperative programming in several ways. Practical reasoning rules can be used to monitor and revise the goals of an agent, and provide an agent with reflective capabilities.Applying the metaphor of intelligent agents means taking a design stance. From this perspective, a program is taken as an entity with a mental state, which acts pro-actively and reactively, and has reflective capabilities. We illustrate how the metaphor of intelligent agents is supported by the programming language. We also discuss the design of control structures for rule-based agent languages. A control structure provides a solution to the problem of which goals and which rules an agent should select. We provide a concrete and intuitive ordering on the practical reasoning rules on which such a selection mechanism can be based. The ordering is based on the metaphor of intelligent agents. Furthermore, we provide a language with a formal semantics for programming control structures. The main idea is not to integrate this language into the agent language itself, but to provide the facilities for programming control structures at a meta level. The operational semantics is accordingly specified at the meta level, by means of a meta transition system.  相似文献   

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

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