Neil Brown
c787aa9fa5
Fixed a bug in the occam type inference where channels of arrays were not being processed properly
2009-02-27 17:01:07 +00:00
Neil Brown
cd1b409f96
Removed cppremoveSpec, since it was doing the same as cremoveSpec
2009-02-27 10:49:45 +00:00
Adam Sampson
69b798735f
Resolve user types when checking parallel array access.
2009-03-21 15:39:13 +00:00
Adam Sampson
77be0c1137
Add some testcases for usage-checking on user-defined array types.
...
These were based on KRoC bug #194 , submitted by Jonathan May.
2009-03-21 15:37:56 +00:00
Adam Sampson
deedad4268
Add kyb as another possible name for the keyboard channel.
2009-03-21 15:22:58 +00:00
Neil Brown
d0d5cf6779
Fixed the C++ backend where I was trying to be too clever with the sizes
2009-02-11 14:19:34 +00:00
Neil Brown
6d112a244e
Fixed when names are exempted from abbreviation checking by the PERMITALIASES pragma
2009-02-11 13:15:25 +00:00
Neil Brown
a1585c74a9
Fixed inferTypes so that it again handles Specifications in Structured ExpressionList in function definitions
2009-02-11 11:53:04 +00:00
Neil Brown
152f5fc252
Changed the abbreviation checking so that it doesn't check nonce names
...
When we pull up names (which happens before abbreviation checking), we create a lot of nonces with greater scope than the original variables. When we go to abbreviation check this, we therefore set off lots of false alarms about originally safe code. So to fix this, the easiest method seems to be turning off checking on all the names introduced by the compiler.
2009-02-11 11:23:39 +00:00
Neil Brown
18f23bf767
Fixed a small problem with the types of arrays of channel-ends in the C++ generation
2009-02-10 22:21:13 +00:00
Neil Brown
6d5c01ac69
Changed inferTypes so that directions are inferred when channels (and arrays of channels) are abbreviated
2009-02-10 22:20:51 +00:00
Neil Brown
4055746e19
Fixed typeOfVariable to handle directed inferred variables
2009-02-10 22:20:02 +00:00
Neil Brown
6db9b221af
Moved the adding of direction specifiers out of the type inferrence pass into a new pass that runs before type inference
2009-02-10 21:34:42 +00:00
Neil Brown
24fa36ccda
Modified the test harness so that it gives a meta tag on failure (in case we want it)
2009-02-10 21:33:53 +00:00
Neil Brown
e37fa37c79
Recoded abbrevCheckPass so that it is much more efficient (now does everything in one pass of the AST)
2009-02-10 13:14:45 +00:00
Neil Brown
9d44e3475c
Swapped some uses of listify to fastListify, but the abbreviation checking is still very slow
2009-02-10 12:49:54 +00:00
Neil Brown
bcd670bfd2
Fixed a couple of problems with the usage checking
2009-02-10 12:40:24 +00:00
Neil Brown
68f808583b
Added code to handle whole channels being passed to PROCs in the usage checking, and made sure they still obey the SHARED pragma
2009-02-10 12:34:28 +00:00
Neil Brown
3bdc5d0ff6
Fixed the usage checking so that it obeys the correct pragma for each type of check (and added another test)
2009-02-10 11:40:00 +00:00
Neil Brown
de9469fad3
Corrected some of the other tests that fail the new abbreviation checking
2009-02-10 11:32:36 +00:00
Neil Brown
cff10e2f28
Added a pass that checks that abbreviations are used properly
2009-02-10 11:32:10 +00:00
Neil Brown
e87e83f073
Fixed a test that was labelled with the wrong expectation
2009-02-10 11:31:00 +00:00
Neil Brown
05c87e6935
Added some testcases for the correct use of the right pragma (of SHARED and PERMITALIASES)
2009-02-10 01:13:31 +00:00
Neil Brown
81959bd76b
Added quick preliminary support for the PERMITALIASES pragma
2009-02-10 01:01:23 +00:00
Neil Brown
14df1e09b7
Corrected some problems caused by moving the direction specifiers up to the whole array (the array wasn't then being pulled up)
2009-02-10 00:28:45 +00:00
Neil Brown
93af6b85a4
Updated the comments on the product* functions in the Utils module
2009-02-09 23:10:29 +00:00
Neil Brown
df34d666ba
Fixed the handling of OR in logical expressions, and added a testcase
2009-02-09 23:04:52 +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
33d18f07c2
Added support for negation in logical expressions and tidied up some other little bits of the code
2009-02-09 22:45:32 +00:00
Neil Brown
6818cdc114
Added a few more tests that helped me track down a bug I was introducing
2009-02-09 22:41:40 +00:00
Neil Brown
a30e8cbde5
Tidied up and recoded the addBK function so that is much clearer which bits are Anded and which bits are Ored
2009-02-09 22:26:18 +00:00
Neil Brown
717a4dc0df
Added some Or and And wrappers to the Check module, ready to help clear up the code
2009-02-09 22:25:44 +00:00
Neil Brown
0e95d5d15e
Added a couple more functions to the Utils module
2009-02-09 22:25:12 +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
904b913ebd
Added another helper function to the Utils module
2009-02-09 16:57:02 +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
7cf83512c5
Added a testcase which I think highlights a problematic bug
2009-02-09 15:55:13 +00:00
Neil Brown
0c975dd2b4
Added support for logical negation in the BK
2009-02-09 15:37:45 +00:00
Neil Brown
4e152a0f70
Added some more replicated tests with more complex combinations of IF conditions
2009-02-09 15:13:53 +00:00
Neil Brown
8477ee9d3f
Added support for Or and NotEq in the BK
2009-02-09 13:17:22 +00:00
Neil Brown
9e0b802829
Fixed the generation of the BK from the flow graph constraints so that I will be able to add disjunctions
2009-02-09 13:14:53 +00:00
Neil Brown
2e36a8a218
Fixed a typo in a test name
2009-02-09 13:13:19 +00:00
Neil Brown
f2c7bad3e2
Added a pass that turns directed subscripts into subscripted directed arrays, to make the usage checking easier
2009-02-09 12:14:01 +00:00
Neil Brown
9fecbe4a8e
Fixed checkArrayUsage so that it deals correctly with indexing of channel arrays
2009-02-09 12:13:54 +00:00
Neil Brown
e536da9f98
Added an instance of Traversable for ParItems
2009-02-09 12:11:07 +00:00
Neil Brown
1d4a62578a
Fixed a typo in one of the testcases
2009-02-09 11:31:34 +00:00
Neil Brown
48b107b099
Made sure that channels are usage checked (by counting them as written variables)
2009-02-09 10:30:44 +00:00
Neil Brown
938ceaf12f
Fixed foldUnionVarsBK so that variables without BK are no longer dropped from the usage checking
2009-02-09 10:30:15 +00:00
Neil Brown
b4e79ca62e
Realised that channels are not being parallel usage checked at all, and added testcases for them
2009-02-09 10:28:45 +00:00