Code Monkey home page Code Monkey logo

spec-based's Introduction

Spec-based testing

Spec-based is an environment to testing concurrent Java programs based on specifications by using JPF and Maude.

Brevity, for a formal specification S and a concurrent program P, state sequences are generated from P and checked to be accepted by S. We suppose that S is specified in Maude and P is implemented in Java. Java Pathfinder (JPF) and Maude are then used to generate state sequences from P and to check if such state sequences are accepted by S, respectively. Even without checking any property violations with JPF, JPF often encounters the notorious state space explosion while only generating state sequences. Thus, we propose a technique to generate state sequences from P and check if such state sequences are accepted by S in a stratified way. Some experiments demonstrate that the proposed technique mitigates the state space explosion instances from which otherwise only one JPF instance cannot suffice.

Features

  • Generating all possible state sequences from concurrent Java programs by JPF

  • Checking state sequences with Maude specification on the fly.

  • Divide & Conquer approach to generating state sequences in a stratified way.

  • Parallelizing the whole process of the environment from generating state sequences to checking such state sequences to be accepted by specifications.

Dependences

  • MySQL is a relational database that is used to save all state sequences after being checked by Maude programs.
  • Redis is used as a memory cache to avoid duplicate states as well as state sequences.
  • RabbitMQ is used as a message broker to deliver messages to workers.
  • Maude is used to load specification and test state sequences by using meta-programing supported by itself.
  • JPF is known as a model checker software specialized in Java programs that is used to generate state sequences.

How to install

  • Clone the source code to your computer and go to the source code directory.

  • Copy jpf.properties.sample file to jpf.properties. All configuration is set into this file.

  • The environment supports two modes running, including local and remote modes.

  • Check the configuration with Redis, RabbitMQ as well as MySQL in the configuration file.

  • To run experiments, you need to change the "caseStudy" key in the configuration file that corresponds to a case study being checked.

  • To extend more case studies, if you want to conduct a new case study with the environment, you need to create your own CaseStudy by extending from config.CaseStudy class. And then do as follows:

    • Configure the application with your own case study in server.ApplicationConfiguration file.

    • Overwrite the initial message sending to the system for kick-off, getInitialMessage method in your own CaseStudy file.

    • Remember to change the case study in the configuration file, in which you may run your own case study.

Case Studies

Some case studies are conducted to demonstrate the correctness as well as the efficiency of the environment as follows.

  • Test & Set Protocol (TAS)
  • Alternative Bit Protocol (ABP)
  • Needham-Schroeder Public-key Authentication Protocol (NSPK and NSLPK)
  • Simplified Cloud Synchronization Protocol (CloudSync)

Publication

Known Issues

Checking the known issues at here. You are appreciated to report bugs to improve the extension as well.

Release Notes

1.0.1

spec-based's People

Contributors

canhminhdo avatar

Watchers

 avatar

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.