Coder Social home page Coder Social logo

bblodfon / yates-hennel-gen Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 1.55 MB

A generalization of the Yates and Hennel algorithm (branch coverage software testing)

License: MIT License

C 100.00%
c yates-hennel algorithm branch-coverage software-testing

yates-hennel-gen's Introduction

yates-hennel-gen

In this repo I have implemented a generalization of the Yates and Hennel algorithm.

Method

The Yates-Hennel paper presents an algorithm for full branch coverage testing of any program.

The implementation of the simple Yates-Hennel algorithm would choose one arbitrary forward tree from the Decision-to-Decision (DD) graph and a backward one and then it would calculate n-m+1 paths based on the shortest paths of those trees and the formula that is being presented on the paper. This method can produce paths that are maybe non-coverable or don't reach 100% brach-coverage (Test Effectiveness Ratio - TER2 = 1).

My algorithm is an extension of the Yates-Hennel algorithm in the sense that it produces all the sets of solution result paths from every combination of forward and backward trees. (DD-graph is actually a multigraph so that's why there can be many forward and backward trees).

Having every possible solution path set (with the addition of being able to remove paths that you know beforehand that are non-coverable and also removing solution path sets that are permutations of others) you can easily find the best one in terms of TER2 coverage.

Compile and run (Windows)

g++ -std=c++11 hennel.c -o hennel.exe
hennel.exe < findroot.txt

Notes

  • The .txt files have Basic Block graphs that represent simple programs: 1 2 3 in one line translates to 2 edges: 1->2 and 1->3.
  • The excluded_paths.txt has the number of paths excluded and the path themselves (you can change them as you like).
  • The results.txt is the file where all the results are stored (and some other info, like number of forward trees, etc.)
  • The hennel_graphs directory has some graphs created (based on the triangle.txt file) with the use of the dot program.

yates-hennel-gen's People

Contributors

bblodfon avatar

Watchers

 avatar  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.