Neil Brown
cfac57ea88
Added support for modulo and divide items that are multiplied by another variable (during equation flattening)
2008-02-11 14:59:01 +00:00
Neil Brown
04be245677
Adjusted the printing out of FlattenedExp; useful on test failure
2008-02-11 11:31:20 +00:00
Neil Brown
9cb191b64c
Corrected some bugs related to constant-divisor modulo, especially with negative divisor
2008-02-11 11:05:01 +00:00
Neil Brown
18cf66944a
Modified the array usage checking to treat any unknown expressions (function calls, etc) like variables were treated before
2008-02-10 23:58:32 +00:00
Neil Brown
1ba2925b7a
Added proper support for the Divide item in the array usage checking
2008-02-09 20:12:52 +00:00
Neil Brown
41ab2d6bde
Introduced scaling of Modulo and Divide items, and tweaked some of the parameters to make the tests a little shorter
2008-02-09 17:23:49 +00:00
Neil Brown
25be01cb47
Added a coefficient for modulo and divide items
2008-02-09 15:08:10 +00:00
Neil Brown
c6b384d5d6
A large change, introducing tags for modulo items during array usage checking so that they can be accurately tested
2008-02-09 14:52:07 +00:00
Neil Brown
d0b94e402c
Added (constant divisor, for now) modulo to the QuickCheck tests in ArrayUsageCheckTest
2008-02-09 11:36:37 +00:00
Neil Brown
1a89fdd218
Refactored the multiplying out in ArrayUsageCheck slightly
2008-02-09 01:58:34 +00:00
Neil Brown
842b6b7788
Simplified the QuickCheck test in ArrayUsageCheckTest
2008-02-09 00:57:01 +00:00
Neil Brown
73f16267a9
Moved flattenParItems to UsageCheckUtils and added a couple of deriving (Show) clauses
2008-02-08 23:53:17 +00:00
Neil Brown
64d7b35cfe
Changed all the usage check passes to use CSMR, and thus changed usageCheckPass to be a PassR rather than Pass
2008-02-08 13:43:28 +00:00
Neil Brown
ecf4ceee35
Fixed the calculation of the upper bound for replicators that feature in the background knowledge
2008-02-07 18:02:20 +00:00
Neil Brown
0427c00859
Fixed the calculation of the upper bound on replicators (from + for - 1, not simply for) for directly relevant replicators
2008-02-07 18:01:13 +00:00
Neil Brown
66cb9b0bc0
Added a lot of comments to the functions at the top of the ArrayUsageCheck module
2008-02-07 17:56:42 +00:00
Neil Brown
e379710bbd
Corrected a change that was accidentally recorded, switching primes for ats
2008-02-07 15:42:50 +00:00
Neil Brown
03ef5d23ba
A patch recording the fix for modulo in replication that got the test passing, that properly detects whether a replicated variable is featured anywhere in the problem
2008-02-07 15:37:56 +00:00
Neil Brown
32959ad3a3
Fixed a part of ArrayUsageCheck to make sure it generates valid arrays
2008-02-07 00:25:30 +00:00
Neil Brown
96c948bd6e
Simplified the setIndexVar/setIndexVar' functions and changed them to handle Modulo and Divide
2008-02-07 00:24:11 +00:00
Neil Brown
4299951511
Moved the makeSize function from ArrayUsageCheck into Utils
2008-02-06 23:49:17 +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
1074407ef9
Added the ability to neatly print out a problem as a debug message
2008-02-03 15:41:29 +00:00
Neil Brown
01c8343d7e
Simplified an expression in ArrayUsageCheck
2008-02-03 15:40:49 +00:00
Neil Brown
41194f757f
Added support for background knowledge to makeEquations in ArrayUsageCheck, and fed all the replicator bounds into it
2008-02-03 12:44:51 +00:00
Neil Brown
7d30bf612d
Moved flattenParItems up to the higher where clause in checkArrayUsage
2008-02-03 12:43:36 +00:00
Neil Brown
c81fb0670b
Added a function to gather up a common pattern in ArrayUsageCheck
2008-02-03 12:42:16 +00:00
Neil Brown
a856d39604
Moved addEq to the top-level of ArrayUsageCheck
2008-02-03 12:41:16 +00:00
Neil Brown
0800fc7b87
Tweaked the formatting of an error message
2008-02-02 17:24:28 +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
7a30a2ceb5
Moved the usageCheckPass function into the new Check module
2008-01-28 13:15:36 +00:00
Neil Brown
55e60c7209
Moved checkPar and findReachDef to a new UsageCheckAlgorithms module
2008-01-28 13:07:28 +00:00
Neil Brown
5ff006f75d
Renamed the UsageCheck module to UsageCheckUtils
2008-01-28 12:59:22 +00:00
Neil Brown
8f1215080c
Changed checkArrayUsage to be a function ready to feed into checkPar, rather than one that uses it
2008-01-28 12:54:21 +00:00
Neil Brown
efc69a97cf
Moved all the modules related to usage-checking into a new checks directory
2008-01-28 12:25:00 +00:00