Commit Graph

25 Commits

Author SHA1 Message Date
Adam Sampson
2c4ccfbf39 Update all the copyright notices.
I've checked these all against the Darcs history using a script
(check-copyright, in my misccode collection). Anything Neil or I did as
part of our PhDs is copyright University of Kent; more recent work
belongs to us, as appropriate.
2011-07-21 11:38:13 +00:00
Neil Brown
d29b5b67cf Got the tests compiling again after the changes to the AST for extended rendezvous 2009-04-19 17:34:36 +00:00
Neil Brown
57ffc7bfa4 Split out a chunk of CompState into a CompOpts type for things that can be set on the command-line 2009-04-17 21:10:14 +00:00
Neil Brown
378ef07893 Adjusted all the other modules to reflect the new change to CSM 2009-04-17 17:40:00 +00:00
Neil Brown
c8b724d2be Merged the latest set of changes from the trunk into the Polyplate branch
I also added the import list to all the Data.Generics imports in the tests (as I did for the other modules recently)
2009-04-10 20:38:29 +00:00
Neil Brown
92035a82a2 Got the test utilities working with the new Pass type synonym 2008-12-14 19:00:19 +00:00
Neil Brown
ddbec737f2 Got all the tests compiling again after recent changes
For some reason, the usage check tests are now very slow to run (perhaps because of all the operator definitions added to each one?), which needs further investigation.
2009-04-10 19:29:40 +00:00
Neil Brown
e457d82f0c Changed FUNCTIONs and PROCs to have optional bodies, and put all the externals into the AST (without bodies)
This may seem like an odd change, but it simplifies the logic a lot.  I kept having problems with passes not operating on externals (e.g. functions-to-procs, adding array sizes, constant folding in array dimensions) and adding a special case every time to also process the externals was getting silly.

Putting the externals in the AST therefore made sense, but I didn't want to just add dummy bodies as this would cause them to throw up errors (e.g. in the type-checking for functions).  So I turned the bodies into a Maybe type, and that has worked out well.

I also stopped storing the formals in csExternals (since they are now in csNames, and the tree), which streamlined that nicely, and stopped me having to keep them up to date.
2009-04-04 14:56:35 +00:00
Neil Brown
4f83187549 Fixed up all the tests in light of the new recursive procs 2009-01-29 00:56:32 +00:00
Neil Brown
ee62c604fc Renamed our permutations function to permutation to avoid a conflict with a new GHC 6.10 function 2008-11-28 11:28:39 +00:00
Neil Brown
0e7a6c5b98 Added a NameSource field for NameDef that indicates where a name comes from 2008-11-25 17:36:42 +00:00
Neil Brown
e117422c31 Added a couple more tests for checkUnusedVar which has revealed two bugs
One of these bugs is that array variables are counted as unused when they are used subscripted.  I think that should be solved when we flip back to the listify approach.

The second bug is more interesting, as it is triggered only in a certain arrangement with an IF.  It's either a bug in the flow-graph building or in the varsTouchedAfter code.
2008-11-20 15:06:36 +00:00
Neil Brown
5f01f12d43 Adjusted testOccamPassWarn to enable all warnings when testing a pass 2008-11-20 14:20:36 +00:00
Neil Brown
6cbdc0e13b Finally merged the list of warnings into CompState rather than having its own StateT monad 2008-11-20 13:35:44 +00:00
Neil Brown
38374320a3 Moved the remainder of the checkInitVar tests over to the new system 2008-11-19 17:25:02 +00:00
Neil Brown
3b57d43eb6 Moved more of the checkInitVar tests to the new system 2008-11-19 17:08:17 +00:00
Neil Brown
810c798dac Added some copies of the checkInitVar tests that use the new occam EDSL testing instead of the old method 2008-11-19 16:53:13 +00:00
Neil Brown
bfacb526fb Converted one of the tests for pullRepCounts to use the new mechanism, which in turn exposed that the pass was not altering the definition in the state (which it may as well) 2008-11-16 18:25:53 +00:00
Neil Brown
771297632d Finished converting all the cases in testInputCase to use the new occam EDSL 2008-11-16 16:57:52 +00:00
Neil Brown
9ac861ac93 Fixed the map ordering problem by matching against any permutation 2008-11-16 13:06:08 +00:00
Neil Brown
559ba83c28 Developed the occam EDSL further, adding support for input CASE statements, more type-classes to allow easier use and various other improvements 2008-11-16 12:21:22 +00:00
Neil Brown
02a28b7585 Made testOccamPass more general, so that it does not have to be applied at the top-level 2008-11-15 20:13:33 +00:00
Neil Brown
a570f2eff3 Renamed the variables in the occam EDSL to be less likely to clash in other modules 2008-11-15 20:11:52 +00:00
Neil Brown
f4d9c791ef Simplified the occam EDSL by removing the unnecessary monad in favour of plain lists, and added a way to separate expected output from input 2008-11-15 20:06:47 +00:00
Neil Brown
7764ed9326 Added a module for easily knocking up fragments of occam code to test, but need to remove some of the extravagance in the design (including an unnecessary monad) 2008-11-15 19:29:56 +00:00