Mirror of http://offog.org/git/tock.git . Tock (translator from occam to C from Kent) is a Haskell-based compiler for occam and related languages.
Go to file
Neil Brown 8d95b65f00 Added support for the new AlternativeWait guards to the C backend
This was not as straightforward as the C++ backend.  CIF has no capability for supporting waiting *for* a specified time as an ALT guard; only waiting until (AFTER, in occam) a specified time.  This is further complicated by the fact that when you disable an ALT timer guard in CIF, you have to be able to supply the timeout value that you waited on in the enable sequence.

Therefore, I added a pass that transforms all WaitFor guards into WaitUntil guards, by declaring nonce time variables, getting the time, and adding on the delay that we want to wait for; these actions occur just before the ALT.

This new pass is in the new BackendPasses module, into which I also moved the identifyParProcs pass.  I also wrote tests for my new pass that live in the new BackendPassesTest module.
2007-09-27 11:48:04 +00:00
backends Added support for the new AlternativeWait guards to the C backend 2007-09-27 11:48:04 +00:00
common Fixed a bug where the default cases were left out for the recent "genericised" functions in the Types module 2007-09-27 10:59:35 +00:00
docextra Added a description and diagram to the contents page of the haddock-generated documentation 2007-08-30 15:36:34 +00:00
frontends Rain: implemented type-checking for wait guards 2007-09-26 23:42:40 +00:00
testcases Added the first Rain program to the testcases directory and added Makefile rules for compiling *.rain into *x using the C++CSP backend 2007-08-28 16:02:22 +00:00
transformations Changed the testPass* functions in TestUtil to return Assertion instead of Test 2007-09-15 13:35:51 +00:00
COPYING Add licensing information. 2007-08-18 20:42:11 +00:00
COPYING.LIB Add licensing information. 2007-08-18 20:42:11 +00:00
kroc-wrapper-c.c Add licensing information. 2007-08-18 20:42:11 +00:00
kroc-wrapper.occ Add licensing information. 2007-08-18 20:42:11 +00:00
LANGUAGE Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00
Main.hs Removed some debug code that was accidentally left in a previous patch 2007-09-18 11:42:00 +00:00
Makefile Fixed the haddock command in the Makefile 2007-09-16 08:43:17 +00:00
SYNTAX Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00
TestMain.hs Added support for the new AlternativeWait guards to the C backend 2007-09-27 11:48:04 +00:00
tock_support_cppcsp.h Add licensing information. 2007-08-18 20:42:11 +00:00
tock_support.h Add licensing information. 2007-08-18 20:42:11 +00:00
TODO Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00