-
Notifications
You must be signed in to change notification settings - Fork 7
Run Belief Propagation on Tregression
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.
-
It is assumed that Microbat is installed
-
Please open
microbat\microbat\BP_Server\BP_Server.ipynbusing jupyter notebook -
Run every cell in
BP_Server.ipynb -
In the Tregression Preference, you may want to check the
Give feedback manuallybox.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.
-
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.
-
Define the input and the output variables:
-
Define Inputs Variables
- Navigate to the node that define the input variables. Note that there may be multiple node that define input variables.
- In the
Step Property View, select the input varaibles and clickInputsbutton.
-
Define Outputs Variables
- Navigate to the node that define the output variables.
- In the
Step Property View, select teh output variables and clickOutputsbutton
-
Check Selected IO
- In the
Step Property View, click theIObutton. It will print the information of selected inputs and outputs variable in the console
- In the
-
Clear Selected IO
- If you select a wrong input or output, you need to click the
Clearbutton inStep Property Viewto erase all the selected inputs and outputs, then select them again.
- If you select a wrong input or output, you need to click the
-
-
Click the
Green Go Backbutton to perform belief propergation wait for the result.
-
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 feedbackbox in theTregrssion Preference.-
Give feedback CORRECT
- In
Step Porperty View, check thecorrectbutton and click theFeedbackbutton to submit the feedback.
- In
-
Give feedback WRONG PATH
- In
Step Porperty View, check thecontrolbutton and click theFeedbackbutton to submit the feedback.
- In
-
Give feedback WRONG VARIABLE
- In
Step Porperty View, check thedatabutton - Select all the variable that you think is wrong
- Click the
Feedbackbutton to submit the feedback.
- In
-
Give feedback CORRECT
-
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.
- Xu, Zhaogui, et al. "Debugging with intelligence via probabilistic inference." Proceedings of the 40th International Conference on Software Engineering. 2018.
- Implementation for Belief Propagation link