Font Size: a A A

Design And Prototype Implementation Of A Concurrent And Distributed Language Based On ∏-calculus

Posted on:2008-07-12Degree:MasterType:Thesis
Country:ChinaCandidate:J L WanFull Text:PDF
GTID:2178360212497012Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Along with the rapid development of the computer technology and the network communication, concurrent systems, which take concurrency, distributing, real-time, heterogeneity and interaction as main characteristics , have become the mainstream of current computer technology and have already been extensively applied. Because of the complexity of concurrent-distributed systems, the development process is very difficult, and has low efficiency and long periods. Further more, avoiding implicit bugs and defects of the process is also quite difficult. In order to get an open, extensible, customized and useable network computing environment, people devote into different aspect research of the distributed computing. The concurrent process technology is a new topic which wells up under this background and catches the attentions of researchers in many areas, such as computer software engineering, computer concurrent theories, distributed object technique and network computing environment etc.The traditional computing models, such as Turing machine and Lambda calculus, have some disadvantages in modeling the interactive system. Now, more and more researchers throw themselves into the research of concurrent systems and have obtained many achievements. Altogether, these researches involve three areas: theories on concurrent systems, architecture of concurrent systems and program design language of concurrent systems. According to these three areas, this paper analyzes the actualities and problems of current researches on the concurrent process technique, and launch a concrete research on concurrent systems based on own software and hardware environment. Those main problems which have been on research and discussion are as follows:At fist, this paper analyzes the concurrent systems and the representation of its model. That is what a concurrent system is and how to describe it. The idea of this paper is that the concurrent systems have two basic features: interaction and concurrency. However, it's believed that there are some problems on the description of concurrent systems with current programming languages. So, we need a new language to well describe the concurrent systems. In this paper, a component of the concurrent systems is represented as an active concurrent process. So we can use the theories of concurrent process calculi to analyze the interactive behavior and concurrent behavior between components of the concurrent systems. The paper selects p-calculus from a lot of calculus to describe the concurrent systems and its interactive behavior. Many important fruits have been obtained on the research of p-calculus, and p-calculus can also successfully describe the interaction between processes, but p-calculus is theorization and is uselessful in practice.Π-calculus focuses on the interaction between the processes without consideration on the change of network environment, especially the change of states of channels, so it is suitable for the description of the communication between processes of concurrent systems, but it can't describe concurrent systems completely. This paper introduces the process body and the judgment of the channel status into the existing p-calculus, and gets a new concurrent process calculus MDPi. A process body includes internal behaviors and operations of a process, while a channel status lies on the network environment and directly decides whether processes interact successfully. A channel contains two statuses: "alive" and "dead". This paper describes the syntax and semantic of MDPi calculus completely in the network environment.In allusion to the architectures of the concurrent systems, this paper reports an interactive model between processes and a distributed framework based on blackboard model. The interactive model between processes is a four layer's model which consists of concurrent processes, IMC middleware, Java virtual machine and the network communication protocol. This model makes great use of the concurrent characteristic of Java language and IMC's support for concurrent processes communication, and it can nicely carry out the communication of processes described by MDPi. The model has a clear hierarchical structure and can be implemented easily and reliably. It's probably a simple and practical model for implementation of the process interaction. The distributed framework based on blackboard model is a centralized control method which is combined the message model and the blackboard model. This framework is composed of a blackboard, a controller, a registration and the concurrent processes which participate in the communication. Different from the traditional blackboard model, the blackboard in the framework is a special concurrent process; its physical location is constant and it is used to manage the communication between processes in concurrent systems. The concurrent process in systems can only communicate with the blackboard, and these concurrent processes don't carry on direct communication with other ones, otherwise, their location is unfixed. So In this framework the resource and the network location are transparent to the concurrent processes, the processes is coupled loosely. This framework owns the characteristics of flexibility and universal.The third aspect deals with the programming language of the concurrent system. Currently many popular programming languages have some difficulties in concurrent programming. For solving those problems, this paper presents a programming language MDPL based on semantic of MDPi calculus. MDPL is a comparatively perfect programming language from syntax to semantic. For the readability and convenient writing when programming, MDPL rewrites the syntax of MDPi calculus with the ASIIC encoding, and adds some new language characteristics. On the development of concurrent system, the MDPL have some advantages, such as a strict semantic, an inherent power of concurrency and interaction etc.The forth step deals with the implementation of the concurrent programming language. This paper focuses on the implementation of translator from MDPL to Java language. There are mainly three problems to be worked out: the implementation of syntax analyzer, semantic parser and code conversion. This paper describes the grammar of MDPL, then uses JavaCC to automatically generate lexical analyzer and syntax analyzer, and use JTB to build abstract syntax tree. This can shorten the time of transforming process, and can also raise the correctness of the translator.Hence; the main work focuses on the travel of syntax tree, type checking and generation of Java code. In this paper, the Visitor pattern is used to travel the syntax tree. The type checking is done with MDPi type rules. Generation of Java code mainly generates the code of the concurrent process and their communication protocol.This paper indicates that it is viable to design a concurrent programming language to develop concurrent systems under existing software and hardware environment. The concurrent programming language in this paper, MDPL has a strong foundation of theories, can express interactions between concurrent processes clearly and accurately. The concurrent semantic of existing programming languages are unclear, and they are difficult to use in concurrent programming. MDPL has solved this problem. The research of this paper is in favor of the development of the theories and application of the concurrent process technique. Although the concurrent process technique as a new rising distributed computing technology is still immature, it provides a wide foreground of application and a technique means for the new generation of the network computing.
Keywords/Search Tags:Implementation
PDF Full Text Request
Related items