Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A question about a variable in the algorithm described in the paper #1

Open
hongruyang opened this issue Oct 2, 2022 · 0 comments
Open

Comments

@hongruyang
Copy link

Data:
    Input variables : inVars, Input specifications : inSpecs,      
    Program :P, Program with injected inaccuracy checks :P’, 
    Time budget :tBudget, Timeout parameters : τ0, τ1
Result:
    Maximum error, the error-inducing input

tStart = time();
/* Random search for an error-inducing input. */
randomErrMax = 0;
inBase = NULL;    
rStart = time();
while time() - rStart < τ0 do   
    generate a random input in the input domain : in;      
    err = compute - error(in, P);      
    if err > eMax then        
        randomErrMax = err;  
        inBase = in;      
    end 
end

/* Separate the input variables into operands. */
op1Vars,op2Vars = partition - variables(inVars, inSpecs);

/* Initilization. */
errMax = randomErrMax;
errInput = inBase;
concVars = op1Vars;    
symbVars = op2Vars;     
while time() - tStart < tBudget do 
    /* Concretize convVars using base values. */
    concretize the variables in convVars using inBase;
    symbolize the variables in symbVars;
    STAT, sInputs = symbolic - execution(convVars, symbVars, P’, τ1);     
    if STAT = timeout then 
        sNum = length(symbVars);
        s1Vars, s2Vars = random - divide(symbVars, sNum / 2, sNum / 2);   
        convVars = convVars + s1Vars;       
        symbVars = s2Vars;
    else
        for sInput in sInputs do
            err = compute-error(join-input(sInput, inBase), P);
            if err > errMax then 
                errMax = err;
                errInput ← join - input(sInput, inBase);
            end 
        end 
        sNum = length(symbVars);
        lop2 = length(op2Vars);
        s1Vars, s2Vars = random - divide(op2Vars, lop2 - sNum, sNum);
        convVars = op1Vars + s1Vars;
        symbVars = s2Vars;
     end
end
return errMax,errInput

Hello, I'm reading your paper recently.

I don't understand the variable InBase and sInput in the algorithm mentioned in your paper.

Taking x+y as an example, does InBase generate the values of x and y, or x or y.

My understanding is that the value in x or y is taken as the specific variable.

In addition, could you please explain the algorithm more?I just entered this field, and I don't know many things.Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant