首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
The transition from imperative programming to functional programming for problems whose mathematical nature is not immediately obvious raises two questions. First, how can the function concept be applied to such problems, and, secondly, what language concepts are most suited in this situation. This paper shows that an existing functional programming language is very well suited for the elegant implementation of interactive programs. As an example, a text editor is described. The implementation of the editor has once more demonstrated the benefits of functional programming: fast generation of short and reliable programs. This indicates that it is worth while to investigate the application fields of functional programming languages as well as their implementation, in order to try to make them into general-purpose programming languages that can be used in a production environment.  相似文献   

2.
Concurrent programs that embed specifications of synchronizations in the body of their component are difficult to extend and modify. Small changes in a concurrent program, particularly changes in the interactions among components, may require re-implementation of a large number of components. Even specifications of components cannot be reused easily. This paper presents a concurrent program composition mechanism in which both specification and implementation of computations and interactions are completely separated. Separation of specifications and implementations facilitates extensions and modifications of programs by allowing one to separately change the implementations of computations and interactions. It also supports their reusability. The paper also describes the design and implementation of a concurrent object-oriented programming language based on this model, including a compiler for the language, and reports on the execution behavior of programs written in the language.  相似文献   

3.
Although Fortran is not a pleasant language to use, it does have the advantages of universality and (usually) relative efficiency. The RATFOR language attempts to conceal the main deficiencies of Fortran while retaining its desirable qualities, by providing decent control flow statements and some ‘syntactic sugar’. RATFOR is implemented as a preprocessor which translates this language into Fortran Once the control flow and cosmetic deficiencies of Fortran are hidden, the resulting language is remarkably pleasant to use. RATFOR programs are markedly easier to write, and to read, and thus easier to debug, maintain and modify than their Fortran equivalents It is readily possible to write RATFOR programs which are portable to other environments. RATFOR is written in itself in this way, so it is also portable; versions of RATFOR are now running on computers of six different manufacturers This paper discusses design criteria for a Fortran preprocessor, the RATFOR language and its implementation, and user experience.  相似文献   

4.
Consider the connection between denotational semantics for a language with goto statements and flow diagrams for programs in such a language. The main point of interest is that the denotational semantics uses a recursively defined environment to give the meaning of labels, while a flow diagram merely has a jump to the appropriate program point. A simple reduction called “indirection elimination” strips away the environment from the denotational semantics and extracts an expression with cycles that is very close to the flow diagram of a program. The same idea applies to associating bodies with recursive procedures, or to any construct whose semantics is not wedded to the syntax. In addition to being a useful data structure and conceptual device, expressions with cycles are well defined mathematical objects—their semantics can be given by unfolding them into infinite structures that have been well studied. The practicality of the elimination of environments has been tested by constructing a trial implementation, which serves as the front end of a semantics directed compiler generator. The implementation takes a denotational semantics of a language and constructs a “black box” that maps programs in the language into an intermediate representation. The intermediate representation is a circular expression.  相似文献   

5.
Refactoring OCL annotated UML class diagrams   总被引:1,自引:0,他引:1  
Refactoring of UML class diagrams is an emerging research topic and heavily inspired by refactoring of program code written in object-oriented implementation languages. Current class diagram refactoring techniques concentrate on the diagrammatic part but neglect OCL constraints that might become syntactically incorrect by changing the underlying class diagram. This paper formalizes the most important refactoring rules for class diagrams and classifies them with respect to their impact on attached OCL constraints. For refactoring rules that have an impact on OCL constraints, we formalize the necessary changes of the attached constraints. Our refactoring rules are specified in a graph-grammar inspired formalism. They have been implemented as QVT transformation rules. We finally discuss for our refactoring rules the problem of syntax preservation and show, by using the KeY-system, how this can be resolved.  相似文献   

6.
Higher-order representations of objects such as programs, proofs, formulas, and types have become important to many symbolic computation tasks. Systems that support such representations usually depend on the implementation of an intensional view of the terms of some variant of the typed lambda calculus. New notations have been proposed for the lambda calculus that provide an excellent basis for realizing such implementations. There are, however, several choices in the actual deployment of these notations the practical consequences of which are not currently well understood. We attempt to develop such an understanding here by examining the impact on performance of different combinations of the features afforded by such notations. Among the facets examined are the treatment of bound variables, eagerness and laziness in substitution and reduction, the ability to merge different structure traversals into one, and the virtues of annotations on terms that indicate their dependence on variables bound by external abstractions. We complement qualitative assessments with experiments conducted by executing programs in a language that supports an intensional view of lambda terms while varying relevant aspects of the implementation of the language. Our study provides insights into the preferred approaches to representing and reducing lambda terms and also exposes characteristics of computations that have a somewhat unanticipated effect on performance.  相似文献   

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

8.
The generation of compiled code for expressions in programming languages such as Icon that support goal-directed evaluation in addition to traditional control structures presents more of a challenge than generating code for traditional imperative programming languages. This paper describes a code-generation technique for translating Icon programs into a traditional high-level language. Translations into both Pascal and C are discussed. However, any language that provides function parameters and recursion is sufficient. The technique described here has been used in the implementation of an optimizing compiler for Icon.  相似文献   

9.
Eager and lazy evaluations in a dataflow model are proposed, Such evaluation enables nonstrict evaluation, structure data manipulation and nondeterminate computation. Several dataflow computation models are discussed from the viewpoint of their by-value and by-reference mechanisms, i. e., their token to data correspondence. It is shown that effective implementation is achieved by unifying both mechanisms. This implies the effective implementation of the lenient cons and lazy cons concept in list manipulation. Nonstrict list manipulation is shown to be useful for stream-oriented processing, and for nondeterminate computation combined with the nonstrict primitive operator, Arbiter. Several sample programs are included to show that concurrent processes and object-oriented programs can be intuitively described in functional language.  相似文献   

10.
支持对象间关系的程序设计语言研究   总被引:3,自引:0,他引:3  
万建成  张曙明 《软件学报》2000,11(5):686-685
在论述了面向对象技术中对象间的关系作为第一级建模概念的重要性之后,该文设计并实现了显式支持对象间关系的RCPP(relational C++)语言.它提供了显式描述对象间关系特性和语义的机制,利用关系来动态地控制对象行为的作用和传播.它的运行是通过一个转换器把RCPP代码翻译成C++代码,再经C++环境编译后,形成可执行程序而实现的.文章对RCPP语言的模型、语言提供的服务以及具体系统的描述和实现作了深入阐述.  相似文献   

11.
Various implementation approaches for developing a domain-specific language are available in literature. There are certain common beliefs about the advantages/disadvantages of these approaches. However, it is hard to be objective and speak in favor of a particular one, since these implementation approaches are normally compared over diverse application domains.The purpose of this paper is to provide empirical results from ten diverse implementation approaches for domain-specific languages, but conducted using the same representative language. Comparison shows that these discussed approaches differ in terms of the effort need to implement them, however, the effort needed by a programmer to implement a domain-specific language should not be the only factor taken into consideration. Another important factor is the effort needed by an end-user to rapidly write correct programs using the produced domain-specific language. Therefore, this paper also provides empirical results on end-user productivity, which is measured as the lines of code needed to express a domain-specific program, similarity to the original notation, and how error-reporting and debugging are supported in a given implementation.  相似文献   

12.
The first-order, untyped, functional logic language Babel is extended by polymorphic types and higher order functios. A sophisticated incompatibility check which is used to guarantee nonambiguity of BABEL programs is presented. For the implementation of the language, unification and backtracking are integrated in a programmed (functional) graph reduction machine. The implementation of this machine has been used for a comparison between Babel and PROLOG based on the runtimes of some example programs.  相似文献   

13.
14.
Carsten Schmidt  Uwe Kastens 《Software》2003,33(15):1471-1505
The implementation of visual languages requires a wide range of conceptual and technical knowledge from issues of user interface design and graphical implementation to aspects of analysis and transformation for languages in general. We present a powerful toolset that incorporates such knowledge. Our toolset generates editors from high‐level specifications. A language is specified by identifying certain patterns in the language structure and selecting a visual representation from a set of precoined solutions. Visual programs are represented by attributed abstract trees. Therefore, further phases of processing visual programs can be generated by state‐of‐the‐art tools for language implementation. We demonstrate that even challenging visual languages can be implemented with reasonably little effort and with rather limited technical knowledge. The approach is suitable for a large variety of visual language styles. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

15.
D. Holdsworth 《Software》1977,7(3):331-339
We illustrate the use of Algol 68 as a systems implementation language by reference to practical uses of the language. We argue that the code patch facility as implemented in Algol 68-R is a good way of interfacing systems programs to their machine-dependent environment, and does not violate the spirit of high-level language programming.  相似文献   

16.
Uwe Kastens  William Waite 《Software》2017,47(11):1597-1631
Classical strategies for matching identifier uses with declarations cannot handle the complexities of modern languages: arbitrarily qualified superclass names, cyclic dependence among lookup operations, and contextual access constraints. We have developed a language‐independent algorithm and supporting data structure that overcome these problems. A well‐defined interface allows introduction of arbitrary code to enforce language‐specific constraints within the basic lookup operations. This paper explains the limitations of the classical strategies, presents the concepts on which our approach is based, and showcases an implementation based on attribute grammars. We explore the major issues through a series of examples and show how one can deal with those issues in a general framework. Many of the issues are specific to a particular language, and in those cases, we explain the solutions that our general interface supports. Although attribute grammars simplify the task of incorporating the model into a compiler, the model itself is completely independent of attribute grammars. We validated our model by using an implementation to process programs in several representative languages. In particular, we mechanically compared the results produced by that implementation with those produced by the Java SE 8 compiler on complete Java programs that are in general use. Performance data obtained during this processing show that our implementation is efficient. Copyright © 2017 John Wiley & Sons, Ltd.  相似文献   

17.
18.
David R. Hanson 《Software》1980,10(6):489-500
Icon is a new programming language designed primarily for non-numerical applications. Its roots are in SNOBOL4 and SL5; as in those languages, execution-time flexibility is an important attribute of Icon, although some aspects of programs are bound at compile time to improve efficiency. Icon, which is implemented in Ratfor, is also intended to be portable and suitable for 16-bit computers. The storage management system in Icon is designed to meet the goals of portability, flexibility and efficiency. This is accomplished by subdividing the storage management system into a set of type-specific storage management subsystems. This paper describes the implementation of these subsystems, their interaction, and their performance.  相似文献   

19.
This paper deals with a framework to program autonomous robots in the declarative multi-paradigm language Curry. Our goal is to apply a high-level declarative programming language for the programming of embedded systems. For this purpose, we use a specialization of Curry called Embedded Curry. We show the basic ideas of our framework and an implementation that translates Embedded Curry programs into C.  相似文献   

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

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