Commit Graph

335 Commits

Author SHA1 Message Date
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
8472f991d0 Added error return to the checkInitVar function, and also changed it to use the new extended Set implementation, which in turn allowed me to fix the bug in the checkInitVar function (defVal is Everything, not the empty set) 2007-11-02 11:44:04 +00:00
Neil Brown
7d89b4aec0 Added the implementation of an ExSet type that can easily represent the set of everything 2007-11-02 11:41:59 +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
1f97bc7d49 Merged some common code in the usage checker (for processing the Variables) 2007-10-29 18:23:46 +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
d38c2aef08 Overhauled the usage checker to use sets of Strings for recording the used variables 2007-10-29 17:32:23 +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
Neil Brown
6b95827cab Added an optional initialiser-expression to Declaration in the AST, and changed the rest of the code accordingly 2007-10-24 23:50:00 +00:00
Neil Brown
cd313fbbb6 Added a comment about DerefVariable in SimplifyExprs 2007-10-24 16:00:47 +00:00
Neil Brown
acca3d03fd Removed the A.Main item from the AST entirely 2007-10-17 13:43:40 +00:00
Neil Brown
3727307a78 Changed the shared passes to operate on Structured items, rather than Process items 2007-10-17 13:24:42 +00:00
Neil Brown
a25824b601 Changed the passes to be of type Pass, rather than A.Process -> PassM A.Process 2007-10-17 13:09:16 +00:00
Neil Brown
e9dbfbab3c Added the input-case to case pass to the pass-list, and therefore removed all code dealing with input-case statements in the C and C++ backends (and corresponding tests) 2007-10-14 00:01:44 +00:00
Neil Brown
d98cb21415 Added support for transforming ALT guards to the input-case -> case pass 2007-10-13 23:56:36 +00:00
Neil Brown
8b2e14f3bd Added tests and implementation for a new pass for transforming input-case statements into case statements 2007-10-13 23:28:41 +00:00
Neil Brown
443b648d73 Corrected the pass that creates abbreviations for output expressions to also work on OutputCase statements 2007-10-13 20:52:42 +00:00
Neil Brown
126226b039 Implemented the outExprs pass, and got it passing all the tests 2007-10-11 00:12:41 +00:00
Neil Brown
73ee9319e1 Added more tests for the outExprs pass in PassTest 2007-10-11 00:12:08 +00:00
Neil Brown
c7fe2431db Added a test for the new outExprs pass 2007-10-10 23:46:58 +00:00
Neil Brown
d04adba875 Added a new SimplifyComms module, containing a new (currently dummy) pass, outExprs 2007-10-10 23:13:01 +00:00
Neil Brown
38c409d378 Added the -fwarn-unused-imports compiler option to warn about unused imports, and then set about pruning and ordering (mostly in my code) the import lists for all the modules 2007-09-27 13:13:46 +00:00
Neil Brown
a5c2dedb24 Changed the testPass* functions in TestUtil to return Assertion instead of Test 2007-09-15 13:35:51 +00:00
Neil Brown
000270f4a8 Created a new module for tests in the common directory (named CommonTest) and moved testIsSafeConversion across 2007-09-11 23:34:45 +00:00
Neil Brown
2ff46a9041 Rearranged the Rain source files, renamed a couple of Rain files, and changed the Makefile accordingly. 2007-09-10 17:28:57 +00:00