Adam Sampson
c9cb7d2bf9
Check Proc calls.
2008-03-26 12:26:04 +00:00
Neil Brown
4e890a45d5
Reworked the way we record the C/C++ compiler flags for Tock to use
...
Previously, the files were auto-generated from the Makefile.am. This patch changes to generate the flags using .in files, generated by the configure script.
The only problem with this is that the include directory for the Tock support files became difficult, because it depended on Tock's install prefix. As a solution, I've added a pkg-config file for the Tock flags. There might be some way to streamline the whole process once CCSP uses pkg-config, as then Tock, CCSP and C++CSP will all use pkg-config; it might be more flexible for Tock to run the pkg-config command every time it compiles, to avoid having to recompile Tock if you reinstall one of its C/C++ dependencies to a new directory.
2008-03-25 14:53:06 +00:00
Neil Brown
5e70e70d95
Added support for automatically inducing the output file from the input file for full compile mode (filename minus extension)
2008-03-25 11:46:10 +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
986a4acb2b
Added support for a StreamReader (to support the input channel from stdin) to the C++CSP backend
2008-03-24 23:46:05 +00:00
Neil Brown
e8adfb51fa
Moved the code for setting up the terminal into tock_support.h so that C++CSP can use it too
2008-03-24 23:45:31 +00:00
Neil Brown
c37e183879
Added support for a not-equals operator in Rain
2008-03-24 23:44:40 +00:00
Adam Sampson
b672900f46
Check Case, Alt, and all the trivial processes.
2008-03-25 17:27:33 +00:00
Adam Sampson
6861b22da6
Check timer operations.
2008-03-25 16:45:25 +00:00
Adam Sampson
d7e829b4c6
Check assignments.
2008-03-25 16:26:09 +00:00
Adam Sampson
b3e3308b3e
Implement channel IO checks, and refactor OccamTypes (again).
2008-03-25 15:56:03 +00:00
Neil Brown
ceafd77c1e
Removed Wait, GetTime and AlternativeWait (the old Rain time items) from the AST
2008-03-24 15:15:54 +00:00
Neil Brown
8fe152bf98
Merged the type-checking on time-related statements in Rain into the pass that checks types in communications
2008-03-24 15:15:28 +00:00
Neil Brown
bbdb429498
Changed transformWaitFor (and its tests) to transform the new InputTimerFor into InputTimerAfter
2008-03-24 15:09:05 +00:00
Neil Brown
2d0d6463d5
Removed the handling of the old Rain Wait/GetTime items from the backends
2008-03-24 15:08:05 +00:00
Neil Brown
eb50c010b2
Fixed the tests for parsing time-related stuff in Rain to match the recent changes
2008-03-24 14:27:46 +00:00
Neil Brown
cbbafffbd2
Changed Rain to use the new timer type rather than things like the GetTime statement
2008-03-24 13:50:14 +00:00
Neil Brown
c68aa42277
Added a sub-type to Timers, to support multiple types
2008-03-23 22:20:16 +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
fc4cac736b
Added the helper functions for adding and subtracting Times in C++CSP
2008-03-23 13:29:22 +00:00
Neil Brown
cc6dce5ead
Tidied up the export/import lists for GenerateC and GenerateCPPCSP
2008-03-23 12:40:06 +00:00
Neil Brown
5abb775ae4
Added the time-related intrinsic functions for Rain to the C++ backend
2008-03-23 12:39:16 +00:00
Neil Brown
887a3ba98d
Added helper functions for int8_t to tock_support.h (Rain needs these)
2008-03-23 12:18:18 +00:00
Neil Brown
74a5cf52a7
Stopped constants being assigned to in the type-checker for Rain
2008-03-23 12:15:00 +00:00
Neil Brown
b316a7d3f4
Added some tests for checking that constants can't be assigned to in Rain
2008-03-23 12:14:34 +00:00
Neil Brown
7830d82c51
Fixed the display of names in ShowCode for Rain
2008-03-23 12:13:55 +00:00
Neil Brown
1bf3f6f0f1
Fixed the type of a function name in buildExpr to fix the tests
2008-03-23 12:08:08 +00:00
Neil Brown
0ed18c933f
Fixed pullUp to not pull up list expressions
...
This patch looks like I removed the wrong line above, but it was identical to the line I actually removed, so the patch is fine, it just looks odd.
2008-03-23 11:49:42 +00:00
Neil Brown
c1479bc1a8
Fixed the list of excluded Rain things by removing IntrinsicFunctionCall from the list
2008-03-23 11:48:33 +00:00
Neil Brown
1650d55d4e
Added the functionTypesChecked property to the dummy occam pass
2008-03-23 11:47:59 +00:00
Neil Brown
78c2160eb4
Fixed the type of a function name to avoid confusing the pass to remove free names later on
2008-03-23 00:11:11 +00:00
Neil Brown
dd7b0268b2
Added a new property (functionTypesChecked) to help fix the pass ordering
2008-03-23 00:09:01 +00:00
Neil Brown
4e9a00a5b7
Added support for for-each replicators to the freeNamesIn function
2008-03-23 00:08:48 +00:00
Neil Brown
6f76f6385e
Added to an error message in Types to help determine the problem
2008-03-23 00:07:48 +00:00
Neil Brown
7a7b60449c
Enhanced an error message in RainTypes
2008-03-22 19:04:34 +00:00
Neil Brown
e767e33190
Added support for some intrinsic (time-related) functions in Rain
2008-03-22 18:58:10 +00:00
Neil Brown
230db2de08
Added support for specifications at the start of functions without ruining the check for a return statement
2008-03-22 18:57:23 +00:00
Neil Brown
7f28d3dbe3
Added a warnPC function (like diePC) for use with formatCode
2008-03-22 18:34:40 +00:00
Neil Brown
ae142a94e1
Added support for uniquifying function arguments to the Rain passes
2008-03-22 18:34:07 +00:00
Neil Brown
81c342156d
Fixed Rain commstime some more
2008-03-22 18:33:43 +00:00
Neil Brown
813d6affd1
Fixed an error message in RainTypes
2008-03-22 18:02: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
710abd7019
Added support for function calls to the Rain parser
2008-03-22 17:49:21 +00:00
Neil Brown
f680799363
Added more Rain testcases to the repository
2008-03-22 16:11:12 +00:00
Adam Sampson
b8b7e04b7c
Refactor literal and subscript checks.
...
For both of these, we already examine all the places they occur for other
reasons, so there's no good reason to do a separate traversal for them.
2008-03-22 23:58:18 +00:00
Adam Sampson
60ca26128c
More occam typechecks: input/output items, replicators, choices.
...
Various infrastructure too to support these.
Doing A.ForEach raised an interesting question: what does it work over? In
plain occam it'd just be arrays, but it should obviously work for lists too.
This suggests that Size and Subscript should work on lists as well, since
ForEach will be implemented in terms of them. I've therefore introduced the
idea of a "sequence" class of types.
2008-03-22 23:47:29 +00:00
Adam Sampson
6ab4a9923f
Implement expression typechecking for occam.
...
There's obviously some overlap with the Rain typechecker here. I've tried to
cover everything in the AST that could potentially be bound into occam at some
point in the future, even if the occam parser doesn't support it yet (so
this'll do checks for Concat and mobile allocation, for example).
2008-03-22 01:00:42 +00:00
Adam Sampson
388f2f38a6
plainSubscriptType doesn't really need to know what the subscript is.
2008-03-22 00:53:46 +00:00
Adam Sampson
56de093739
Add isScalarType.
2008-03-22 00:53:13 +00:00