tock-mirror/TestMain.hs
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

55 lines
1.6 KiB
Haskell

{-
Tock: a compiler for parallel languages
Copyright (C) 2007 University of Kent
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
-}
-- | A module containing the 'main' function for the Tock test suite. It currently runs tests from the following modules:
--
-- * "BackendPassesTest"
--
-- * "CommonTest"
--
-- * "PassTest"
--
-- * "RainParseTest"
--
-- * "RainPassTest"
--
-- * "UsageCheckTest"
module TestMain () where
import qualified ParseRainTest (tests)
import qualified RainPassesTest (tests)
import qualified RainTypesTest (tests)
import qualified UsageCheckTest (tests)
import qualified PassTest (tests)
import qualified CommonTest (tests)
import qualified BackendPassesTest (tests)
import Test.HUnit
main :: IO ()
main = do runTestTT $ TestList
[
PassTest.tests
,CommonTest.tests
,ParseRainTest.tests
,RainPassesTest.tests
,RainTypesTest.tests
,UsageCheckTest.tests
,BackendPassesTest.tests
]
return ()