Commit Graph

22 Commits

Author SHA1 Message Date
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
da4f4e1cd8 Changed an old use of the Not operator into the corresponding function call 2009-04-08 10:34:51 +00:00
Neil Brown
84568cfbdd Added constraint generation after a branch is not taken in an IF 2009-02-09 22:46:08 +00:00
Neil Brown
4b44da8008 Removed obsolete conditions from the valid set as we search for constraints
Previously, conditions from IF branches were being retained even after the end of the whole IF.  Now I use the just-added information from the flow graph as to when those conditions are no longer applicable.
2009-02-09 17:03:29 +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
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
6f23920e69 Added a function to find all the logical constraints that must hold at a certain point in the program, based on the flow graph 2008-06-07 20:26:29 +00:00
Neil Brown
78a513a852 Implemented addBK, at least for assignments 2008-06-05 23:10:30 +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
d9e8c7fc87 Changed findReachDef to return a map from nodes to expressions rather than previous nodes
The expressions are optional (wrapped in a Maybe type).  Nothing indicates that the variable was written to, but that the value isn't available.  This is usually the case (for example, process parameters, channel inputs).

I have also temporarily disabled the tests for this function
2008-06-05 20:30:06 +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
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
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
Adam Sampson
8d06c3d180 Various tweaks to the Haddock comments to get it building with 0.8 again. 2008-02-28 14:20:34 +00:00
Neil Brown
acd57d74de Changed the A.Structured type to be parameterised
This patch is actually an amalgam of multiple (already large) patches.  Those patches conflicted (parameterised Structured vs. changes to usage checking and FlowGraph) and encountered a nasty bug in darcs 1 involving exponential time (see http://wiki.darcs.net/DarcsWiki/ConflictsFAQ for more details).  Reasoning that half an hour (of 100% CPU use) was too long to apply patches, I opted to re-record the parameterised Structured changes as this new large patch.  Here are the commit messages originally used for the patches (which, as mentioned, were already large patches):

A gigantic patch switching all the non-test modules over to using parameterised A.Structured
Changed the FlowGraph module again to handle any sort of Structured you want to pass to it (mainly for testing)
A further gigantic patch changing all the tests to work with the new parameterised Structured
Fixed a nasty bug involving functions being named incorrectly inside transformInputCase
Added a hand-written instance of Data for Structured that allows us to use ext1M properly
Fixed a few warnings in the code
2008-02-05 19:40:27 +00:00
Neil Brown
330266e682 Fixed the code for detecting if there was the same replicator at the beginning of a PAR group 2008-02-02 17:24:02 +00:00
Neil Brown
70586518df Created a common UsageLabel type, had a first attempt at handling replicators properly, and added a flag to declarations to indicate whether they included initialisation 2008-02-02 17:08:13 +00:00
Neil Brown
95d99706e3 Readjusted the parameters of flowAlgorithm so that the initial value for the starting node is passed in more obviously (since that was the only use of initVal, which has now been removed) 2008-01-29 21:05:37 +00:00
Neil Brown
78a29de1d4 Added a couple of notes about replicators 2008-01-28 17:36:43 +00:00
Neil Brown
55e60c7209 Moved checkPar and findReachDef to a new UsageCheckAlgorithms module 2008-01-28 13:07:28 +00:00