Commit Graph

44 Commits

Author SHA1 Message Date
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
bdda623d7e Added types to all the cases where the monomorhpism restriction applied 2008-01-26 20:51:11 +00:00
Neil Brown
423d22fa13 Moved the ArrayUsageCheck tests to their own new file (ArrayUsageCheckTest) 2007-12-16 14:02:45 +00:00
Neil Brown
4f88a1e4a1 Added negative coefficients to the QuickCheck tests 2007-12-16 13:43:45 +00:00
Neil Brown
6320bfdffb Tidied up some of the QuickCheck tests for the Omega Test pruning 2007-12-16 13:35:51 +00:00
Neil Brown
b4ccc9f8de Changed the representation of the exact (constant) solutions to equations to be a simple Map 2007-12-16 00:55:38 +00:00
Neil Brown
a1d3501313 Changed the QuickCheck tests to test that we can get the exact answer from a full equality set, and rather ham-fistedly fixed a bug where substitutions were being applied multiple times to the variable mapping 2007-12-16 00:33:27 +00:00
Neil Brown
d5461bb10b Moved the norm helper to be a top-level function in the tests 2007-12-15 03:19:25 +00:00
Neil Brown
3e4e5355ff Changed the VariableMapping mess into a more correct mess 2007-12-15 02:58:08 +00:00
Neil Brown
c0d06ce173 Added a first attempt at recording the variable mappings during equation manipulation, and changed all the current tests to ignore it 2007-12-15 00:34:50 +00:00
Neil Brown
74490c005e Added some (fairly messy) code for taking a list of A.Expression and generating a list of equations 2007-12-14 23:15:39 +00:00
Neil Brown
d674a2fdd0 Added inequality elimination to the Omega Test, but need to also add the code for checking for integer solutions 2007-12-14 16:48:13 +00:00
Neil Brown
3814a039d5 Refactored the use of mygcd with foldl into one function 2007-12-14 15:17:19 +00:00
Neil Brown
1dabdfef9d Added some tests for the Omega Test that are not "easily" solved 2007-12-14 12:25:29 +00:00
Neil Brown
3380596ef0 Added more tests for the usage checker, and a helper function for testing parallel items 2007-12-14 04:12:29 +00:00
Neil Brown
2050124658 Added tests for solving equalities and inequalities, and an easy way of writing those tests using user-defined operators 2007-12-14 02:41:15 +00:00
Neil Brown
22b09ad95c Changed the tests to also test pruning inconsistent equations 2007-12-14 00:41:06 +00:00
Neil Brown
c7fe0f1515 Added equation pruning and tested most of it using QuickCheck 2007-12-14 00:02:15 +00:00
Neil Brown
26dd2fa5c4 Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module 2007-12-13 19:05:29 +00:00
Neil Brown
337f189b8a Separated the QuickCheck tests from the HUnit tests and made the number of test-cases configurable for the QuickCheck tests 2007-12-13 18:21:53 +00:00
Neil Brown
cbeb3ecd95 Added a QuickCheck test for the equality-solving part of the Omega test 2007-12-13 15:33:14 +00:00
Neil Brown
b1a8f1d30d Made the arrayise function act on one list at a time, and made it visible for other functions 2007-12-13 15:32:46 +00:00
Neil Brown
76dc1c3b53 Added another test for the Omega Test 2007-12-12 17:21:25 +00:00
Neil Brown
bea8606bdc Added more tests for the Omega Test equality solver, including one that highlights a current bug 2007-12-12 15:07:39 +00:00
Neil Brown
4a83bd8b41 Added another test, from the Omega Test paper 2007-12-12 13:54:04 +00:00
Neil Brown
6598ebd3c8 Added a helper function for the Omega Test tests, and added a further test 2007-12-11 17:21:30 +00:00
Neil Brown
ed43b750c1 Added an initial messy implementation of the equality part of the Omega test 2007-12-11 16:54:36 +00:00
Neil Brown
78b3c038c3 Changed the types in RainUsageCheck and RainUsageCheckTest to match the changes to FlowGraph's type 2007-11-07 13:45:43 +00:00
Neil Brown
3b43411d4e Changed the type of findReachDef, implemented it, and wrote some basic tests for it (that pass) 2007-11-02 23:47:20 +00:00
Neil Brown
093447dd24 Added a skeleton function for findReachDef, along with the start of some tests for it 2007-11-02 16:46:20 +00:00
Neil Brown
5f57803616 Moved assertEither and assertEitherFail into TestUtil 2007-11-02 16:44:10 +00:00
Neil Brown
4bb2b2a407 Moved mapPair into Utils, and renamed it to transformPair (to be consistent with the pre-existing transformX functions) 2007-11-02 16:44:02 +00:00
Neil Brown
153a1823a7 Changed the tests for checkInitVar so that they display the new error return upon failure 2007-11-02 11:45:22 +00:00
Neil Brown
c43a11c057 Added more checkInitVar tests (for sequential loops), but some of them fail 2007-11-01 16:39:03 +00:00
Neil Brown
6fbca55569 Added comments to the tests for checkInitVar, and added a couple more tests 2007-11-01 16:24:47 +00:00
Neil Brown
cf0cc81ae4 Added a new function that checks that variables are initialised before they are read in a control-flow graph, and added tests for it (that all now pass) 2007-11-01 11:45:36 +00:00
Neil Brown
75ed35f2e3 Fixed a list of imports not being in alphabetical order in RainUsageCheckTest 2007-11-01 11:44:38 +00:00
Neil Brown
49de728d6f Added code relating to declarations in the flow-graph labels for usage checking 2007-11-01 00:33:44 +00:00
Neil Brown
fddc3fb6b8 Added support for simple input statements to the usage checker 2007-10-29 18:42:33 +00:00
Neil Brown
5280bb4fc6 Added support for output statements to the usage checker 2007-10-29 18:29:29 +00:00
Neil Brown
cb964c620f Added support for the time statements in the usage checker 2007-10-29 17:57:57 +00:00
Neil Brown
a891e34d24 Tidied up some of the usage checker tests 2007-10-29 17:53:58 +00:00
Neil Brown
1d785b3c6d Changed the usage checker tests to match the new usage checker 2007-10-29 17:32:34 +00:00
Neil Brown
700ddf149e Moved the old attempt at a usage checker into a new module just for doing Rain usage checks 2007-10-29 17:13:23 +00:00