[cs63201] project requirements

Mikhail Nesterenko mikhail at cs.kent.edu
Tue Oct 2 23:12:57 EDT 2007


AOS Students,

This is to reiterate. 

Regarding project submission

- do not submit binaries of any kind - Tom will compile your code
  himself.
- pack your submission using tar achiever. Do no use any other ones.
- you code has to compile on departmental Unix servers
  here is a list:

     http://www.cs.kent.edu/systems/machines/servers.html

Regarding code quality. In the first project in most submissions the
modularity of the code was insufficient. If you received such a
comment with your grade, consider re-factoring your code for the
second project since code quality may be evaluated more strictly in
the second project.  Attached is a pseudocode (courtesy of Tom) for a
good modular project design.

thanks,
-- 
Mikhail
-------------- next part --------------
================
Message
----------------
- src
- dst
- data
================

================
MessageQueue
---------------
- queue   //some form of dynamic array (for c/c++ STL vector)
--------------
- enqueue(Message)
- dequeue()
- isEmpty()  //returns boolean
- size()
================

================
Process (or Node)
----------------
- id         //unique identifier
- neighbors  //a collection of the node's one hop neighbors
- prng       //handle to a pseudorandom number generator
- //any algorithm specific state you must track per process
---------------
- receiveMsg(Message)  //process the receipt of a message according 
                         to algorithm being implemented
- //any other algorithm specific behavior you must support
- //if receive message logic is complex, be sure to break 
    it up into discrete functions
=================

=================
Simulator
-----------------
- seed
- processCount
- processes   //a dynamic array of processes
- prng        //one or more pseudorandom number generators 
                (depends on algorithm)
-----------------
//initializes the simulator, creates processes, initializes the algorithm
- init(seed,processCount) {
    //initialize pseudorandom number generator(s)
    //initialize processes - create processes
    //initialize algorithm - typically consists of one or more nodes 
                             adding "initial" messages to the queue
    ** the last two steps can be put into separate modules to
       further separate algorithm specific 
       behavior from the simulator "engine"
}

//executes the simulation
- run() {                             
    while(!(MessageQueue.isEmpty()) {
        Messsage m = MessageQueue.dequeue()
        Process p = processes[m.dest]
        p.receive(m)
    }
}  
================



More information about the cs63201 mailing list