pchapin / scala

Scalaness: A stagged programming system for embedded systems based on Scala.
0 stars 0 forks source link

NesT typer does not understand const #12

Open pchapin opened 11 years ago

pchapin commented 11 years ago

Currently the nesT typer does not understand const so writing "const correct" code is not possible in nesT. This particularly causes problems for declarations that are being shared between nesT and nesC. For example, consider the nesC module

module FullNesC {
    uses command void process_buffer( const char *buffer );
}

Suppose it is wired to the following nesT module

module BufferHandlerC {
    provides command void process_buffer( const char *buffer );
}

Because the nesT typer ignores const it will allow values to be assigned to the buffer passed to process_buffer. The invoking nesC code won't expect this. Moreover when the specialized nesT module is compiled by the nesC compiler, type errors will be reported at that time.