graphicsfuzz icon indicating copy to clipboard operation
graphicsfuzz copied to clipboard

Transformation idea: extend trivial for loop range

Open paulthomson opened this issue 5 years ago • 13 comments

E.g.

for (int i = 0; i < 3; ++i) {
  ...
}

->

for (int i = 0; i < 100; ++i) {
  if (i >= 3) { break; }
  ...
}

This might difficult to reduce.

paulthomson avatar Apr 14 '20 15:04 paulthomson

This could be encoded as:

for (int i = 0; i < _GLF_ENLARGED_LOOP_BOUND(i, 3, 100); ++i) {
    if (_GLF_ENLARGED_LOOP_BREAK(i, i >= 3) {
         break;
    } else {
        // original statements
    }
}

The reducer would then be able to reverse the transformation by identifying and acting on a pair of such macros that use the same loop variable, i.

afd avatar Apr 14 '20 16:04 afd

Hi there I want to solve this issue Please help me through this

shubhav99 avatar Mar 17 '21 09:03 shubhav99

I suggest you revisit this after you've solved #958. (In the meantime it would be fine for someone else to take this one.)

afd avatar Mar 17 '21 10:03 afd

i m interested to solve this problem

PRATHAM0908 avatar Mar 17 '21 14:03 PRATHAM0908

i am a beginner i want to solve this issue please help me

KishkinJ10 avatar Mar 23 '21 14:03 KishkinJ10

hey can anyone give more insight i mean what example that has been mentioned only that we have to add?

MUzairS15 avatar Apr 04 '21 16:04 MUzairS15

hello can i work in this issue?

Rishi6229 avatar May 05 '21 05:05 Rishi6229

hello i am a beginner in this issue,could you please tell me how to get started

nived1967 avatar May 13 '21 20:05 nived1967

hi could i work on this issue?

unnati914 avatar Jul 27 '21 12:07 unnati914

I like to Work On this issue, Please Give me a Chance.

Jdbarad avatar Oct 27 '21 04:10 Jdbarad

I would like to work on this issue.

shashikant649sharma avatar Dec 02 '21 15:12 shashikant649sharma

I would like to solve this issue , give me a chance

aditya-mistri avatar Feb 10 '23 06:02 aditya-mistri