# TODOs
- current rule is that all channels need to be declared as global variable
- test functionality of array and concurrent functions
    - for example: what would happen if array a has capacity = 5 but expression a[6]
- channel business
    - TOP PRIORITY: make lock work -> DONE
    - LOWER PRIORITY: circular array logic -> DONE
    - EVEN LOWER: not having to enforce declaration as a global variable
        -> not sure if this is even necessary
    - then: experiment with the lock thing -> yuyan -> DONE
    - IMPORTANT TEST: think about its interaction with concurrent function -> DONE
- memory leak check for gocall.c with valgrind
- add support for func_typ and anonymous function -> FUTURE



# Questions/Test Cases
- how to wait on full channel on enqueue and empty channel on dequeue?
    --> semaphore is your friend
- what if wrong extension?
- what about the built-in functions? they should default to function right?
    --> yes they are set to `function` by default in codegen.ml 
- currently we do not support overloading of the same function name for gofunc/func type
- what if a loop does not terminate?
- what about gofunctions with return values?
    - go void func --> Java Runnable
    - go int func --> Java Callable: need to think about future value paradigm

# Done
- think about concurrency and pthread library stuff
- add a simple built in function
- commit modified microC to github
- modify the .mc -> .gmm
- rename microcparse.mly -> parser.mly
- integrate test-print utility to microC code
- change syntax from microC to Go-- --> adding function keyword
- add test cases for gofunction --> no concurrency at all, but does not throw error
- add parameters to function
    - added --> but pointer problem?
- fix shift/reduce conflict in parser with [] accessor
- concurrency flow control
    - where to pthread_create
    - where to join
    - how to pass values between threads
- some optimizations
    - goroutine is more lightweight than a POSIX thread
        --> can we do something like that too?
    - how to get rid of the strict parent-child inheritance
      from pthread_create --> develop into goroutine land
- test ++ and -- in for loop and while loop
- pretty print for ++/-- does not work
- do we allow gofunction int main() ? --> BUGFIX checkout test-gofunc-main.gmm