Workflow and Source Panels
Work Queue Panel
Model queue-like work with a fixed C array and bounded loop.
Work Queue Panel
work_queue_panel.c
Replay: real traced execution (multi-file project)
#include <stdio.h>
int main(void) {
int extraChoice = 1;
const char *extra = "audit";
if (extraChoice == 0) {
extra = "review";
} else if (extraChoice == 2) {
extra = "ship";
}
const char *tasks[3] = {"read", extra, "write"};
int total = 0;
for (int i = 0; i < 3; i++) {
printf("run:%s\n", tasks[i]);
total++;
}
printf("extra=%s\n", extra);
printf("total=%d\n", total);
return 0;
}
#include <stdio.h>
int main(void) {
int extraChoice = 0;
const char *extra = "audit";
if (extraChoice == 0) {
extra = "review";
} else if (extraChoice == 2) {
extra = "ship";
}
const char *tasks[3] = {"read", extra, "write"};
int total = 0;
for (int i = 0; i < 3; i++) {
printf("run:%s\n", tasks[i]);
total++;
}
printf("extra=%s\n", extra);
printf("total=%d\n", total);
return 0;
}
#include <stdio.h>
int main(void) {
int extraChoice = 2;
const char *extra = "audit";
if (extraChoice == 0) {
extra = "review";
} else if (extraChoice == 2) {
extra = "ship";
}
const char *tasks[3] = {"read", extra, "write"};
int total = 0;
for (int i = 0; i < 3; i++) {
printf("run:%s\n", tasks[i]);
total++;
}
printf("extra=%s\n", extra);
printf("total=%d\n", total);
return 0;
}
extraChoice ← 1, extra ← audit, tasks ← ⟨addr A⟩, total ← 0
3int main(void) {4 int extraChoice→ 1 = 1; //@extraChoice=0, 25 const char *extra→ audit = "audit";6 if (extraChoice == 0) {7 extra = "review";8 } else if (extraChoice == 2) {9 extra = "ship";10 }1112 const char *tasks→ ⟨addr A⟩[3] = {"read", extraaudit, "write"};13 int total→ 0 = 0;total ← 1
pass 1 of 315for (int i0 = 0; i < 3; i++) {16 printf("run:%s\n", tasks[i]read);17 total→ 1++;18}outputrun:readAll 3 passes — pass 1 is the card above pass itasks[i]total1 0 read 0 → 1 2 1 audit 1 → 2 3 2 write 2 → 3 printf("extra=%s ", extra);
20 printf("extra=%s\n", extraaudit);21 printf("total=%d\n", total3);22 return 0;23}outputextra=audit total=3
extraChoice ← 0, extra ← audit
3int main(void) {4 int extraChoice→ 0 = 0;5 const char *extra→ audit = "audit";6 if (extraChoice == 0) {extra ← review
5const char *extra = "audit";6if (extraChoice0 == 0) {7 extra→ review = "review";8} else if (extraChoice == 2) {tasks ← ⟨addr A⟩, total ← 0
12const char *tasks→ ⟨addr A⟩[3] = {"read", extrareview, "write"};13int total→ 0 = 0;total ← 1
pass 1 of 315for (int i0 = 0; i < 3; i++) {16 printf("run:%s\n", tasks[i]read);17 total→ 1++;18}outputrun:readAll 3 passes — pass 1 is the card above pass itasks[i]total1 0 read 0 → 1 2 1 review 1 → 2 3 2 write 2 → 3 printf("extra=%s ", extra);
20 printf("extra=%s\n", extrareview);21 printf("total=%d\n", total3);22 return 0;23}outputextra=review total=3
extraChoice ← 2, extra ← audit
3int main(void) {4 int extraChoice→ 2 = 2;5 const char *extra→ audit = "audit";6 if (extraChoice == 0) {extra ← ship
7 extra = "review";8} else if (extraChoice2 == 2) {9 extra→ ship = "ship";10}tasks ← ⟨addr A⟩, total ← 0
12const char *tasks→ ⟨addr A⟩[3] = {"read", extraship, "write"};13int total→ 0 = 0;total ← 1
pass 1 of 315for (int i0 = 0; i < 3; i++) {16 printf("run:%s\n", tasks[i]read);17 total→ 1++;18}outputrun:readAll 3 passes — pass 1 is the card above pass itasks[i]total1 0 read 0 → 1 2 1 ship 1 → 2 3 2 write 2 → 3 printf("extra=%s ", extra);
20 printf("extra=%s\n", extraship);21 printf("total=%d\n", total3);22 return 0;23}outputextra=ship total=3
queue panel
A fixed work list gives replay clear loop steps without depending on threads or host input.