Commit Graph

40 Commits

Author SHA1 Message Date
Neil Brown
28fd400d89 Adjusted the FlowGraph tests to check the roots of the graph, and added in the new root nodes where appropriate 2008-01-29 20:06:33 +00:00
Neil Brown
12b1617fec Added a new labelling function to FlowGraph for labelling the arguments of functions/processes 2008-01-29 20:05:38 +00:00
Neil Brown
5567d8cee0 Changed FlowGraph to keep a record of all the root nodes in the tree and return them in a list 2008-01-29 12:46:14 +00:00
Neil Brown
7c4b87e221 Added tests for proc specifications in FlowGraphTest and correctly an earlier test to not use an undefined specification 2008-01-26 18:48:49 +00:00
Neil Brown
3548167a83 Changed the testGraph function in FlowGraphTest to add a variant that takes an A.Structured directly 2008-01-26 18:48:09 +00:00
Neil Brown
41fb90dc33 Added labels to the tests in FlowGraphTest 2008-01-26 18:46:16 +00:00
Neil Brown
bdda623d7e Added types to all the cases where the monomorhpism restriction applied 2008-01-26 20:51:11 +00:00
Neil Brown
86b8185b1f Added a few more helper functions to the Utils module 2008-01-25 16:12:20 +00:00
Neil Brown
140bd94ce3 Added various (QuickCheck) Result helper functions to the TestUtils module 2007-12-13 23:51:49 +00:00
Neil Brown
26dd2fa5c4 Renamed the TestUtil and TreeUtil modules to TestUtils and TreeUtils, to be consistent with the Utils module 2007-12-13 19:05:29 +00:00
Neil Brown
337f189b8a Separated the QuickCheck tests from the HUnit tests and made the number of test-cases configurable for the QuickCheck tests 2007-12-13 18:21:53 +00:00
Douglas Warren
1d83167c01 Fixed some haddock parsing problems in the documentation 2007-11-14 16:26:47 +00:00
Neil Brown
01c7f25f46 Added much more documentation to the FlowGraphTest module 2007-11-12 15:19:12 +00:00
Neil Brown
a248f58201 Turned off generating ASTS with Specs inside Case statements until they have been properly implemented and tested 2007-11-10 23:29:49 +00:00
Neil Brown
185f515cf7 Improved the error message when the graph building fails for QuickCheck 2007-11-10 23:18:21 +00:00
Neil Brown
ff01b24efd Added more items to the AST QuickCheck generator 2007-11-10 21:13:55 +00:00
Neil Brown
19ba2a321c Fixed another misplaced Meta tag problem, this time with Specification 2007-11-10 21:13:16 +00:00
Neil Brown
2c33e1e499 Fixed some meta-tag confusion with the While statement when building a flowgraph 2007-11-10 20:28:12 +00:00
Neil Brown
ac2bee7b48 Added a generator for A.Case to the flow-graph testing 2007-11-10 19:17:01 +00:00
Neil Brown
f050dadaec Added a type specifier to FlowGraphTest to match the changes to the flow-graph builder 2007-11-10 19:16:20 +00:00
Neil Brown
7929715594 Added support for printing printing the results of QuickCheck test failures 2007-11-10 18:23:04 +00:00
Neil Brown
2a7662e46e Added code to build an AST properly for testing (esp. A.Structured) and implemented enough tests to get a failure 2007-11-10 01:31:56 +00:00
Neil Brown
85375c3c6c Changed the flow-graph testing quickcheck functions to use a size parameter when recursively building the trees 2007-11-09 23:48:12 +00:00
Neil Brown
d60d70cf82 Changed the unique identifiers in FlowGraphTest to be their own type, to reduce confusion 2007-11-09 20:05:06 +00:00
Neil Brown
1554d5c7ba Added an initial (slightly clumsy) attempt at using quickcheck to generate ASTs and test the flow-graph-based tree-altering functions 2007-11-09 17:47:10 +00:00
Neil Brown
fbbe539bc0 Changed the types in FlowGraphTest to match the changes to FlowGraph 2007-11-07 13:30:44 +00:00
Neil Brown
4bb2b2a407 Moved mapPair into Utils, and renamed it to transformPair (to be consistent with the pre-existing transformX functions) 2007-11-02 16:44:02 +00:00
Neil Brown
cbc6a70b30 Changed the control-flow graph generation to use the proposed function dictionary, and add the scope-out nodes 2007-10-28 18:26:09 +00:00
Neil Brown
adafbd2cc4 Added support (and tests) for if statements in the control-flow graph generation 2007-10-28 17:24:26 +00:00
Neil Brown
5c4bf74a75 Added support (and tests) for case statements in the control-flow graph 2007-10-28 16:31:15 +00:00
Neil Brown
bd14ed56ba Changed the edge-labelling scheme in the control-flow graph to have beginpar/endpar nodes with matching ids 2007-10-28 14:55:43 +00:00
Neil Brown
b6d525fbb8 Added tests for while loops in the control-flow graph 2007-10-28 12:39:26 +00:00
Neil Brown
25f13e6c6f Added more tests for the control-flow graph, for Specs in Structured items 2007-10-28 11:38:04 +00:00
Neil Brown
cf17814b98 Changed the types involved in the control-flow graph so that I can customise the Show implementation 2007-10-28 11:35:51 +00:00
Neil Brown
a0c54220e2 Added more tests for the Seq and Par blocks in the control-flow graph 2007-10-28 01:25:44 +00:00
Neil Brown
aea462d41a Fixed some bugs in the test harness for the control-flow graph 2007-10-28 00:36:27 +00:00
Neil Brown
fbd297e23e Added more tests for the control-flow graph stuff (for basic Seq and Par blocks) 2007-10-28 00:13:15 +00:00
Neil Brown
9b1cd56050 Changed the identifiers/values on graph nodes in the control-flow graph to be produced monadically, and altered the tests accordingly 2007-10-27 23:59:33 +00:00
Neil Brown
8fa046798a Tidied up and simplified the test code in FlowGraphTest to operate on lists of nodes/edges, rather than decomposing the graph
When you decompose a graph, each edge only appears once; on one of the nodes it is attached to.  This meant our testing was not working properly.

The easier solution is to forget how the graph works underneath, get a list of nodes and a list of edges, then operate on those.
2007-10-27 23:56:44 +00:00
Neil Brown
f0c552663b Added the initial implementation of a module (and tests) for generating a control-flow graph from an AST
This implementation needs to be changed; it currently uses Meta as a primary key for nodes, but that isn't valid.
2007-10-27 21:18:55 +00:00