首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
Object-oriented programming has become a widely used, important programming paradigm that is supported in many different languages. C++ has become the most widely used object-oriented language and many C++ programmers are unfamiliar with the different approaches taken by other languages in the paradigm. This paper is intended as an introduction to a broad range of ideas in object-oriented programming. Specifically, we introduce four modern programming languages that support object-oriented programming (Oberon-2, Modula-3, Sather and Self), and show how a simple application is coded in these languages. While each of these programming languages provide support for inheritance, dynamic dispatch, code reuse, and information hiding, they do so in very different ways and with varying levels of efficiency and simplicity. The use of a simple example, based on a common programming problem, facilitates our comparison. We have coded the application in all of these languages, including C++, and we compare the compile times, object code sizes, and run times of the available implementations. Implementations of all the languages compared and all of the programs we measure are available on the Internet. Ultimately, our goal is to encourage and facilitate programmers in understanding and exploring a variety of object-oriented programming languages.  相似文献   

2.
Students often have difficulties when trying to understand the concepts of object-oriented programming (OOP). This paper presents a contribution to the teaching of OOP languages through a game-oriented approach based on the interaction with tangible user interfaces (TUIs). The use of a specific type of commercial distributed TUI (Sifteo cubes), in which several small physical devices have sensing, wireless communication and user-directed output capabilities, is applied to the teaching of the C# programming language, since the operation of these devices can be controlled by user programs written in C#. For our experiment, we selected a sample of students with a sufficient knowledge about procedural programming, which was divided into two groups: The first one had a standard introductory C# course, whereas the second one had an experimental C# course that included, in addition to the contents of the previous one, two demonstration programs that illustrated some OOP basic concepts using the TUI features. Finally, both groups completed two tests: a multiple-choice exam for evaluating the acquisition of basic OOP concepts and a C# programming exercise. The analysis of the results from the tests indicates that the group of students that attended the course including the TUI demos showed a higher interest level (i.e. they felt more motivated) during the course exposition than the one that attended the standard introductory C# course. Furthermore, the students from the experimental group achieved an overall better mark. Therefore, we can conclude that the technological contribution of Sifteo cubes – used as a distributed TUI by which OOP basic concepts are represented in a tangible and a visible way – to the teaching of the C# language has a positive influence on the learning of this language and such basic concepts.  相似文献   

3.
KOPERNIK is an object-oriented database system, that allows uniform specification of database requests and application programs. The user interface is based on Smalltalk, and the object-oriented data model is represented in terms of classes and messages. Techniques are discussed for implementing such a model on top of an underlying relational database system. Those parts of application programs that cannot be translated into a relational language are handled by a Smalltalk processor. The semantics of the database requests is defined in terms of a meta-model and meta-messages, using an object-oriented approach. Hence we derive rules for translation of database requests into SQL queries over a binary relational view, introduced as an intermediate level between the underlying database and our conceptual view.  相似文献   

4.
Fourteen concurrent object-oriented languages are compared in terms of how they deal with communication, synchronization, process management, inheritance, and implementation trade-offs. The ways in which they divide responsibility between the programmer, the compiler, and the operating system are also investigated. It is found that current object-oriented languages that have concurrency features are often compromised in important areas, including inheritance capability, efficiency, ease of use, and degree of parallel activity. Frequently, this is because the concurrency features were added after the language was designed. The languages discussed are Actors, Abd/1, Abd/R, Argus, COOL, Concurrent Smalltalk, Eiffel, Emerald, ES-Kit C++, Hybrid, Nexus, Parmacs, POOL-T, and Presto  相似文献   

5.
6.
Using GPUs as general-purpose processors has revolutionized parallel computing by providing, for a large and growing set of algorithms, massive data-parallelization on desktop machines. An obstacle to their widespread adoption, however, is the difficulty of programming them and the low-level control of the hardware required to achieve good performance. This paper proposes a programming approach, SafeGPU, that aims to make GPU data-parallel operations accessible through high-level libraries for object-oriented languages, while maintaining the performance benefits of lower-level code. The approach provides data-parallel operations for collections that can be chained and combined to express compound computations, with data synchronization and device management all handled automatically. It also integrates the design-by-contract methodology, which increases confidence in functional program correctness by embedding executable specifications into the program text. We present a prototype of SafeGPU for Eiffel, and show that it leads to modular and concise code that is accessible for GPGPU non-experts, while still providing performance comparable with that of hand-written CUDA code. We also describe our first steps towards porting it to C#, highlighting some challenges, solutions, and insights for implementing the approach in different managed languages. Finally, we show that runtime contract-checking becomes feasible in SafeGPU, as the contracts can be executed on the GPU.  相似文献   

7.
The Java programming language has been a phenomenal success. It's a significant improvement over C and C++, and its libraries for network and GUI programming have introduced large numbers of programmers to previously esoteric disciplines. The recent European Conference for Object-Oriented Programming (ECOOP) included the workshop on object-oriented language engineering for the post-Java era at which researchers gathered to examine languages that diverge from this model. The only way to produce a language over which one programmer can have intellectual mastery is to start with a really tiny kernel and add on what 30 years of experience has shown to be absolutely necessary.  相似文献   

8.
Summary An abstract family of formal languages containing context-free languages and properly contained in (deterministic) context-sensitive languages is introduced. This family is comprehensive enough to contain e.g. Algol 60 without admitting too complex recursive constructions possible in the frame of general context-sensitive languages.This family is essentially a family of property-languages, whereby the considered properties are restricted to properties which are constructively definable from a finite number of context-free sets.  相似文献   

9.
PRESTO is a programming system for writing object-oriented parallel programs in a multiprocessor environment. PRESTO provides the programmer with a set of pre-defined object types that simplify the construction of parallel programs. Examples of PRESTO objects are threads, which provide fine-grained control over a program's execution, and synchronization objects, which allow simultaneously executing threads to co-ordinate their activities. The goals of PRESTO are to provide a programming environment that makes it easy to express concurrent algorithms, to do so efficiently, and to do so in a manner that invites extensions and modifications. The first two goals, which are the focus of this paper, allow a programmer to use parallelism in a way that is naturally suited to the problem at hand, rather than being constrained by the limitations of a particular underlying kernel or hardware architecture. The third goal is touched upon but not emphasized in this paper. PRESTO is written in C++; it currently runs on the Sequent shared-memory multiprocessor on top of the Dynix operating system. In this paper we describe the system model, its applicability to parallel programming, experiences with the initial implementation, and some early performance measurements.  相似文献   

10.
TGMS (tiered geometric modelling system) is an experimental system intended to reduce the difficulty and cost of developing new solid modelling applications while preserving investment in an existing, time-tested, solid modeller. The application developer writes programs in the TGMS language, which consists of a base language augmented by data types (classes) for geometry. The base programming language is AML/X, an object-oriented language intended for use in design and manufacturing applications. Solid modelling is done using an interface to GDP (geometric design processor), an existing, production-quality solid modelling system. TGMS shows how a system written in a non-object-oriented language can be used as a base for an object-oriented application programming environment. This paper presents the design of TGMS and discusses important aspects of its implementation. The TGMS language defines classes and methods that provide an interface to functions and data represented in a non-object-oriented language. To implement TGMS, issues related to communication, storage management and consistency were addressed. These, and other, implementation issues are discussed. The paper includes sample programs and a summary of feedback from TGMS users. It concludes that the use of object-oriented programming for geometry has many benefits, and that an object-oriented system can be built on top of a non-object-oriented system at less cost than building the equivalent object-oriented system from scratch.  相似文献   

11.
G. A. Rose  J. Welsh 《Software》1981,11(7):651-669
This paper presents a systematic approach to formatted language design that incorporates formatting within the syntax of programming languages. The approach includes:
  • 1 a metasyntax to ensure that program text is foldable, not only to avoid right margin overflow but also to preclude constructs which are visually confusing or ambiguous;
  • 2 a set of guidelines for language designers to enhance readability within the constraints of the metasyntax; and
  • 3 a folding algorithm which selectively folds a program text.
The resulting automatic formatting is consistent with current practice in program and text layout. The effect of this approach is to put program format decisions in the domain of the language's designer, rather than its several implementors or numerous users, which implies uniformly formatted programs of improved readability and therefore usability.  相似文献   

12.
We present a new abstract machine for Abadi and Cardelli's untyped non-imperative calculus of objects. This abstract machine mechanically corresponds to both the reduction semantics (i.e., small-step operational semantics) and the natural semantics (i.e., big-step operational semantics) specified in Abadi and Cardelli's monograph. To move closer to actual implementations, which use environments rather than actual substitutions, we then represent methods as closures and we present three new semantic artifacts for a version of Abadi and Cardelli's calculus with explicit substitutions: a reduction semantics, an environment-based abstract machine, and a natural semantics (i.e., an interpreter) with environments. These three new semantic artifacts mechanically correspond to each other, and the two abstract machines are bisimilar. Their significance lies in the fact that they have not been designed from scratch and then proved correct; instead, they have been inter-derived.To illustrate the inter-derivation and to make this article stand-alone, we also comprehensively treat the example of negational normalization over Boolean formulas, in appendix.  相似文献   

13.
Quantum programming languages   总被引:1,自引:0,他引:1  
After giving a bird’s view of some existing quantum programming languages, this paper reports the recent results made by the quantum computation group of the State Key Laboratory for Novel Software Technology and the Department of Computer Science and Technology at Nanjing University, i.e., the quantum programming languages NDQJava, NDQFP and their processing systems.  相似文献   

14.
15.
After giving a bird’s view of some existing quantum programming languages, this paper reports the recent results made by the quantum computation group of the State Key Laboratory for Novel Software Technology and the Department of Computer Science and Technology at Nanjing University, i.e., the quantum programming languages NDQJava, NDQFP and their processing systems.  相似文献   

16.
17.
This paper presents a method for statically verifying that functions do not produce side-effects, in an object-oriented language. The described model, although not allowing any changes to pre-existing objects during a function call, permits an imperative style of programming, where new objects can be freely created and manipulated.  相似文献   

18.
Semantic Web applications share a large portion of development effort with database-driven Web applications. Existing approaches for development of these database-driven applications cannot be directly applied to Semantic Web data due to differences in the underlying data model. We develop a mapping approach that embeds Semantic Web data into object-oriented languages and thereby enables reuse of existing Web application frameworks.We analyse the relation between the Semantic Web and the Web, and survey the typical data access patterns in Semantic Web applications. We discuss the mismatch between object-oriented programming languages and Semantic Web data, for example in the semantics of class membership, inheritance relations, and object conformance to schemas.We present ActiveRDF, an object-oriented API for managing RDF data that offers full manipulation and querying of RDF data, does not rely on a schema and fully conforms to RDF(S) semantics. ActiveRDF can be used with different RDF data stores: adapters have been implemented to generic SPARQL endpoints, Sesame, Jena, Redland and YARS and new adapters can be added easily. We demonstrate the usage of ActiveRDF and its integration with the popular Ruby on Rails framework which enables rapid development of Semantic Web applications.  相似文献   

19.
The language of universal algebras is used as a model for programming language specification. BNF rules are employed for specifying the signature of the language algebra instead of the context free syntax. The algorithm for program evaluation is inductively defined by the following universal algebraic construction:
Any function defined on the generators of a free algebra taking values in the carrier of another similar algebra can be uniquely extended to a homomorphism between the two algebras.

Any conventional programming language can be specified by a finite set of BNF rules and its algebra of symbols is generated by a finite set of generator classes. Thus any function defined on the finite set of generators offers an algebraic mechanism for a universal algorithm for source language program evaluation.  相似文献   


20.
The paper first shows how the categorical theory of sequences is useful in explaining properties of the (word) differentiation of Brzozowski (1964). Then, the paper shows how a more general theory of languages, including both procedural and functional languages, should be constructed by using a switch proposition that extends the common equivalence between the general tensor and general hom functors of categories. Lastly, the paper offers a new way of approaching projectivity concepts of general relative homological algebra. The most interesting result is that there is a class of functors so that functor-projectives intersect projectives and injectives trivially, and behave correctly. Moreover, any non-zero abelian group is not Q-projective.  相似文献   

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

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