Skip to content

The easiest way to get started with dataflow testing including control flow graph, program slice and du-path.

Notifications You must be signed in to change notification settings

gaspardruan/pflux

Repository files navigation

Electron Fiddle icon Pflux

Pflux lets you analyze the dataflow of a python function, which is focused on the variable value changing. Based on the dataflow testing principles, it can generate CFG(control flow graph), program slice(all the code lines definitly or possibly affecting the chosen variable value), dc-path(define-clear path), and then analyze the coverage standard(how many dc-path the test case covers) according to your given test case.

In addition, the ui design draws inspiration from Electron Fiddle.

Get Started

After cloning the repo,

cd pflux
npm install
npm start

Features

Control Flow Graph

control flow graph screenshot

The CFG divides the function into blocks. Each line of code must be executed only once when the program running into the block.

Program Slice

program slice screenshot

Program slice is a collection of code lines which may affect the value of chosen variable. For example, sum = a + b affects the value of sum and if sign > 0: sum = a + b possibly possibly affect the value of sum, both are program slice of sum.

Def-Clear Path

define-clear path screenshot

Pflux gives the def-clear path but not def-use path. The only difference is that def-clear path has only one defining point at the beginning of the path but def-use path does not. Clear can alse be regarded as killing a value of the variable, more accuratedly, reassgining a variable.

About

The easiest way to get started with dataflow testing including control flow graph, program slice and du-path.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published