Modern systems require programmers to develop code that dynamically adapts to different contexts, leading to the evolution of new context-oriented programming languages. These languages introduce new software-engineering challenges, such as: how to maintain and keep the separation of concerns of the codebase? how to model the changing behaviors? how to verify the system behavior? and more.
This paper introduces Context-Oriented Behavioral Programming(COBP) - a novel paradigm for developing context-aware systems, centered on natural and incremental specification of context-dependent behaviors. As the name suggests, we combine behavioral-programming(BP) - a scenario-based modeling paradigm - with context idioms that explicitly specify when scenarios are relevant and what information they need. The core idea is to connect the behavioral model with a data model that represents the context, allowing an intuitive connection between the models via update and select queries. Combining behavioral-programming with context-oriented programming brings the best of the two worlds, solving issues that arise when using each of the approaches in separation.
We begin with providing abstract semantics for COBP, laying the foundations for applying reasoning algorithms to context-aware behavioral programs. We then exemplify the semantics with formal specifications of systems, including a variant of Conway's Game of Life. Finally, we present a JavaScript-based implementation of the paradigm and provide two case studies of real-life context-aware systems (one in robotics and another in IoT) that were developed using this tool. Throughout the examples and case studies, we provide design patterns and a methodology for coping with the above challenges.
The development of concurrent applications is challenging because of the complexity of concurrent designs and the hazards of concurrent programming. Architectural modeling using the Unified Modeling Language (UML) can support the development process, but the problem of mapping the model to a concurrent implementation remains. This paper addresses this problem by defining a scheme to map concurrent UML designs to a concurrent object-oriented program. Using the COMET method for the architectural design of concurrent object-oriented systems, each component and connector is annotated with a stereo…
Measuring software complexity plays an important role to meet the demands of complex software. The cyclomatic complexity is one of most used and renowned metric among the other three proposed and researched metrics that are namely: Line of code, Halstead measure and cyclomatic complexity. Although cyclomatic complexity is very popular but also serves some of the problems which has been identified and showed in a tabular form in this research work. It lacks the calculation of coupling between the object classes for object oriented programming and only calculates the complexity on the basis of t…
Compensation programming is typically used in the programming of web service compositions whose correct implementation is crucial due to their handling of security-critical activities such as financial transactions. While traditional exception handling depends on the state of the system at the moment of failure, compensation programming is significantly more challenging and dynamic because it is dependent on the runtime execution flow - with the history of behaviour of the system at the moment of failure affecting how to apply compensation. To address this dynamic element, we propose the use o…
A system, which implements persistent objects, has to provide different opportunities to change the objects in arbitrary ways during their existence. A traditional realization of OO paradigm in modern programming systems has fundamental drawbacks which complicate an implementation of persistent modifiable objects considerably. There is alternative realization that does not have these drawbacks. In the article the PROGRESS operation is offered, which modify existing object within an existing inheritance hierarchy.
For the right application, the use of programming paradigms such as functional or logic programming can enormously increase productivity in software development. But these powerful paradigms are tied to exotic programming languages, while the management of software development dictates standardization on a single language. This dilemma can be resolved by using object-oriented programming in a new way. It is conventional to analyze an application by object-oriented modeling. In the new approach, the analysis identifies the paradigm that is ideal for the application; development starts with obje…
Programming tutorials are often created to demonstrate programming tasks with code examples. However, our study of Stack Overflow questions reveals the low utilization of high-quality programming tutorials, which is caused task description mismatch and code information overload. Document search can find relevant tutorial documents, but they often cannot find specific programming actions and code solutions relevant to the developers' task needs. The recently proposed activity-centric search over knowledge graph supports direct search of programming actions, but it has limitations in action cove…
Designing the user interface (UI) of mobile applications in the enterprise is performed in many cases by the application users who represent the business needs. This is based on existing developed enterprise services that can be accessed by these applications. Design the UI of the mobile applications require programming environments that are as much as possible codeless and easy to use. In this paper, we present NitroGen which is a cloud-based platform-independent tool that provides with no installation, a consumable integrated set of capabilities to construct mobile solutions aiming at reduci…
The main goal of concept-oriented programming (COP) is describing how objects are represented and accessed. It makes references (object locations) first-class elements of the program responsible for many important functions which are difficult to model via objects. COP rethinks and generalizes such primary notions of object-orientation as class and inheritance by introducing a novel construct, concept, and a new relation, inclusion. An advantage is that using only a few basic notions we are able to describe many general patterns of thoughts currently belonging to different programming paradigm…
This paper presents the modular automation for reuse in manufacturing systems (modAT4rMS) approach to support the model-driven engineering (MDE) of object oriented manufacturing automation software with regard to its usability and software modularity. With usability we refer to the aspects effectiveness, efficiency and user acceptance, as defined by ISO 9241-11. The modAT4rMS notations are based on selected features from the Unified Modeling Language (UML) and the Systems Modeling language (SysML) and iteratively further developed by a series of empirical studies with industrial practitioners …
Context-oriented programming (COP) is a new technique for programming that allows changing the context in which commands execute as a program executes. Compared to object-oriented programming (aspect-oriented programming), COP is more flexible (modular and structured). This paper presents a precise syntax-directed operational semantics for context-oriented programming with layers, as realized by COP languages like ContextJ* and ContextL. Our language model is built on Java enriched with layer concepts and activation and deactivation of layer scopes. The paper also presents a static type system…
Object-oriented programming laws have been proposed in the context of languages that are not combined with a behavioral interface specification language (BISL). The strong dependence between source-code and interface specifications may cause a number of difficulties when transforming programs. In this paper we introduce a set of programming laws for object-oriented languages like Java combined with the Java Modeling Language (JML). The set of laws deals with object-oriented features taking into account their specifications. Some laws deal only with features of the specification language. These…
We define a method to modularize crosscutting concerns in Component-Based Systems (CBSs) expressed using the Behavior Interaction Priority (BIP) framework. Our method is inspired from the Aspect Oriented Programming (AOP) paradigm which was initially conceived to support the separation of concerns during the development of monolithic systems. BIP has a formal operational semantics and makes a clear separation between architecture and behavior to allow for compositional and incremental design and analysis of systems. We distinguish local from global aspects. Local aspects model concerns at the …
Code generation from models is a core activity in model-driven development (MDD). For complex systems it is usually impossible to generate the entire software system from models alone. Thus, MDD requires mechanisms for integrating generated and handwritten code. Applying such mechanisms without considering their effects can cause issues in projects with many model and code artifacts, where a sound integration for generated and handwritten code is necessary. We provide an overview of mechanisms for integrating generated and handwritten code for object-oriented languages. In addition to that, we…
Internet of Things (IoT) has become the buzzword for the development of Smart City and its applications. In this context, development of supporting software forms the core part of the IoT infrastructure. A Middleware sits in between the IoT devices and interacts between them to exchange data among the components of the automated architecture. The Middleware services include hand shaking, data transfer and security among its core set of functionalities. It also includes cross-cutting functional services such as authentication, logging and caching. A software that can run these Middleware servic…
Siemens AG Österreich(奥地利西门子股份公司);Alpen-Adria-Universität Klagenfurt(克拉根福阿尔卑斯-亚德里亚大学)
Most of contemporary software systems are implemented using an object-oriented approach. Modeling phases -- during which software engineers analyze requirements to the future system using some modeling language -- are an important part of the development process, since modeling errors are often hard to recognize and correct. In this paper we present a framework which allows the integration of Answer Set Programming into the object-oriented software development process. OOASP supports reasoning about object-oriented software models and their instantiations. Preliminary results of the OOASP appl…
A spreadsheet usually starts as a simple and single-user software artifact, but, as frequent as in other software systems, quickly evolves into a complex system developed by many actors. Often, different users work on different aspects of the same spreadsheet: while a secretary may be only involved in adding plain data to the spreadsheet, an accountant may define new business rules, while an engineer may need to adapt the spreadsheet content so it can be used by other software systems. Unfortunately, spreadsheet systems do not offer modular mechanisms, and as a consequence, some of the previou…
Design by Contract (DbC) and runtime enforcement of program assertions enables the construction of more robust software. It also enables the assignment of blame in error reporting. Unfortunately, there is no support for runtime contract enforcement and blame assignment for Aspect-Oriented Programming (AOP). Extending DbC to also cover aspects brings forward a plethora of issues related to the correct order of assertion validation. We show that there is no generally correct execution sequence of object assertions and aspect assertions. A further classification of aspects as agnostic, obedient, …
Well structured and readable source code is a pre-requisite for maintainable software and successful collaboration among developers. Static analysis enables the automated extraction of code complexity and readability metrics which can be leveraged to highlight potential improvements in code to both attain software of high quality and reinforce good practices for developers as an educational tool. This assumes reliable readability metrics which are not trivial to obtain since code readability is somewhat subjective. Recent research has resulted in increasingly sophisticated models for predictin…
This paper reviews some programming techniques in R that have proved useful, particularly for substantial projects. These include several versions of object-oriented programming, used in a large number of R packages. The review tries to clarify the origins and ideas behind the various versions, each of which is valuable in the appropriate context. R has also been strongly influenced by the ideas of functional programming and, in particular, by the desire to combine functional with object oriented programming. To clarify how this particular mix of ideas has turned out in the current R language …
Design patterns are distilled from many real systems to catalog common programming practice. However, some object-oriented design patterns are distorted or overly complicated because of the lack of supporting programming language constructs or mechanisms. For this paper, we have analyzed several published design patterns looking for idiomatic ways of working around constraints of the implementation language. From this analysis, we lay a groundwork of general-purpose language constructs and mechanisms that, if provided by a statically typed, object-oriented language, would better support the im…
Largely known for attack scenarios, code reuse techniques at a closer look reveal properties that are appealing also for program obfuscation. We explore the popular return-oriented programming paradigm under this light, transforming program functions into ROP chains that coexist seamlessly with the surrounding software stack. We show how to build chains that can withstand popular static and dynamic deobfuscation approaches, evaluating the robustness and overheads of the design over common programs. The results suggest a significant amount of computational resources would be required to carry a…
The Logic Programming through Prolog has been widely used for supply persistence in many systems that need store knowledge. Some implementations of Prolog Programming Language used for supply persistence have bidirectional interfaces with other programming languages over all with Object Oriented Programing Languages. In present days is missing tools and frameworks for the systems development that use logic predicate persistence in easy and agile form. More specifically an object oriented and logic persistence provider is need in present days that allow the object manipulation in main memory an…
There is a gap between our ability to reuse high-level concepts in software design and our ability to reuse the code implementing them. Language Oriented Programming (LOP) is a software development paradigm that aims to close this gap, through extensive use of Domain Specific Languages (DSLs). With LOP, the high-level reusable concepts become reusable DSL constructs, and their translation into code level concepts is done in the DSL implementation. Particular products are implemented using DSL code, thus reusing only high-level concepts. In this paper we provide a comparison between two impleme…
One of the modern paradigms to develop a system is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles. After identifying objects, the various relationships among objects must be identified. This paper makes a literature review over relationships among objects. Mainly, the relationships are three basic types, including generalization/specialization, aggregation and association.This paper presents five taxonomies for properties of the relationships. The first taxonomy is based on temporal view. The second taxonomy is based o…
Many variability management techniques rely on sophisticated language extension or tools to support it. While this can provide dedicated syntax and operational mechanism but it struggling practical adaptation for the cost of adapting new technology as part of development process. We present Self-composable Programming, a language-driven, composition-based variability implementation which takes an object-oriented approach to modeling and composing behaviors in software. Self-composable Programming introduces hierarchical relationship of behavior by providing concepts of abstract function, which…
We describe some progress towards a new common framework for model driven engineering, based on behavioral programming. The tool we have developed unifies almost all of the work done in behavioral programming so far, under a common set of interfaces. Its architecture supports pluggable event selection strategies, which can make models more intuitive and compact. Program state space can be traversed using various algorithms, such as DFS and A*. Furthermore, program state is represented in a way that enables scanning a state space using parallel and distributed algorithms. Executable models crea…
Object-oriented programming (OOP) is widely used in the software industry and university introductory courses today. Following the structure of most textbooks, such courses frequently are organised starting with the concepts of imperative and structured programming and only later introducing OOP. An alternative approach is to begin directly with OOP following the Outside-In teaching method as proposed by Meyer. Empirical results for the effects of Outside-In teaching on students and lecturers are sparse, however. We describe the conceptual design and empirical evaluation of two OOP introductor…
This paper presents the formal definition of a domain-specific language, named Pantagruel, following the methodology proposed by David Schmidt for language development. This language is dedicated to programming applications that orchestrate networked entities. It targets developers that are professionals in such domains as building management and assisted living, and want to leverage networked entities to support daily tasks. Pantagruel has a number of features that address the requirements of the domain of entity orchestration. Furthermore, Pantagruel provides high-level constructs that make …
A multitude of agent-oriented software engineering frameworks exist, most of which are developed by the academic multi-agent systems community. However, these frameworks often impose programming paradigms on their users that are challenging to learn for engineers who are used to modern high-level programming languages such as JavaScript and Python. To show how the adoption of agent-oriented programming by the software engineering mainstream can be facilitated, we provide a lean JavaScript library prototype for implementing reasoning-loop agents. The library focuses on core agent programming co…
Strategic Optimization and Challenges of Large Language Models in Object-Oriented Programming
Institute for Clarity in Documentation(文献清晰度研究所);Inria Paris-Rocquencourt(法国国家信息与自动化研究所巴黎-罗康库尔中心);Rajiv Gandhi University(拉吉夫·甘地大学);Tsinghua University(清华大学);Palmer Research Laboratories(帕尔默研究实验室)
Deep Learning and Machine Learning, Advancing Big Data Analytics and Management: Object-Oriented Programming
Xi’an Jiaotong-Liverpool University(西安交通大学利物浦大学);Indiana University(印第安纳大学);Rutgers University(罗格斯大学);Purdue University(普渡大学);Kyoto University(京都大学);University of Hawaii(夏威夷大学);National Tsing Hua University(国立清华大学);The University of Texas at Dallas(德克萨斯大学达拉斯分校);Georgia Institute of Technology(佐治亚理工学院);University of Wisconsin-Madison(威斯康星大学麦迪逊分校);National Taiwan Normal University(台湾师范大学);Emory University(埃默里大学);JTB Technology Corp.(JTB技术公司)
With the advent of newly introduced programming models like Feature-Oriented Programming (FOP), we feel that it will be more flexible to include the new service invocation function into the service providing server as a Feature Module for the self-adaptive distributed systems. A composite design patterns shows a synergy that makes the composition more than just the sum of its parts which leads to ready-made software architectures. In this paper we describe the amalgamation of Visitor and Case-Based Reasoning Design Patterns to the development of the Service Invocation and Web Services Composit…
Network objects are a simple and natural abstraction for distributed object-oriented programming. Languages that support network objects, however, often leave synchronization to the user, along with its associated pitfalls, such as data races and the possibility of failure. In this paper, we present D-SCOOP, a distributed programming model that allows for interference-free and transaction-like reasoning on (potentially multiple) network objects, with synchronization handled automatically, and network failures managed by a compensation mechanism. We achieve this by leveraging the runtime semant…