Subprograms

processes are sent the IDs of their neighbours at start once they have them, they start telling others if they have a degree of 1 and they listen for neighbours signaling they have a degree of 1

signification of messages to point_processes :
e : message comming from main meaning it is now time to write
the result.
d <neighbour_id> : the neighbouring point with neighbour_id
had only one neighbour left ‘alive’ and is therefore now ‘dead’.

a : death acknowledge means the neighbour now knows the point is ‘dead’

A <neighbour_id> <neighbour_x_pos> <neighbour_y_pos> : the
corresponding neighbour is still ‘alive’ (sent after the neighbour received a message ‘e’).
D : a neighbour is ‘dead’ and no line should be displayed between the
two points.
Solidator.point_process.debug(string, own_id)[source]

write a string in stderr and add the point’s own_id for clarity

Solidator.point_process.main()[source]

Waits for processes to die around you to check if you can survive

Solidator.point_process.read_neighbours(amount)[source]

Reads amount neighbours from stdin

Solidator.point_process.read_position()[source]

Reads a line from stdin and interprets it as a position

Solidator.point_process.signal_death(neighbour_messagers, own_id)[source]

Tells all neighbours of own_id death by neighbour_messagers’ fifo files

Solidator.point_process.svg_coord(x)[source]

Returns the coordinate in svg space for x

Solidator.point_process.svg_output(message, own_id, position, res)[source]

Outputs to res the svg line from position to the neighbour indicated in message if own_id is smaller than the neighbour’s id (this is to avoid writing twice the same line)

Solidator.point_process.who_am_i_at_the_end(is_dead, neighbour_messagers, own_id, position)[source]

Tells all neighbours by neighbour_messagers the vertex own_id and position if not is_dead, else send them D