Skip to content

Run Belief Propagation on Tregression

WYK edited this page Oct 20, 2022 · 2 revisions

Tregression can now debug based on belief propagation technique. For more information about debuggin on belief propagation, please refer to the paper Debugging with Intelligence via Probabilistic Inference.

  1. It is assumed that Microbat is installed

  2. Please open microbat\microbat\BP_Server\BP_Server.ipynb using jupyter notebook

  3. Run every cell in BP_Server.ipynb

  4. In the Tregression Preference, you may want to check the Give feedback manually box.

    Give feedback manually: Check this box if you want to give the feedback manually, which is also the recommanded choice.

    If the box is unchecked, then tregression will give the feedback by comparing the buggy trace and correct trace. However, since some of the variable are changed for running the baseline, it is possible that tregression may give wrong feedback.

  5. If you are testing belief propagation with mutation framework, after the mutation is done, Tregression will print out the automatically detected input and output variables. If the variable are correctly detected, please skip step 5.

  6. Define the input and the output variables:

    • Define Inputs Variables

      1. Navigate to the node that define the input variables. Note that there may be multiple node that define input variables.
      2. In the Step Property View, select the input varaibles and click Inputs button.

    • Define Outputs Variables

      1. Navigate to the node that define the output variables.
      2. In the Step Property View, select teh output variables and click Outputs button
    • Check Selected IO

      1. In the Step Property View, click the IO button. It will print the information of selected inputs and outputs variable in the console
    • Clear Selected IO

      1. If you select a wrong input or output, you need to click the Clear button in Step Property View to erase all the selected inputs and outputs, then select them again.
  7. Click the Green Go Back button to perform belief propergation wait for the result.

  8. If the recommanded node is not the root cause, the program will for feedback. You will need to give the feedback manually if you click the manual feedback box in the Tregrssion Preference.

    • Give feedback CORRECT
      1. In Step Porperty View, check the correct button and click the Feedback button to submit the feedback.

    • Give feedback WRONG PATH
      1. In Step Porperty View, check the control button and click the Feedback button to submit the feedback.

    • Give feedback WRONG VARIABLE
      1. In Step Porperty View, check the data button
      2. Select all the variable that you think is wrong
      3. Click the Feedback button to submit the feedback.

  9. Repeat the step 7 until the root cause is found. Or, after giving 20 feedbacks, the program will stop and claim that root cause cannot be found. Plase note the it takes time to wait for belief propagation to converge.

Reference

  1. Xu, Zhaogui, et al. "Debugging with intelligence via probabilistic inference." Proceedings of the 40th International Conference on Software Engineering. 2018.
  2. Implementation for Belief Propagation link

Clone this wiki locally