Commit Graph

52 Commits

Author SHA1 Message Date
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
8f767ff0d4 Made all the imports of Data.Generics have an import list
This makes sure that we catch all leftover instances of using SYB to do generic operations that we should be using Polyplate for instead.  Most modules should only import Data, and possibly Typeable.
2009-04-09 15:36:37 +00:00
Neil Brown
e61a23855a Fixed all the conflicts while merging into the Polyplate branch 2009-04-09 11:01:39 +00:00
Neil Brown
a72b01ff02 Merged the latest changes from my usage checking into the polyplate branch 2009-02-10 17:11:24 +00:00
Neil Brown
4672675ba8 Removed the GenericUtils module, now that everything uses Polyplate instead 2009-01-12 18:03:41 +00:00
Neil Brown
b0a34eb3a8 Improved some of polyplate's documentation, and renamed routeIdentity to identityRoute to avoid confusion with routeId 2009-01-12 17:34:59 +00:00
Neil Brown
1d500b46ae Moved the SYB-based route stuff back into FlowUtils, and trimmed down the export list of GenericUtils 2008-12-15 10:36:48 +00:00
Neil Brown
b94091a08c Moved all of the Route stuff out into a new polyplate module 2008-12-14 22:47:07 +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
229f2197af Turned findMeta into a member of a FindMeta type-class 2009-04-09 11:13:37 +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
56e5b8da8e A mega-patch that gets tocktest compiling again
However, around a quarter of the tests currently fail...
2009-03-31 17:56:56 +00:00
Neil Brown
c315352647 Added information in the flow graph edges as to when a condition becomes non-usable (e.g. when the branches of an IF merge again) 2009-02-09 16:57:13 +00:00
Neil Brown
7f8ced3c3a Upgraded the Par edges in the flow graph from Int to Integer, which makes the design a bit nicer 2009-02-09 16:08:59 +00:00
Neil Brown
a75a195654 Fixed a bug in the flow utils code that was using the old name stack when removing an element 2009-02-08 19:11:58 +00:00
Neil Brown
b08ac42547 Augmented the flow graph building to store in each node a list of the names defined at that point 2009-02-08 18:41:30 +00:00
Neil Brown
3da315497a Tidied up the flow graph stuff a little by changing the quintuple state into a record type 2009-02-08 18:17:57 +00:00
Neil Brown
594d7ef242 Tweaked various code in the common and checks directory to work with the new step count in the For replicator 2009-01-28 23:43:16 +00:00
Neil Brown
80c99d3bd7 Fixed another use of Map.lookup in the tests 2008-11-28 11:38:29 +00:00
Neil Brown
b48129d4e5 Fixed some uses of Map.lookup that used the old system of it working with any monad (in GHC 6.10, it's always Maybe) 2008-11-28 11:38:06 +00:00
Neil Brown
be6c57ce5b Corrected some of my documentation of flowAlgorithm that has repeatedly confused me ever since I wrote it 2008-11-20 15:39:06 +00:00
Neil Brown
2a15f4ef5f Filled in all the gaps such that the CheckTest tests now run (including some debug output, for now)
One of the tests fails at the moment because the specification node has two entries associated with it in the flowgraph.  One is the scope-in and one is the scope-out.  I think the analysis is currently picking the scope-out node and looking beyond that, where -- surprise, surprise -- the variable is not used again.  So I need some easy way of telling the flow analyses which of the two nodes I want to start from, in this case and other ones where I also add two nodes related to the same point in the AST.
2008-11-12 16:54:00 +00:00
Neil Brown
76cfb4d8f5 Added route-identifiers for blank AST modifiers in the flow graph 2008-11-12 16:47:15 +00:00
Neil Brown
dc030acabe Changed the FlowGraph stuff to use the new Route type (that includes identifiers) rather than the bare functions as it used to 2008-11-10 14:01:30 +00:00
Neil Brown
e4b1c98dd6 Removed while loops from one of the quickcheck tests now that they behave in a more complex fashion 2008-09-11 21:53:40 +00:00
Neil Brown
73d1bdc711 Fixed the flow algorithms to discard nodes that should not feature (e.g. nodes with no onward path in backward data flow) 2008-09-11 21:46:03 +00:00
Neil Brown
f4fb8823ae Fixed some warnings in FlowGraphTest (by commenting out some unused functions) 2008-09-11 20:51:09 +00:00
Neil Brown
447a89eca5 Fixed up the tests for IF statements relating to the labelled sequential edges 2008-09-11 20:50:25 +00:00
Neil Brown
426064ba2d Fixed some failing tests due to a change in the sequential edge labels in the flow graph (just the while tests) 2008-09-11 16:10:30 +00:00
Neil Brown
70139ad072 Added support for recording conditional expressions in the flow graph (based on IF and WHILE, at least) 2008-06-07 20:28:04 +00:00
Neil Brown
3a5881c14f Added an optional flag to the ESeq edge label, ready to be used to indicate whether a condition was true on this branch or not 2008-06-06 18:34:50 +00:00
Neil Brown
cbe460f306 Added a new part to UsageLabel for conditions in nodes, and added a new corresponding labelling function for nodes 2008-06-06 18:32:47 +00:00
Neil Brown
fe1238d379 Added a helper operator to make the FlowGraph module a bit more readable 2008-06-06 18:23:03 +00:00
Neil Brown
d3c9d90f8d Corrected a bug when wiring up specifications (specifically inside ALTs) in the flow graph 2008-06-06 16:06:03 +00:00
Neil Brown
cf35eb97d3 Corrected a couple of uses of flowAlgorithm to use the connected nodes, not all the remaining nodes in the graph 2008-06-05 20:35:43 +00:00
Neil Brown
17255bb2b1 Changed the uses of flowAlgorithm to make better use of userErrLabel to give better error messages 2008-06-05 20:22:47 +00:00
Neil Brown
ac3d1ed42a Reordered the type parameters for the FNode' type in the flow graph, and made it a functor over the label 2008-06-05 20:11:13 +00:00
Neil Brown
a417708cda Fixed some of the flow graph tests that were broken by the change to Rep 2008-06-04 18:32:16 +00:00
Neil Brown
41ff60cb78 Removed the Rep constructor from Structured and instead added a Rep constructor to SpecType
This way, all replicators are declared like other names, and their scope is considered replicated.  This simplifies the code a little.

Fixes #55
2008-06-04 17:00:43 +00:00
Neil Brown
4b6fa48cd3 Labelled some of the data type parameters better in the FlowUtils module 2008-06-01 17:58:01 +00:00
Neil Brown
edbfea163f Changed FlowGraphTest to compile against my latest changes 2008-05-30 19:44:26 +00:00
Neil Brown
0746219984 Added support for recording terminator nodes (as well as root nodes) while building the flow graph 2008-05-30 17:15:52 +00:00
Neil Brown
f444d81f89 Changed flowAlgorithm to give a better error message when something internal goes wrong 2008-05-30 17:14:42 +00:00
Neil Brown
05c16b77d3 Added comments to the flowAlgorithm function and tweaked the names to make it clear it can do forward or backward analysis 2008-05-23 15:38:03 +00:00
Neil Brown
60eb320ee0 Separated FlowGraph into two modules (the new one being FlowUtils) 2008-05-23 14:52:25 +00:00
Neil Brown
3daf82d318 Merged Alternative and AlternativeCond into a single Alternative item that always has a pre-condition 2008-04-03 14:52:37 +00:00
Neil Brown
ceafd77c1e Removed Wait, GetTime and AlternativeWait (the old Rain time items) from the AST 2008-03-24 15:15:54 +00:00
Adam Sampson
6df110dce4 Wrap QuickCheck tests into HUnit tests.
This means all the tests now get run as part of one list, and HUnit keeps track
of the number of failures for us. (The reason I was doing this was so that
tocktest will exit non-zero on QuickCheck test failure too.)

As part of this, I've reworked TestMain's main function quite a bit. It'll now
filter QuickCheck tests into response to options too.
2008-03-12 19:38:02 +00:00
Neil Brown
ba75f5b06c Removed the initialiser expression on the Declaration item in the AST 2008-03-09 00:23:13 +00:00
Neil Brown
03eab6c142 Fixed some typing relating to QuickCheck and the TestMonad to avoid type ambiguities in future 2008-03-05 16:04:30 +00:00