It's UWAweek 38 (2nd semester, week 8)

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 464 articles.
Currently 5 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
4:47pm Mon 26th Aug, Christopher M.

Hello,

"Chenjun Hou" [email protected] wrote:

First, what should happen if divide by zero occurs, are we expected to do static analysis at compile time, throw an error at run time, or is it UB?

The focus of the project is not on designing and fully implementing a mini-language - it's 'only' about performing a quite mechanical syntactic translation from one language to another (C11), compiling, and then executing the program. The goals of the project are to encourage you to learn, and then assess your understanding of some core concepts listed on the project's description. In short, it's about C and operating-systems, not language design.

So, there's no need to worry about the division-by-zero cases - implement something if you wish (full static analysis will near impossible without execute the program at compile-time), but division-by-zero won't be tested.

Second, in example 5 a function call is done using printsum 12 6, without any brackets or separators in the function call, whilst all other examples use function(args) as the syntax. Should we be able to parse both?

Thanks; corrected.

Also, with respect to command line arguments, should our program check if the number of arguments passed to the program is sufficient and print to stderr like follows

This is the 2nd point of the 'Project requirements'.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy