diff --git a/Makefile.am b/Makefile.am
index 56c508b..743a7b3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,7 +46,7 @@ BUILT_SOURCES = frontends/LexOccam.hs frontends/LexRain.hs CompilerCommands.hs
CLEANFILES = $(BUILT_SOURCES)
tock_SOURCES = transformations/SimplifyExprs.hs transformations/SimplifyTypes.hs
-tock_SOURCES += transformations/Unnest.hs transformations/UsageCheck.hs transformations/SimplifyProcs.hs
+tock_SOURCES += transformations/Unnest.hs transformations/RainUsageCheck.hs transformations/SimplifyProcs.hs
tock_SOURCES += transformations/SimplifyComms.hs
tock_SOURCES += frontends/PreprocessOccam.hs frontends/ParseRain.hs frontends/StructureOccam.hs
tock_SOURCES += frontends/ParseOccam.hs frontends/RainTypes.hs frontends/RainPasses.hs frontends/ParseUtils.hs
@@ -60,7 +60,7 @@ tock_SOURCES += backends/GenerateC.hs backends/GenerateCPPCSP.hs
tock_SOURCES += Main.hs
tocktest_SOURCES = $(tock_SOURCES)
-tocktest_SOURCES += transformations/PassTest.hs transformations/UsageCheckTest.hs
+tocktest_SOURCES += transformations/PassTest.hs transformations/RainUsageCheckTest.hs
tocktest_SOURCES += backends/GenerateCTest.hs backends/BackendPassesTest.hs
tocktest_SOURCES += common/TestUtil.hs common/CommonTest.hs common/FlowGraphTest.hs
tocktest_SOURCES += frontends/ParseRainTest.hs frontends/RainPassesTest.hs frontends/RainTypesTest.hs
diff --git a/TestMain.hs b/TestMain.hs
index 87440fe..6d4988c 100644
--- a/TestMain.hs
+++ b/TestMain.hs
@@ -32,7 +32,7 @@ with this program. If not, see .
--
-- * "RainPassTest"
--
--- * "UsageCheckTest"
+-- * "RainUsageCheckTest"
module TestMain () where
import Test.HUnit
@@ -45,7 +45,7 @@ import qualified ParseRainTest (tests)
import qualified PassTest (tests)
import qualified RainPassesTest (tests)
import qualified RainTypesTest (tests)
-import qualified UsageCheckTest (tests)
+import qualified RainUsageCheckTest (tests)
main :: IO ()
main = do runTestTT $ TestList
@@ -58,6 +58,6 @@ main = do runTestTT $ TestList
,PassTest.tests
,RainPassesTest.tests
,RainTypesTest.tests
- ,UsageCheckTest.tests
+ ,RainUsageCheckTest.tests
]
return ()
diff --git a/transformations/UsageCheck.hs b/transformations/RainUsageCheck.hs
similarity index 95%
rename from transformations/UsageCheck.hs
rename to transformations/RainUsageCheck.hs
index 5598cce..dfc1be8 100644
--- a/transformations/UsageCheck.hs
+++ b/transformations/RainUsageCheck.hs
@@ -16,7 +16,11 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see .
-}
-module UsageCheck where
+-- | This code implements the usage checking in Rain. It is designed to work with
+-- the control-flow graph stuff, hence the use of functions that match the dictionary
+-- of functions in FlowGraph. This is also why we don't drill down into processes;
+-- the control-flow graph means that we only need to concentrate on each node that isn't nested.
+module RainUsageCheck where
import Data.Generics
import Data.List
diff --git a/transformations/UsageCheckTest.hs b/transformations/RainUsageCheckTest.hs
similarity index 99%
rename from transformations/UsageCheckTest.hs
rename to transformations/RainUsageCheckTest.hs
index 727e6e5..0fb345f 100644
--- a/transformations/UsageCheckTest.hs
+++ b/transformations/RainUsageCheckTest.hs
@@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see .
-}
-module UsageCheckTest (tests) where
+module RainUsageCheckTest (tests) where
import Prelude hiding (fail)
import Test.HUnit
@@ -24,7 +24,7 @@ import Test.HUnit
import qualified AST as A
import TestUtil
-import qualified UsageCheck as UC
+import RainUsageCheck
--See note in UsageCheck about WrittenRead not using sets. Therefore our equality function is inefficient