1 | Here are my comments on the programming assignments and the last two
|
---|
2 | homework assignments.
|
---|
3 |
|
---|
4 | Greetings,
|
---|
5 |
|
---|
6 | Thijs <thijsvanommen@gmail.com>
|
---|
7 |
|
---|
8 | Java, first part:
|
---|
9 | - release_writelock() in ReadProcess should be release_readlock()
|
---|
10 | - && in get_writelock() should be ||
|
---|
11 | - writer does only a simple notify() when releasing its lock, while
|
---|
12 | there might be many readers waiting that could go in at the same time
|
---|
13 | Java, second part:
|
---|
14 | - writerequest should be an int, not a boolean, as there can be many
|
---|
15 | writers waiting to get a lock (you identified this problem in your
|
---|
16 | report)
|
---|
17 | - both notify()'s should now be notifyAll()'s: currently, a if either
|
---|
18 | notify() happens to wake up a reader while a writer is also waiting
|
---|
19 | for a lock, your program freezes
|
---|
20 |
|
---|
21 | Prolog, part 1c:
|
---|
22 | - your paths don't include the first and last points, which do belong to
|
---|
23 | it
|
---|
24 | - path(a,c,[[a,b],[b,c],[c,b]],[b,c,b]) is satisfied, but the path
|
---|
25 | clearly isn't semi-acyclic
|
---|
26 | Prolog, part 2:
|
---|
27 | - comparisons should be strict
|
---|
28 | - "min/max" constants limit functionality
|
---|
29 |
|
---|
30 | Scheme: GRADE 7,5
|
---|
31 | - late
|
---|
32 | - you don't relate the difference in programs to a possible difference
|
---|
33 | in paradigms
|
---|
34 | - substitute doesn't handle the empty list as its first parameter
|
---|
35 | - while you treat the strings recursively, they don't fully reflect
|
---|
36 | the nature of recursive lists, being stored linearly
|
---|