Commit Graph

1278 Commits

Author SHA1 Message Date
Neil Brown
78a29de1d4 Added a couple of notes about replicators 2008-01-28 17:36:43 +00:00
Neil Brown
ebf99b08e0 Fixed some tests in RainUsageCheckTest 2008-01-28 17:30:31 +00:00
Neil Brown
7959faea40 Added support for checking for plain variables breaking CREW when used in parallel 2008-01-28 17:26:26 +00:00
Neil Brown
a1db6f989a Added support for printing out a Set of Var using showCode 2008-01-28 17:24:58 +00:00
Neil Brown
edc3a7e910 Removed the die function (that has no source position) and as far as possible replaced all its uses with dieP and a valid position 2008-01-28 17:21:13 +00:00
Neil Brown
d94f10ef77 Changed the instance of Ord for the Var type in UsageCheckUtils to use the ordering for A.Variable contained in OrdAST 2008-01-28 15:24:43 +00:00
Neil Brown
f03702d937 Added an automatically-generated OrdAST module that provides an ordering for AST elements, ignoring Meta tags 2008-01-28 15:23:53 +00:00
Neil Brown
0f085b8d81 Added Ord instances for all simple types (all no-argument constructors) in the AST module 2008-01-28 15:22:58 +00:00
Neil Brown
7a30a2ceb5 Moved the usageCheckPass function into the new Check module 2008-01-28 13:15:36 +00:00
Neil Brown
51d02559d0 Renamed the RainUsageCheck module to Check, intended to be the primary module for usage checking 2008-01-28 13:12:10 +00:00
Neil Brown
5a3141a3a8 Corrected a comment in RainUsageCheck 2008-01-28 13:08:41 +00:00
Neil Brown
55e60c7209 Moved checkPar and findReachDef to a new UsageCheckAlgorithms module 2008-01-28 13:07:28 +00:00
Neil Brown
5ff006f75d Renamed the UsageCheck module to UsageCheckUtils 2008-01-28 12:59:22 +00:00
Neil Brown
8f1215080c Changed checkArrayUsage to be a function ready to feed into checkPar, rather than one that uses it 2008-01-28 12:54:21 +00:00
Neil Brown
168e5b5cc1 Added a function for joining two functions for checkPar together, and fixed the comment on checkPar 2008-01-28 12:53:46 +00:00
Neil Brown
efc69a97cf Moved all the modules related to usage-checking into a new checks directory 2008-01-28 12:25:00 +00:00
Neil Brown
56af03f577 Rearranged the lists of source files in Makefile.am into one-per-line, alphabetical order 2008-01-28 12:21:24 +00:00
Neil Brown
c13a388b91 Corrected the Makefile so that the GHC 6.8.x-only flags actually work on GHC 6.8.x 2008-01-28 12:07:58 +00:00
Neil Brown
2120b830dc Corrected the use of the -fno-warn-tabs flag in the alex files so that it works under GHC 6.6.x 2008-01-28 12:03:03 +00:00
Neil Brown
9cd2da3b0e A large change to alter RainUsageCheck to use the code in UsageCheck
Previously there was near-duplicate code in UsageCheck adapted from RainUsageCheck.  This patch removed the duplicate code on the RainUsageCheck side, and resulting in changing the rest of the module (and its corresponding test module) to use the new UsageCheck version of the code.  The net effect is to almost completely unify the passes in RainUsageCheck (which aren't really Rain-specific anyway), UsageCheck and ArrayUsageCheck.
2008-01-27 23:53:42 +00:00
Neil Brown
060c26da84 Added to the export list of UsageCheck 2008-01-27 23:52:06 +00:00
Neil Brown
ad7b4e9736 Began trying to fix the customVarCompare function in UsageCheck 2008-01-27 23:51:49 +00:00
Neil Brown
668ed9531e Fiddled with the Show/showCode capabilities of the newtype Var in UsageCheck 2008-01-27 23:51:16 +00:00
Neil Brown
4a8653cc41 Added the monads to the export list of ShowCode 2008-01-27 23:47:41 +00:00
Neil Brown
1cc731a7d8 Changed a little code to use the more appropriate fromMaybe function rather than maybe 2008-01-27 18:37:02 +00:00
Neil Brown
349d3c5811 Merged makeEquations with makeReplicatedEquations and adjusted the tests accordingly 2008-01-27 16:53:07 +00:00
Neil Brown
5a69459668 Added a few more parallel assignment tests 2008-01-27 16:50:30 +00:00
Neil Brown
7276c3cc4a Added proper support for sequential items in non-replicated PARs in the array usage checking 2008-01-27 01:43:42 +00:00
Neil Brown
d37253d2af Improved the error message given by ArrayUsageCheck 2008-01-26 22:57:01 +00:00
Neil Brown
127cdea242 Overhauled the ArrayUsageCheck system to label the resulting problems with the expressions of the two array indexes involved in each problem, and changed the tests accordingly 2008-01-26 22:16:42 +00:00
Neil Brown
7e7395d47f Added test names to some of the tests in ArrayUsageCheckTest 2008-01-26 21:55:02 +00:00
Neil Brown
bc3ad29fed Added code to build the flow graph for procs and functions in specifications 2008-01-26 18:54:40 +00:00
Neil Brown
9dfa1611e0 Added various 4 and 5 parameter versions of the routing functions for building AST-modifying functions 2008-01-26 18:49:36 +00:00
Neil Brown
7c4b87e221 Added tests for proc specifications in FlowGraphTest and correctly an earlier test to not use an undefined specification 2008-01-26 18:48:49 +00:00
Neil Brown
3548167a83 Changed the testGraph function in FlowGraphTest to add a variant that takes an A.Structured directly 2008-01-26 18:48:09 +00:00
Neil Brown
41fb90dc33 Added labels to the tests in FlowGraphTest 2008-01-26 18:46:16 +00:00
Neil Brown
bdda623d7e Added types to all the cases where the monomorhpism restriction applied 2008-01-26 20:51:11 +00:00
Neil Brown
16d4320909 Added a flag to warn when the monomorphism restriction is encountered 2008-01-26 20:33:33 +00:00
Neil Brown
741a01de5a Removed various tab characters and replaced them with spaces 2008-01-26 19:38:24 +00:00
Neil Brown
34584130d4 Turned off tab warnings for the files auto-generated by Alex (which contain a lot of tabs) 2008-01-26 19:37:43 +00:00
Neil Brown
07fe209140 Added some checks for the regex packages that Tock already depends on 2008-01-26 19:37:21 +00:00
Neil Brown
f46b8f5d72 Added detection of GHC's version number, and altered the GHC flags depending on the version 2008-01-26 17:27:44 +00:00
Neil Brown
ff37613498 Fixed the code so that each PAR groups properly (by edge identifier) but the tests still fail 2008-01-25 18:12:32 +00:00
Neil Brown
8a39eb597c Removed an old comment in ArrayUsageCheck 2008-01-25 17:54:35 +00:00
Neil Brown
90bc9b7033 Implemented checkPar using a graph search, and removed the need for giving it a start node 2008-01-25 17:36:16 +00:00
Neil Brown
f46cabdb22 Cannibalised code from the RainUsageCheck module to implement the labelling functions in the UsageCheck module 2008-01-25 16:34:54 +00:00
Neil Brown
64a9292b75 Moved customVarCompare from ArrayUsageCheck to UsageCheck and used it to derive Ord for the Var type 2008-01-25 16:34:18 +00:00
Neil Brown
c2c761ab7d Added an export list to the UsageCheck module 2008-01-25 16:33:57 +00:00
Neil Brown
178af1ca24 Changed the array usage checking to distinguish between read-from and written-to indexes, while also beginning to overhaul the system to make a more general usage-checking framework that operates on the control flow graph 2008-01-25 16:17:17 +00:00
Neil Brown
10493717aa Added tests with multi-dimensional arrays 2008-01-25 16:16:16 +00:00