Intepreter that executes SimpleScript programs with multithreading. University project [no.4] for Concurrent Programming (Fall 2017).
Execute programs written in a custom programming language called SimpleScript. Those programs will be run from command line and may have multiple arguments. The intepreter can run multiple programs at the same time using multithreading. Programs with same variable name will have same memory on the system, so the intepreter is responsible to manage common memory.
- C
- Make (sudo apt install make)
- GCC (sudo apt install gcc)
- On terminal run
make
to build the executable C program. - Start the intepreter with
./hw4b
. - To run a program enter
run inputFile.txt [arg0] [arg1] [argN]
- Enter
list
to see every program's status and ID. - Enter
kill [ID]
to stop a program. - Enter
exit
to stop the intepreter.
init.txt
is a dummy program to make sure everything is working. It test if variables are storing value correctly.sum.txt
is a program that takes as input N a number and return the sum of every number from 1 up to N.producer.txt
andconsumer.txt
are the the classic multithreading problem of producer/consumer, where the one side add(produce) items(+N values) on a common buffer(variable) and the other side decrease(consume) those items(values).
ECE321 Concurrent Programming
Assigment instructions can be found here in Greek.