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
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
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
df34d666ba
Fixed the handling of OR in logical expressions, and added a testcase
2009-02-09 23:04:52 +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
7cf83512c5
Added a testcase which I think highlights a problematic bug
2009-02-09 15:55:13 +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
2e36a8a218
Fixed a typo in a test name
2009-02-09 13:13:19 +00:00
Neil Brown
1d4a62578a
Fixed a typo in one of the testcases
2009-02-09 11:31:34 +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
Neil Brown
00a8be1984
Added some tests ready to check usage checking on channel arrays
2009-02-08 23:40:40 +00:00
Neil Brown
3604ab6412
Added some testcases related to checking the use of abbreviations
2009-02-08 23:25:30 +00:00
Neil Brown
e165030751
Stopped Tock checking arrays that are declared inside the PAR being examined
...
Fixes #84
2009-02-08 23:08:58 +00:00
Neil Brown
1c1860ce7e
Added lots of new tests for parallel replicators with BK, all of which fail
2009-02-08 16:06:15 +00:00
Neil Brown
571815c571
Added another test which shows a problem with the usage checking
2009-02-05 16:27:57 +00:00
Neil Brown
2ecd91e36f
Changed the array usage checking to always include equations involving replicators
...
This allows us to check situations like this:
PAR i = 0 FOR 10
IF
i = 0
a[10] := 3
TRUE
a[i] := 3
Previously this would have been flagged unsafe (because 10 can overlap with 10 between the replicated branches).
But with this change, the equations on the replicators (including: i'>=i+1, i = 0, i' = 0) are included alongside 10=10, so there is no solution over all because the replicator equations prevent a solution (i.e. the 10 can't be used twice in parallel).
2009-02-05 15:47:41 +00:00
Neil Brown
42fa9b12e2
Added a lot more testcases related to background knowledge in usage checking
2009-02-05 14:53:42 +00:00
Neil Brown
0cbe5de96c
Added a few more tests to help make sure I don't break anything
2009-02-04 13:08:11 +00:00
Neil Brown
d6530051ab
Added another usage check tests
2009-02-04 11:54:50 +00:00
Neil Brown
6f607972e6
Added some more usage check tests, primarily for non-array variables used in odd ways in replicated PARs
2009-02-04 09:37:28 +00:00
Neil Brown
c7931bf800
Added more tests ready for channel-end inference
2009-01-23 14:47:59 +00:00
Neil Brown
d184721979
Added yet more tests for channel-ends
2009-01-21 00:00:31 +00:00
Neil Brown
16d8468b08
Added more channel end tests, involving abbreviations before use
2009-01-20 23:50:02 +00:00
Neil Brown
1adca155dd
Added a file full of tests for inferring direction specifiers in PROC formals
2009-01-20 23:43:42 +00:00
Neil Brown
ec25ff9901
Added some tests for the type-checking of poison statements in Rain
2008-09-12 14:37:11 +00:00
Adam Sampson
62a0873d3d
Implement channel direction decorators.
...
This is mostly straightforward: modify the parser to allow direction
decorators in the right places, and extend the type checker to match.
There's some slight awkwardness in that some of the Types functions
have to perform the same checks as the type checker (e.g. directing a
non-channel), so I've tidied up their error messages a bit.
At the backend, I've just added a little pass to strip out all the
DirectedVariables, since the other backend passes don't handle them
gracefully. From the occam/C point of view this is fine, but I'm not
sure if it's going to cause problems for C++.
2008-06-09 21:35:20 +00:00
Neil Brown
2a56189d30
Added an additional testcase for conditions in the usage checking
2008-06-07 20:29:21 +00:00
Neil Brown
cb6fb40440
Added some more testcases involving deduction from (sequential) replicator bounds
2008-06-06 10:39:12 +00:00
Neil Brown
b9b025a429
Added some tests for the new usage checking and reachability mechanisms
2008-06-05 23:11:00 +00:00
Adam Sampson
6ee21f76c9
Initial work on supporting INITIAL and RESULT abbreviations.
...
This fixes the AST, parser and typechecker, and adds a pass to
transform Result back into Abbrev, but doesn't transform Initial yet.
(It actually works for trivial stuff anyway, but it won't do the right
thing for complex types or PROC parameters.)
It appears (to me) to make sense to support INITIAL/RESULT reshaping
and retyping too, so this does.
Refs #42 .
2008-06-02 20:41:37 +00:00
Neil Brown
ecb4758b64
Corrected a slight bug in the type tests
2008-05-18 09:34:04 +00:00
Neil Brown
abbca5f235
Added tests for channel communications (and type unification)
2008-05-17 19:43:44 +00:00
Neil Brown
0aeebfeeb8
Added more tests for the Rain type system, this time assignment
2008-05-17 14:19:50 +00:00
Neil Brown
3249381995
Added a Rain test file for the type checker
2008-05-17 13:17:12 +00:00
Adam Sampson
2655b9b049
Fix a broken occam test (spotted by the new type checker).
2008-03-26 14:45:51 +00:00
Neil Brown
c23c575f73
Added some more testcases for array usage checking that involve complicated expressions
2008-02-11 14:40:28 +00:00
Neil Brown
71915494a6
Added a test for multiplied variables
2008-02-08 23:49:20 +00:00
Neil Brown
5bc57689f8
Tweaked some tests so that they are now correct
2008-02-08 14:03:45 +00:00
Neil Brown
9c0dcb6008
Added a few more parallel usage tests
2008-02-02 18:59:20 +00:00
Neil Brown
1c480ce8d9
Added a couple more usage check tests
2008-02-01 14:50:25 +00:00
Neil Brown
00a9dfc89b
Added more usage checks for proc and function calls
2008-01-29 11:59:08 +00:00
Neil Brown
f26b3309a3
Added a new file of testcases for testing passed parameters
2008-01-29 11:39:04 +00:00
Neil Brown
5a69459668
Added a few more parallel assignment tests
2008-01-27 16:50:30 +00:00
Neil Brown
10493717aa
Added tests with multi-dimensional arrays
2008-01-25 16:16:16 +00:00
Neil Brown
dc9e01933b
Added a couple of tests to ensure replication is compared properly with sibling plain PARs
2008-01-25 12:30:48 +00:00
Neil Brown
330405f983
Added more usage-checking tests
2008-01-25 11:50:57 +00:00
Neil Brown
0d6e06607b
Added a couple more tests
2008-01-25 11:19:58 +00:00
Neil Brown
08b922ae46
Added another usage checker test
2008-01-25 11:02:22 +00:00