-
Notifications
You must be signed in to change notification settings - Fork 1
Description
The dataflow logger should exist along side the goVec logger, and keep track of the control flow at runtime. The logger should be initialized at the same time, and have the same lifespan as the vector clock logger.
The purpose of the logger is to dynamically track which conditional have been entered and which have not. The logger should maintain a tree like structure of booleans referencing every conditional in a package. The logger should have functions for setting each of the booleans sharing a root to false, and a method for setting individual booleans to true.
The names of the conditionals should be collected during instrumentation. The code for initializing the control flow logger should be injected into inject.go and run during the initdinv() procedure.
example
source.go
#!go
0 main ( argc ) {
1 if ( argc > 2) {
2 panic()
3 } else {
4 for ( conditonal ) {
5 switch ( other ) {
6 case: "it"
7 continue
8 case: "happend"
9 break
10 }
11 }
12 }
13 if (happy) {
14 print("good morning world")
15 }
The logger should contain a tree structure of booleans as follows
- main_source_ifstatement_L0
- main_source_if_L0
- main_source_else_L3
* main_source_for_L4
* main_source_switch_L5
* main_source_case_L6
* main_source_case_L8
- main_source_if_L13
Interface
##setFalse(root)
The setFalse function takes a root, or internal node and sets all of its leaf values to false. for example calling cflogger.setFalse("main_source_switch_L5") would set entries main_source_case_L6 = false andmain_source_case_L8 = false`
##setTrue(leaf)
Sets an individual leaf to true.
[Issue created by wantonsolutions: 2015-08-21]