Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools

Context-oriented Programming in Java as a LogicAJ Aspect

Context-oriented programming (COP) enriches programming languages and execution environments with features to explicitly represent context-dependent behavior variations.

See Context-oriented programming for details.

In short-term this page will provide a LogicAJ aspect realizing the context-oriented programming paradigm with the help as an aspect library. We also make available a small sample application demonstrating the use of the aspect.

The Aspect

Demo Application

This section describes a mobile community application. Consider, Tim and Lucy are two students. Both possess a mobile phone with a client software that allows friends to check each others context information, e.g., location or current activity. At noon they have an appointment at the university campus in Potsdam. Tim lives in the center of Berlin from which he has a 50 minutes train ride to university. When he leaves home, his mobile connects to GPS and provides exact location data via a service. When Lucy arrives at campus at 11:50, she checks her phone to see Tim’s whereabout. Depending on her current context, the application renders Tim's activity in different ways.

The context-dependent behavior of the application is implemented with the COP aspect written in LogicAJ.

Installation and Running the Application

First, install the LogicAJ plugin. Then, import the project into your eclipse installation. Weave the aspect “ContextJAspect” and run the Main class in the output project.

Triggering Context Change

The application simulates a mobile device. The screen shows a map with a point representing Tim's current location. A second window allows to trigger context information. Context change leads to different user representations on the mobile device.

research/logicaj/cop.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024