How to Use Terminals as Input Parameters to Operators in JGAP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to Use Terminals as Input Parameters to Operators in JGAP

neelofar javaid

I have data from bug repository having four attributes
ep, ef, np, nf (execute passed, execute failed, not executed passed, not executed failed). Data contains millions for rows, each having values for these four parameters. One row out of these millions rows represent buggy line of code. My goal is to develop a formula which using all these four parameters distinguish buggy line from non buggy lines of code.
A known solution to this problem is c1*ef + c2*np where is c1 is very large number and c2 is very small as compared to c1. c1 can be 1 if c2 is <<<1. I want to find weights of ef and np (or c1 and c2 values in such away that c1+c2 = 100 in any case) that will best distinguish buggy line from non buggy line of code. Final result (Best formula for bug localization) should be displayed in this way

45ef + 55np
55ef + 45np
90ef + 10np

I tried using 1..100 as terminal, ef and np as variables and multiply and add as operator but I am getting solutions like this
(((4.0 + (32.0 * ef)) + ef) + ef) * ((ef * ef) + ((ef * ef) + np))
I googles a lot but could not find how can I
1. Use my terminals as inputs to operators (passing any value between 1 and 100 to add)
2. How can I control which variable/terminal should be passes as first parameter to ADD and which one as second.

Please suggest how can I solve this problem.

Best Regards,



jgap-users mailing list
[hidden email]