Commit Graph

42 Commits

Author SHA1 Message Date
Adam Sampson
2655b9b049 Fix a broken occam test (spotted by the new type checker). 2008-03-26 14:45:51 +00:00
Neil Brown
0eadbd0b11 Added support for occam's flush (sending 255) and moved some of the unreachable flush commands in the C++ support headers 2008-03-25 11:37:02 +00:00
Neil Brown
2107960442 Added a couple of testcase programs for reading from the keyboard and echoing 2008-03-24 23:46:43 +00:00
Neil Brown
38aca16514 Fixed the commstime.rain testcase so that it now just about works (except for one disallowed cast) 2008-03-23 13:29:47 +00:00
Neil Brown
81c342156d Fixed Rain commstime some more 2008-03-22 18:33:43 +00:00
Neil Brown
b1f962d7c2 Added a couple of missing semi-colons to a Rain testcase 2008-03-22 17:50:12 +00:00
Neil Brown
f680799363 Added more Rain testcases to the repository 2008-03-22 16:11:12 +00:00
Neil Brown
2189a6c28a Added support for list literals to the Rain parser 2008-03-21 20:03:47 +00:00
Neil Brown
3fede166f6 Added another Rain testcase 2008-03-21 16:35:21 +00:00
Neil Brown
022447b04c Added a couple of Rain testcases 2008-03-20 16:54:03 +00:00
Adam Sampson
79eefd5e98 Move constant checking from the occam parser into a pass.
The parser now doesn't do any constant folding or checking.
2008-03-19 12:47:29 +00:00
Adam Sampson
06ff5ccda6 Implement short-form PLACE, and fix PLACE IN WORKSPACE/VECSPACE. 2008-03-17 18:47:54 +00:00
Adam Sampson
17a1c0eef6 Clean up INITIAL a bit and add a test case.
There's no need for INITIALs to be early-constant-folded, since -- unlike VALs
-- they can't be used in later constant folding.
2008-03-17 18:43:07 +00:00
Adam Sampson
1fb6adb005 Fix array constructors in occam.
This works at least for simple examples, although it's probably a bit
restrictive on the array indexes you're allowed; it should attempt to
constant-fold them.
2008-03-17 18:34:23 +00:00
Adam Sampson
54668d3ba2 Implement the RESCHEDULE intrinsic. 2008-03-15 11:00:11 +00:00
Adam Sampson
d7333e4479 Implement FLUSH in the output handlers. 2008-03-12 14:48:27 +00:00
Adam Sampson
ac532be667 Implement stdin input handler.
This uses a slight hack to figure out when a killable BSC has actually been
killed (which I think should probably be a CCSP feature anyway).
2008-03-12 12:01:40 +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
Neil Brown
30bc63ffe8 Added another test case to test that read-indexes are not compared to each other 2008-01-22 22:15:48 +00:00
Neil Brown
af130291fc Added some tests for replicated indexes in parallel 2008-01-16 12:14:09 +00:00
Neil Brown
31db71cb83 Added more (non-replicated) tests for the usage checking 2008-01-16 11:35:19 +00:00
Neil Brown
b3216c4870 Added a test-source-file for testing the array usage checker, and added it to the appropriate test list 2008-01-16 03:28:26 +00:00
Neil Brown
6da26e5bf5 Added the first Rain program to the testcases directory and added Makefile rules for compiling *.rain into *x using the C++CSP backend 2007-08-28 16:02:22 +00:00
Adam Sampson
82df59dcfb Fix makeLiteral for arrays inside records.
This was an "obvious" bug (a missing pattern) being masked by me doing a
pattern match inside an array constructor -- if the pattern doesn't match then
it'll skip that value, rather than causing an error like it does in a case.
2007-08-23 22:07:01 +00:00
Adam Sampson
51ecf04a90 Move assignment simplification into a pass.
This is the code that expands array and record assignments out into multiple
assignments. Having it done as a pass means it can do a better job -- this
fixes some problems with cgtest56 where the old version of the code couldn't
handle record assignments from literals.

This is the first pass that's had to add a replicator to the tree, so this also
introduces a helper function for generating new replicator counters.
2007-08-22 19:55:52 +00:00
Adam Sampson
95e01e54d5 Make underlyingType merge array dimensions.
This fixes a bug that cgtest56 exposed, where an array of a user-defined type
that was itself an array wound up being an array of arrays rather than a single
array.

As part of this, makeArrayType is now called addDimensions, and takes a list of
dimensions to add rather than just one.
2007-08-22 15:00:54 +00:00
Adam Sampson
1bac142a53 Rework the parser to use the new lexer.
The occam parser is now a GenParser Token OccState, rather than a GenParser
Char OccState, and a lot of now-redundant code has been removed. The parser is
also somewhat faster, which wasn't intended but is nice anyway.

I've also modified the Rain parser to not rely on the old preprocessing code;
it wasn't appropriate for Rain's syntax anyway, so I assume Neil will be
replacing it eventually.
2007-08-21 20:44:15 +00:00
Adam Sampson
1f490e9f7f Lex multiline strings as multiple tokens.
This is because the structure pass needs to be able to tell where new lines
start, and if the line number changes in the middle of a token then it'll get
confused.
2007-08-21 20:01:46 +00:00
Neil Brown
ba60da71d6 Protocol test case expanded
Added larger protocols to stress test the C++CSP backend with variant protocols that have many options, and sequential protocols that have many items
2007-07-26 21:17:27 +00:00
Adam Sampson
50731d0b75 Give tock its own repo -- i.e. remove everything else and move tock up 2007-07-16 21:48:55 +00:00