226,193 research outputs found

    Open Programming Language Interpreters

    Get PDF
    Context: This paper presents the concept of open programming language interpreters and the implementation of a framework-level metaobject protocol (MOP) to support them. Inquiry: We address the problem of dynamic interpreter adaptation to tailor the interpreter's behavior on the task to be solved and to introduce new features to fulfill unforeseen requirements. Many languages provide a MOP that to some degree supports reflection. However, MOPs are typically language-specific, their reflective functionality is often restricted, and the adaptation and application logic are often mixed which hardens the understanding and maintenance of the source code. Our system overcomes these limitations. Approach: We designed and implemented a system to support open programming language interpreters. The prototype implementation is integrated in the Neverlang framework. The system exposes the structure, behavior and the runtime state of any Neverlang-based interpreter with the ability to modify it. Knowledge: Our system provides a complete control over interpreter's structure, behavior and its runtime state. The approach is applicable to every Neverlang-based interpreter. Adaptation code can potentially be reused across different language implementations. Grounding: Having a prototype implementation we focused on feasibility evaluation. The paper shows that our approach well addresses problems commonly found in the research literature. We have a demonstrative video and examples that illustrate our approach on dynamic software adaptation, aspect-oriented programming, debugging and context-aware interpreters. Importance: To our knowledge, our paper presents the first reflective approach targeting a general framework for language development. Our system provides full reflective support for free to any Neverlang-based interpreter. We are not aware of any prior application of open implementations to programming language interpreters in the sense defined in this paper. Rather than substituting other approaches, we believe our system can be used as a complementary technique in situations where other approaches present serious limitations

    Algorithmic Abstraction Via Polymorphism In Object-oriented Programming Languages

    Get PDF
    The abstraction gap between algorithms and functions (procedures) causes numerous duplicate efforts in implementing the same algorithms as well as apparent under-use of many efficient algorithms. A solution to this problem is to realize algorithmic abstraction at the programming language level in addition to data abstraction. For this purpose, a programming language needs to have (1) an adequate type hierarchy for defining the domains of algorithms and (2) proper constructs for writing the sequences of steps of algorithms that are polymorphic to all types of objects in an algorithm domain.;Many object-oriented programming languages use a two-level hierarchy of entities (objects and classes) to support data abstraction. This hierarchy is only adequate to support two forms of polymorphism: universal-bounded polymorphism and inclusion-bounded polymorphism. Neither of them is proper for algorithmic abstraction.;The main aim of this thesis is to develop an adequate type structure and proper forms of polymorphism for algorithmic abstraction in object-oriented programming languages. We define a four-level hierarchy of entities: objects, classes, types, and kinds. Objects and classes have ordinary meanings; a type is a set of classes that have exactly the same external behaviour; and a kind is a set of types that share common properties. Based on the type hierarchy, we establish various forms of polymorphism which allow us to write polymorphic functions at different abstraction levels. We show that kinds are at the proper abstraction level for defining the domains of algorithms, and that kind-bounded polymorphic functions are algorithms which we propose to be supported at the programming language level.;Another goal of this thesis is to develop an object-oriented algebraic theory for the semantics of the four-level type hierarchy. In our approach, a kind corresponds to a structured signature which can have other signatures as its sorts. Thus, any algebra of a structured signature is a structured algebra which can have other algebras as its domains. We show that a structured algebra fits naturally into the structure of a class

    Using Kinds to Represent Heterogeneous Collections in a Static Type System (Extended Abstract)

    Get PDF
    We consider the problem of representing heterogeneous collections of objects in a typed polymorphic programming language in such a way that common properties of members of a collection, such as having commonly named field with a common type can be expressed in the type system. The use of such collections is widespread in object-oriented and database programming and has so far been achieved in statically typed systems only through the use of a single dynamic type, which effectively hides all the structure of a value. In this paper we exploit a system of types and kinds (sets of types) to represent dynamic values with some known properties. The type system is shown to be sound and to have a complete type inference algorithm

    IPCC++: A concurrentC++ for Centralized and Distributed Memory Models.

    Get PDF
    InterProcess Communication with C++, (IPCC++), is a concurrent object-oriented programming language that supports concurrency for centralized and distributed memory models while maintaining the high level of abstraction associated with object-oriented languages. The IPCC++ language model is a natural extension of the C++ programming language which introduces and supports the following features of concurrency: process concept, mechanism for process instantiation, static and dynamic process declaration, inter-object concurrency, monitor structure, condition variable, socket structure, typed message passing interprocess communication, synchronous and asynchronous communication, client/server paradigm, and run-time communication error detection. Features of concurrency are introduced as complete objects using the primitives of object-oriented programming languages as the vehicle for introduction. The underlying implementation of the components utilizes Parallel Virtual Machine (PVM), a software system that provides an abstraction of the UNIX operating system. A description of the object-oriented and concurrency paradigms are presented. The IPCC++ language model, which represents both paradigms, is defined and an overview of the language and the features it supports is provided. The environment of execution of the IPCC++ language model is described, along with the components of the model used to establish the IPCC++ environment. IPCC++ supports both the centralized and distributed memory models. Each memory model is defined along with the IPCC++ components necessary to support interprocess communication for its corresponding memory model. The centralized memory model uses the monitor structure and the condition variable of concurrency to facilitate centralized interprocess communication. In addition, the distributed memory model uses the socket structure along with a message passing protocol to support distributed interprocess communication. The producer consumer concurrency problem is presented with the corresponding IPCC++ solution designed for a centralized memory model. The dining philosopher concurrency problem is presented with the corresponding IPCC++ solution designed for a distributed memory model. The language design and concurrency features of IPCC++ are discussed and compared with current research efforts that introduce concurrency to C++ supporting centralized and distributed memory models. A description of the IPCC++ implementation model, preprocessing design, and research contributions of the IPCC++ language is provided

    Teaching programming with computational and informational thinking

    Get PDF
    Computers are the dominant technology of the early 21st century: pretty well all aspects of economic, social and personal life are now unthinkable without them. In turn, computer hardware is controlled by software, that is, codes written in programming languages. Programming, the construction of software, is thus a fundamental activity, in which millions of people are engaged worldwide, and the teaching of programming is long established in international secondary and higher education. Yet, going on 70 years after the first computers were built, there is no well-established pedagogy for teaching programming. There has certainly been no shortage of approaches. However, these have often been driven by fashion, an enthusiastic amateurism or a wish to follow best industrial practice, which, while appropriate for mature professionals, is poorly suited to novice programmers. Much of the difficulty lies in the very close relationship between problem solving and programming. Once a problem is well characterised it is relatively straightforward to realise a solution in software. However, teaching problem solving is, if anything, less well understood than teaching programming. Problem solving seems to be a creative, holistic, dialectical, multi-dimensional, iterative process. While there are well established techniques for analysing problems, arbitrary problems cannot be solved by rote, by mechanically applying techniques in some prescribed linear order. Furthermore, historically, approaches to teaching programming have failed to account for this complexity in problem solving, focusing strongly on programming itself and, if at all, only partially and superficially exploring problem solving. Recently, an integrated approach to problem solving and programming called Computational Thinking (CT) (Wing, 2006) has gained considerable currency. CT has the enormous advantage over prior approaches of strongly emphasising problem solving and of making explicit core techniques. Nonetheless, there is still a tendency to view CT as prescriptive rather than creative, engendering scholastic arguments about the nature and status of CT techniques. Programming at heart is concerned with processing information but many accounts of CT emphasise processing over information rather than seeing then as intimately related. In this paper, while acknowledging and building on the strengths of CT, I argue that understanding the form and structure of information should be primary in any pedagogy of programming

    Unified modeling language description of the object-oriented multi-scale adaptive finite element method for step-and-flash imprint lithography simulations

    Get PDF
    In the first part of the paper we present the multi-scale simulation of the Step-and-Flash Imprint Lithography (SFIL), a modern patterning process. The simulation utilizes the hp adaptive Finite Element Method (hp-FEM) coupled with Molecular Statics (MS) model. Thus, we consider the multi-scale problem, with molecular statics applied in the areas of the mesh where the highest accuracy is required, and the continuous linear elasticity with thermal expansion coefficient applied in the remaining part of the domain. The degrees of freedom from macro-scale element's nodes located on the macro-scale side of the interface have been identified with particles from nano-scale elements located on the nano-scale side of the interface. In the second part of the paper we present Unified Modeling Language (UML) description of the resulting multi-scale application (hp-FEM coupled with MS). We investigated classical, procedural codes from the point of view of the object-oriented (O-O) programming paradigm. The discovered hierarchical structure of classes and algorithms makes the UML project as independent on the spatial dimension of the problem as possible. The O-O UML project was defined at an abstract level, independent on the programming language used
    • 

    corecore