首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes on demand. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented and functional programming language. The result is a small, lightweight attribute grammar library that is part of our larger Kiama language processing library. Kiama’s attribute grammar library supports a range of advanced features including cached, uncached, higher order, parameterised and circular attributes. Forwarding is available to modularise higher order attributes and decorators abstract away from the details of attribute value propagation. Kiama also implements new techniques for dynamic extension and variation of attribute equations. We use the Scala programming language because of its support for domain-specific notations and emphasis on scalability. Unlike generators with specialised notation, Kiama attribute grammars use standard Scala notations such as pattern-matching functions for equations, traits and mixins for composition and implicit parameters for forwarding. A benchmarking exercise shows that our approach is practical for realistic language processing.  相似文献   

2.
More and more aspects of concurrency and concurrent programming are becoming part of mainstream programming and software engineering, due to several factors such as the widespread availability of multi-core/parallel architectures and Internet-based systems. This leads to the extension of mainstream object-oriented programming languages and platforms-Java is a main example-with libraries providing fine-grained mechanisms and idioms to support concurrent programming, in particular for building efficient programs. Besides this fine-grained support, a main research goal in this context is to devise higher-level, coarse-grained abstractions that would help building concurrent programs, as pure object-oriented abstractions help building large component-based programs. To this end, in this paper we present simpA, a Java-based framework that provides programmers with agent-oriented abstractions on top of the basic OO layer, as a means to organize and structure concurrent applications. We first describe the application programming interface (API) and annotation framework provided to Java programmers for building simpA applications, and then we discuss the main features of the approach from a software engineering point of view, by showing some programming examples. Finally, we define an operational semantics formalizing the main aspects of this programming model.  相似文献   

3.
Distributed and concurrent object-oriented systems are difficult to analyze due to the complexity of their concurrency, communication, and synchronization mechanisms. Rather than performing analysis at the level of code in, e.g., Java or C++, we consider the analysis of such systems at the level of an abstract, executable modeling language. This language, based on concurrent objects communicating by asynchronous method calls, avoids some difficulties of mainstream object-oriented programming languages related to compositionality and aliasing. To facilitate system analysis, compositional verification systems are needed, which allow components to be analyzed independently of their environment. In this paper, a proof system for partial correctness reasoning is established based on communication histories and class invariants. A particular feature of our approach is that the alphabets of different objects are completely disjoint. Compared to related work, this allows the formulation of a much simpler Hoare-style proof system and reduces reasoning complexity by significantly simplifying formulas in terms of the number of needed quantifiers. The soundness and relative completeness of this proof system are shown using a transformational approach from a sequential language with a non-deterministic assignment operator.  相似文献   

4.
5.
SINA is an object-oriented language for distributed and concurrent programming. The primary focus of this paper is on the object-oriented concurrent programming mechanisms of SINA and their implementation. This paper presents the SINA constructs for concurrent programming and inter-object communication, some illustrative examples and a message-based implementation model for SINA that we have used in our current implementation.  相似文献   

6.
Three notations for concurrent programming are compared, namely CSP, Ada, and monitors. CSP is an experimental language for exploring structuring concepts in concurrent programming. Ada is a general-purpose language with concurrent programming facilities. Monitors are a construct for managing access by concurrent processes to shared resources. We start by comparing "lower-level" communication, synchronization, and nondeterminism in CSP and Ada and then examine "higher-level" module interface properties of Ada tasks and monitors.  相似文献   

7.
面向对象模型潜在的并发计算能力为并发程序设计提供了更高层次的解决方案。为了充分利用这种潜在的并发招行能力,必须在对象模型中显式地给出并发控制。本文给出了一种描述并发对象的机制,即:把对象的并发控制作为对象的单独属性进行描述,在定义子类时,把对象的并发描述与对象的方法分开进行继承。我们的目标是使得引进的并发机制尽量少地与对象模型的各个重要特性相冲突,减轻继承异常。另外,我们提出的并发模型允许对象内部的并发。  相似文献   

8.
Several styles and notations for representing concurrent programs are shortly explained and related to each other. It is basically demonstrated how the different language concepts found in concurrent programming conceptually evolve from classical styles of functional and applicative programming.  相似文献   

9.
10.
Concurrent programming is more difficult to use and understand than sequential programming. In order to simplify this type of programming a number of approaches have been developed such as visual programming. Visual Occam (VISO) is a visual programming language for concurrent programming. It has a graphical syntax based on the language Occam and its semantics is represented both in petri net and process calculus. This paper presents a modular visual approach to write concurrent programs using the VISO language. Concurrent programs in VISO are specified graphically at different levels of abstraction. This paper describes this modular visual approach by constructing two examples in VISO. The first example is a simple concurrent program and it is mainly used to show the details of constructing a concurrent program in VISO. The second example is a larger concurrent program with more levels of abstraction. Copyright © 2000 John Wiley & Sons, Ltd.  相似文献   

11.
12.
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.  相似文献   

13.
Object-based sequential programming has had a major impact on software engineering. However, object-based concurrent programming remains elusive as an effective programming tool. The class of applications that will be implemented on future high-bandwidth networks of processors will be significantly more ambitious than the current applications (which are mostly involved with transmissions of digital data and images), and object-based concurrent programming has the potential to simplify designs of such applications. Many of the programming concepts developed for databases, object-oriented programming and designs of reactive systems can be unified into a compact model of concurrent programs that can serve as the foundation for designing these future applications. We propose a model of multiprograms and a discipline of programming that addresses the issues of reasoning (e.g., understanding) and efficient implementation. The major point of departure is the disentanglement of sequential and multiprogramming features. We propose a sparse model of multiprograms that distinguishes these two forms of computations and allows their disciplined interactions.  相似文献   

14.
15.
A common bottleneck for numericists is the complexity of the implementation programs. The usual procedural programming approach demands time and effort to program, develop, and test new formulations. This article addresses a particularly involved subject area, that of spectral element methods with mortars for large-scale applications. It is shown that the implementation burden can be alleviated by resorting to an object-oriented design approach. A toolbox consisting of a set of object-oriented classes is discussed. In order to solve a particular problem at hand, the user proceeds by creating an application where he/she loosely activates objects of the classes. When an operation exceeds the functionalities of the classes, the user can enrich these classes or create new ones. Practical examples are provided. Issues concerning computational efficiency and concurrent execution are addressed.  相似文献   

16.
The paper presents an algebraic specification of net objects. By net objects we mean those that are defined in object-oriented paradigms and those defined with nested relations in complex database models. An algebraic specification is set up that involves structures of net objects, accesses of net objects, and some features of object-oriented programming, such as multiple inheritance and polymorphism. Objects and their relationships are then characterized formally in the modeling, which utilizes the hierarchical approach in the algebraic theory of abstract data types, and is further developed by adding mechanisms from existing object systems. Categories of net objects are presented with the properties of accesses among them  相似文献   

17.
The state of art in handling and resolving concurrent exceptions is discussed and a brief outline of all research in this area is given. Our intention is to demonstrate that exception resolution is a very useful concept which facilitates joint forward error recovery in concurrent and distributed systems. To do this, several new arguments are considered. We understand resolution as reaching an agreement among cooperating participants of an atomic action. It is provided by the underlying system to make it unified and less error prone, which is important for forward error recovery, complex by nature. We classify atomic action schemes into asynchronous and synchronous ones and discuss exception handling for schemes of both kinds. The paper also deals with introducing atomic action schemes based on exception resolution into existing concurrent and distributed languages, which usually have only local exceptions. We outline the basic approach and demonstrate its applicability by showing how exception resolution can be used in Ada 83, Ada 95 (for both concurrent and distributed systems) and Java. A discussion of ways to make this concept more object-oriented and, with the help of reflection, more flexible and useful, concludes the paper.  相似文献   

18.
The object-oriented approach is being used in several areas of computing, including programming, databases, computer-aided design, and office information systems. The paper is a tutorial introduction to object-oriented databases, which is a new application in this field, although object-oriented programming has been under development since the late 1960s. The paper describes the background to object-oriented databases and outlines the rationale for this approach. It concludes with a possible application, in this case a cartographic database, explaining why the object-oriented approach is more appropriate to this application than traditional database approaches, such as the relational approach.  相似文献   

19.
This paper deals with application of concurrent object-oriented programming with Actors to solve dynamic programming problems in a distributed computing environment. This area of research is often called distributed artificial intelligence. Using a dynamic programming example of chained matrix multiplication, a method of managing dynamic programming searches in a distributed programming environment with Actors is presented. Distributed computations with Actors are visualized by means of Time-Varying Automata (for cases with no intra-actor concurrency) or using a class of high-level nets called Hierarchical Colored Petri Nets (for cases with intra-actor concurrency). Design and implementation features of the specific Actor-based programming environment, using a concurrent extension of C++, are also discussed.  相似文献   

20.
A Formal Semantics for DAI Language NUML   总被引:1,自引:0,他引:1       下载免费PDF全文
Traditional AI systems are brittle in the sense that they fail miserably when presented with problems even sliphtly outside of their limited range of expertise.A powerful,extensible strategy of Distributed Artificial Intelligence (DAI) for overcoming such bounds is to put the system in a society of systems.So the ability to coordinate group activities of individuals and to communicate between each other is necessary for a language describing DAI systems.Agent-oriented language NUML is such a language.It is a specific kind of object-oriented language.To give formal semantics to NUML,there is the problem to formalise object-oriented programming paradigm which is still open.The theory of higher-order π-calculus is a concurrent computation model with sufficient capability,which provides us a mathematical tool to do the formalization.This paper tries to use higher-order π-calculus to formalise NUML.  相似文献   

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

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