Giter Club home page Giter Club logo

asp-checker's Introduction

ASP-checker

Tool designed to check whether the advices affecting the execution of a method comply with the Advice Substitution Principle. Developed as a Proof of Concept for a Master Thesis done in the University of Antwerp. Instructions on how to use the tool as well as a detailed explanation of the checking tasks performed are availble at the Thesis report.

The ASP-checker uses the behavioural subtyle checker as a basis and provides similar functionality for AspectJ. It is available as an AJDT plugin.

##Purpose

As it happens due to polymorphism in object oriented inheritance, the execution of aspects can carry unexpected consequences. If an aspect advising a method does not behave as a behavioural subtype it can cause undesired effects that are unknown for the code that executes the method.

This checker retrieves all the advices affecting a method and checks whether they comply with the ASP rules. The contracts that can be specified are:

  • Requires
  • Ensures
  • Invariant

There is one additional contract that can be used in the cases in which compliance with the ASP cannot be achieved, such as security or authentication, where a consequence of the advice could be not executing the originally intended functionality. This is achieved by using the advisedBy contract. This contract attaches to the method and marks these changes in its behaviour.

##Usage

The 3 contracts can be attached as Java annotations to both methods an advices. advisedBy clauses can be used with methods, while a name annotation must be used with the advices in order to give them a name and be included in advisedBy clauses.

Contracts can be specified in a subset of Java that covers the basic expressions. For more information about what it is supported, refer to the report. A simple example of a par of advice and method could be the following:

@requires("a.length > 10")
@advisedBy("bar")
void foo(String a){...}
@ensures("str.isEmpty()")
@name("bar")
void before(String str): call( void *.foo (String)) && args(str) {...}

##Install Information regarding installation can be found in the INSTALL.md file.

asp-checker's People

Contributors

luismayorga avatar

Stargazers

Tim Molderez avatar Coen De Roover avatar

Watchers

 avatar James Cloos avatar Coen De Roover avatar Tim Molderez avatar

asp-checker's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.