Giter Site home page Giter Site logo

memo's Introduction

MeMo

MeMo is an approach to automatically identify metamorphic relations inside natural language, unstructured code comments. The identified MRs are automatically translated into executable test oracles that can be weaved into existing test suites. As of now the prototype works on Javadoc method summaries, and thus produces Java assertions.

Releases

To produce the executable (MeMo-1.0-all.jar), after cloning the repo launch ./gradlew shadowJar.

Prerequisites

Please notice that both the Gradle wrapper and the Major tool needed for the analysis explained in the next section may show inconsistent behaviour with Java 9+. Until a workaround for such issues is not found, you are advised to get a Java 8 release before running any experiment with MeMo (e.g., here)

Translations

Under this folder you find the ground truth. You may check the files for each project class manually. The format looks like:

expected-equivalences/<project-identifier>/<fully-qualified-class-name>_goal.json

Each first-level object is the representation of a method of the class. Inside each method, look for "equivalence" objects: if attribute "condition" is non-empty, that is the translation it is expected by MeMo for such method and comment.

Example. To check class org.apache.commons.math3.geometry.euclidean.threed.FieldRotation of Apache Commons Math, reach the corresponding file.

You will find an expected translation for method applyInverseTo(org.apache.commons.math3.geometry.euclidean.threed.FieldRotation r).

To verify MeMo performances on such dataset, clone this repo and launch ./gradlew accuracyEQComplete, which will show the translations produced on the present ground truth. For each method of each class, MeMo may produce exactly the translation written in the file (Correct), a non-empty translation that differs from the expected one (Wrong), an empty translation when condition is not empty (Missing), or a non-empty translation when no condition was expected (Spurious).

Mutation analysis experiments

Please go to this repository for complete instructions on how to reproduce the Mutation analysis results. These experiments practically show how MeMo assertions can detect bugs.

Troubleshooting

If you encounter any problem, please open an issue or contact the main developer at [email protected]

memo's People

Contributors

albertogoffi avatar ariannab avatar jammua avatar khaeghar avatar mernst avatar gorla 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.