Neil Brown
93af6b85a4
Updated the comments on the product* functions in the Utils module
2009-02-09 23:10:29 +00:00
Neil Brown
0e95d5d15e
Added a couple more functions to the Utils module
2009-02-09 22:25:12 +00:00
Neil Brown
904b913ebd
Added another helper function to the Utils module
2009-02-09 16:57:02 +00:00
Neil Brown
9c4b8e8df1
Changed tocktest so you can pass it -v options for use with the automatic tests
2009-02-08 16:33:53 +00:00
Neil Brown
091acfa848
Added a new helper function to Utils for joining pairs of lists with pairs of lists
2009-02-07 18:45:56 +00:00
Neil Brown
56a10b403f
Added a new function, filterMapByKey, to the Utils module
2009-02-05 15:52:43 +00:00
Neil Brown
bb6937433f
Fixed the TestUtils module by removing some of the old range stuff
2009-02-03 11:52:12 +00:00
Neil Brown
ec1341849d
Added a ShowOccam instance for A.Dimension
2009-02-02 23:51:15 +00:00
Neil Brown
8de2dbca88
Adjusted the modules in common to match the new array constructor change
2009-02-01 21:52:13 +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
10e6b4ce02
Updated all the tests to work with the new recursive functions
2009-01-29 00:34:12 +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
d4f1ac2797
Added nearly all the remaining intrinsic functions (all the *TOSTRING and STRINGTO*, except for floating-point types)
2009-01-27 17:00:28 +00:00
Neil Brown
f4f08e09aa
Fixed the RAN/DRAN intrinsic
2009-01-27 13:50:42 +00:00
Neil Brown
9b1368ffe7
Implemented all but one (RAN) of the intrinsic functions in appendix N by mapping them directly to the C versions
2009-01-27 13:38:00 +00:00
Neil Brown
c19039e90e
Added the definitions of most of the intrinsics from the occam 2.1 manual (but not yet the implementations)
2009-01-25 18:54:57 +00:00
Neil Brown
7337978dcf
Added many more intrinsics to the list of occam intrinsics
2009-01-23 19:19:36 +00:00
Neil Brown
c2aaf2fcf7
Provided more helpful errors in the test harness when something is wrong
2009-01-23 14:42:46 +00:00
Neil Brown
d806931fbf
Revamped the TestHarness framework to allow multiple substitutions in a test prologue
2009-01-20 23:43:07 +00:00
Neil Brown
9145c993ea
Fixed the constant folding to use a type for Int based on the compilation target rather than just assuming Int32
...
However, it is possible that there will still be a problem if the C and C++ compiler have different int sizes, because the constant folding has to know the type at compile time, and thus we have to arbitrarily choose to use the C version. In future, we could perhaps swap all Ints for the appropriate substiution (e.g. Int64) at run-time, based on the flags and prior knowledge about C/C++ int sizes
2009-01-23 15:50:06 +00:00
Neil Brown
2a8ee9a420
Fixed a bug in the constant folding, where anything divided by -1 was being evaluated to zero
2009-01-23 15:48:39 +00:00
Neil Brown
de80ab467e
Fixed the common Types module to work with the new channel-ends
2009-01-20 17:27:37 +00:00
Neil Brown
336c5abe3c
Fixed the ShowCode module to work with the new channel-ends
2009-01-20 17:27:10 +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
09e0e46ec2
Added some comments to my changes to GenericUtils
2008-11-25 18:06:14 +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
f88c671cf7
Added a set of enabled warnings to CompState
2008-11-20 13:17:05 +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
f4ff507543
Moved wrapProcSeq into the TestUtils module
2008-11-19 16:09:31 +00:00
Neil Brown
e5ed7e07b7
Fixed the apply function, which (mainly due to having the wrong type signature, but also its use of extTransformRoute) was not as polymorphic as it should have been, which was breaking the traversal (I think it would only work on one Structured type)
2008-11-14 15:30:02 +00:00
Neil Brown
0d486f108f
Added a value to indicate what type a warning is (to support future configurability) and streamlined the warning functions
2008-11-13 15:36:22 +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
98122211ad
Got all the new analysis stuff compiling, but with several parts unimplemented
2008-11-12 12:34:32 +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
d0e2cd7b03
Finally wrestled the Haskell typechecker into submission to add my CheckFramework and its monads, which will hopefully do all that I need
2008-11-08 00:00:09 +00:00
Neil Brown
d6b102838a
Added a Route data type that packages up the routing function and an identifier (to provide equality)
2008-11-07 10:08:16 +00:00
Neil Brown
d12b2178de
Added an augmented version of Adam's gmapMFor that uses the same generics techniques, but also gives a route to the node to the transformation function
2008-11-06 18:32:35 +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
f2bac46655
Added a testPatternMatchOneOf function to check that something matches at least one of a list of given patterns
2008-11-16 13:03:28 +00:00
Neil Brown
6f54b89b38
Added a permutations function to the Utils module
2008-11-16 13:03:04 +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