3 ms·
Your comment is very useful to me. It spurned a chain of events that you might find interesting. I am interested in parallel software and multithreading, so t
by samsquire 4y ago
Your comment is very useful to me.
It spurned a chain of events that you might find interesting.
I am interested in parallel software and multithreading, so that's the kind of software I enjoy writing.
The branches of a single threaded software can think of potential future interleavings.
Your post inspired me to think of programs as "circular" or not. That is, they return to a steady state and can function properly no matter how many times they run and whether or not the execution is interrupted at any point.
A program that is interrupted can leave the program state in an invalid state that cannot be recovered.
So I started writing a parser to parse an assignment language. I plan to track object identities membership over time and see if objects get stuck in processing - they stop moving.
program {
available = {};
assigned = {};
main {
program = programs {
current_available = program.available {
available += (current_available, 1);
assigned - current_available;
}
item = program.requests {
available (=) item {
program.answers += item;
available - item;
assigned + (item, 1);
}
}
}
}
}
program {
requests = [];
requests += (add, 1);
main {
item = answers {
new_requests = [(add, 1)];
available += (item, 1);
new_request = new_requests {
requests += new_request;
}
}
answers -= answers;
}
}