Okay here my attempt to describe how they might be coded.
Every time a train approaches a signal it checks its state and follows its speed instructions (green, amber, red).
When a train passes a green or amber signal, it "picks up" its instructions from the signal (i.e. switch to track B and proceed with caution, or all clear, etc). This would mean that whenever trains pass a signal, all nearby signals (the current line, the spur line and any line affected by the passage of said train) would need to be modified.
It would also mean that the signals "know" the train, and where it needs to go. (Hence signalling would be where the processing needs to be done)
Is this method any different than the olden days? When a train approached a signal box, they were usually manned by someone whose job it was to ensure the ahead track was free by telegraphic communication.
This of course can be viewed in the modern times, with the trains picking up their instructions on the fly.
Trains just know where to go and tell the signals when they go past that they would like to switch to another track. This is the same as PBS+TTDPatch. If said train is going to go into this path, then the corresponding signals are blocked. (In this case its the trains which tell the signals what to do)
They are essentially the same thing but philosophically different.
Personally I prefer the signal tells train method because its more realistic. People could perhaps control individual signals to re-route trains in the event of a bottleneck or whatnot.
Topic locked, discussion continued here (08112006).