Recently, language extensions have been proposed for Java and C# to support pattern-based reflective declaration. These extensions introduce a disciplined form of meta-programming and aspect-orientedprogramming to ma...
详细信息
Recently, language extensions have been proposed for Java and C# to support pattern-based reflective declaration. These extensions introduce a disciplined form of meta-programming and aspect-orientedprogramming to mainstream languages: They allow members of a class (i.e., fields and methods) to be declared by statically iterating over and pattern-matching on members of other classes. Such techniques, however, have been unable to safely express simple, but common, idioms such as declaring getter and setter methods for fields. In this paper, we present a mechanism that addresses the lack of expressiveness in past work without sacrificing safety. Our technique is based on the idea of nested patterns that elaborate the outer-most pattern with blocking or enabling conditions. We implemented this mechanism in a language, MorphJ. We demonstrate the expressiveness of MorphJ with real-world applications. In particular, the MorphJ reimplementation of DSTM2, a software transactional memory library, reduces 1,107 lines of Java reflection and bytecode engineering library calls to just 374 lines of MorphJ code. At the same time, the MorphJ solution is both high level and safer, as MorphJ can separately type check generic classes and catch errors early. We present and formalize the MorphJ type system, and offer a type-checking algorithm.
Metaprogramming, using programs to manipulate other programs, is as old as programming. From self-modifying machine code in early computers to expressions involving partially applied functions in modern functional-pro...
详细信息
Metaprogramming, using programs to manipulate other programs, is as old as programming. From self-modifying machine code in early computers to expressions involving partially applied functions in modern functional-programming languages, metaprogramming is an essential part of an advanced programmer\'\'s arsenal. Everyday metaprogramming involves on-the-fly code production. Representative examples include dynamically generated SQL statements and code created for evaluation at runtime in interpreted languages. Metaprogramming also occurs in programs that spew out HTML or XML. Although we can\'\'t classify these markup languages as code, their rich syntactic structure qualifies their generation as metaprogramming. Unfortunately, we commonly produce code on the fly by simply pasting together character strings. This means that it\'\'s difficult to verify essential properties of the generated code - such as validity, correctness, and safety - at compile time.
The process-based simulation library SALMO-OO represents an object-oriented implementation of mass balance equations for pelagic food webs consisting of diatoms, green algae, blue-green algae and cladocerans, as well ...
详细信息
The process-based simulation library SALMO-OO represents an object-oriented implementation of mass balance equations for pelagic food webs consisting of diatoms, green algae, blue-green algae and cladocerans, as well as nutrient cycles based on PO4-P, NO3-N, DO and detritus in lakes. It gains its structural flexibility from alternative process representations for algal growth and grazing, and zooplankton growth and mortality. Generic model structures of SALMO-OO were determined for three lake categories classified by circulation types reflecting the local climate and morphometry of lakes, and by trophic states reflecting community structures and habitat properties of lakes. Data of six lakes belonging to either of the three lake categories were used to validate the lake category specific structures of SALMO-OO. The study has demonstrated that: (1) JAVA suits well for object-oriented implementations of ecological simulation libraries, (2) object-oriented simulation libraries facilitate the identification of generic model structures for ecosystem categories. Crown Copyright (C) 2008 Published by Elsevier B.V. All rights reserved.
object-oriented modeling methodology is used for encapsulating different methods and attributes of data reconciliation (DR) in classes. Classes which are defined for DR, cover steady-state, dynamic, linear and nonline...
详细信息
object-oriented modeling methodology is used for encapsulating different methods and attributes of data reconciliation (DR) in classes. Classes which are defined for DR, cover steady-state, dynamic, linear and nonlinear DR problems. Two main classes are Constraints and DR and defined for manipulating constraints and general DR problem. The remaining classes are derived from these two classes. A class namely DDRMethod is developed for encapsulating all common attributes and methods needed for any DDR method. Developed DR software and the method of performing dynamic DR are discussed in this paper. Two illustrative examples of Extended Kalman Filtering and artificial neural networks are used for DDR and two classes of DDRByKalman and NetDDRMethod developed by inheritance from DDRMethod class for these two methods. Performance of the proposed method is investigated by DDR of temperature measurements of a distillation column.
Introductory object-oriented programming is considered difficult to teach and a number of different methodologies have been proposed to address this difficulty. One method, which is reported in this paper, involves th...
详细信息
ISBN:
(纸本)9781424419692
Introductory object-oriented programming is considered difficult to teach and a number of different methodologies have been proposed to address this difficulty. One method, which is reported in this paper, involves the use of graphical user interfaces (GUI's). The research question developed for this study is as follows: Does any statistical difference exist in test scores between a control group using text-based object-oriented programming (OOP) and a test group using GUI-based OOP? To answer this research question, quantitative data was collected through the use of common questions on the final CS2 exam for both groups. Data was collected over a period of 3 class offerings for five multiple-choice questions and one question requiring programming. No statistical difference between the groups was found for either the 5 multiple-choice questions or the open programming question. An analysis of the final CS2 course letter grade showed no significant difference between the test and control groups. Further, students who participated in the first year of the study were tracked through Data Structures, the course which follows CS2 in the curriculum sequence. A statistical analysis of the final letter grade for found no significant statistical difference between control and test groups.
Machine learning techniques have been applied to the task of student modeling, more so in building tutors for acquiring programming skill. These were developed for various languages (Pascal, Prolog, Lisp, C++) and pro...
详细信息
ISBN:
(纸本)9783540691303
Machine learning techniques have been applied to the task of student modeling, more so in building tutors for acquiring programming skill. These were developed for various languages (Pascal, Prolog, Lisp, C++) and programming paradigms (procedural and declarative) but never for object-oriented programming in Java. JavaBugs builds a bug library automatically using discrepancies between a student and correct program. While other works analyze code snippets or UML diagrams to infer student knowledge of object-oriented design and programming, JavaBugs examines a complete Java program and identifies the most similar correct program to the student's solution among a collection of correct solutions and builds trees of misconceptions using similarity measures and background knowledge. Experiments show that JavaBugs can detect the most similar correct program 97% of the time, and discover and detect 61.4% of student misconceptions identified by the expert.
Teaching objectorientedprogramming (OOP) to novices is widely known to be quite problematic Students might be able to write a piece of code in an OOP language, usually Java, but their conceptual grasp of object-orie...
详细信息
ISBN:
(纸本)9783540877820
Teaching objectorientedprogramming (OOP) to novices is widely known to be quite problematic Students might be able to write a piece of code in an OOP language, usually Java, but their conceptual grasp of object-oriented concepts seems to he limited. This leads to poor implementation of object-oriented concepts and inability to take advantage of the strengths of OOP. Various teaching approaches and specially designed programming environments have been proposed for supporting the teaching and learning of OOP. In this paper. we present our findings regarding students' conceptual grasp of OOP concepts in two distinct educational programming environments: Blue J and object Karel. Their special feature in comparison with similar environments is that they are highly interactive.
The need to parallelise desktop applications is becoming increasingly essential with the mainstream adoption of multi-cores. In object-oriented languages, sequential iterators handle iterative computations of a sequen...
详细信息
ISBN:
(纸本)9780769534343
The need to parallelise desktop applications is becoming increasingly essential with the mainstream adoption of multi-cores. In object-oriented languages, sequential iterators handle iterative computations of a sequential program;similarly, the parallel iterator was developed to handle the iterative computations of a parallel program. This paper presents the progress of the parallel iterator concept. New features, such as support for reductions and global break semantics, allow the parallel iterator to undertake more situations. With a slight contract modification, the parallel iterator interface now imitates that of the sequential iterator. All these features combine together to promote minimal, if any, code restructuring. The reduction frequently outperforms related work and the importance of providing simple and flexible fine-tuning capability is affirmed.
This article analyzes specific creation features of automated design system. The creation tasks of the house heating automated design system are solved with Unified Modeling Language. Graphical system can select types...
详细信息
ISBN:
(纸本)9789955282631
This article analyzes specific creation features of automated design system. The creation tasks of the house heating automated design system are solved with Unified Modeling Language. Graphical system can select types of radiators and valves, design pipes and specification. It discerns objects-classes: radiator, valve, pipe and specification, which have some properties and methods that ease programmer's work. House geometry and desirable temperature is known. First, program selects geometry parameters of radiators from radiators database by using ActiveX Data objects technology, which by programming method connects drawing and database. Drawing's graphical objects have additional data from which exchange of data between graphical system and database is executed. Second, program selects diameters of pipes from standard pipes database by using programmingobject's pipe properties and methods. Third, the program, knowing radiators' and pipes' geometry, designs house heating system. Design system and example of the house heating project is presented. Specific creation features of the house heating automated design system are discussed and conclusions are made
Semantic web researchers tend to assume that XML Schema and OWL-S are the correct means for representing the types, structure, and semantics of XML data used for documents and interchange between programs and services...
详细信息
ISBN:
(纸本)9781605580814
Semantic web researchers tend to assume that XML Schema and OWL-S are the correct means for representing the types, structure, and semantics of XML data used for documents and interchange between programs and services. These technologies separate information representation from implementation. The separation may seem like a benefit, because it is platform-agnostic. The problem is that the separation interferes with writing correct programs for practical document engineering, because it violates a primary principle of object-oriented programming: integration of data structures and algorithms. We develop air XML binding framework that connects Java object declarations with serialized XML representation. A basis of the framework is a metalanguage., embedded in Java object and field declarations, designed to be particularly concise, to facilitate the authoring and maintenance of programs that generate and manipulate XML documents. The framework serves as the foundation for a layered software architecture that includes meta-metadata descriptions for multimedia information extraction, modeling, and visualization;Lightweight Semantic Distributed Computing Services interaction logging services;and a user Studies framework.
暂无评论