Such a program could not make the assumption that the root of the chord is
always being sung by the bass or any other voice, or being sung at all. But
if the lp syntax allowed "marking" what note is the current chord root at
any point in time, then it could generate possible names for the harmony at
that point in time. Otherwise I could see a lot of wrong and weird chord
names being generated by an algorithm that is not being told what is the
root note. Also the root of the chord may not always appear in the score,
its common to remove the root or the 5th as they are more "expendable" than
the 3rd or 7th, because the 3rd and 7th dedermine maj/min or dominant
leading tones, often the root is even more expendable than the 5th for
deletion. So what this algorithm would really need is an "invisible staff"
that allows you to just name to root notes and duration thereof, this staff
is never printed, nor would it participate in midi, etc. it's just there to
tell the algorithm what the current root is at that pont in time, then the
real notes in the score are used to come up with a suitable chord name.
BTW your idea sounds like a very cool idea, as I dont know of any notation
program that can also do harmony analysis. It would be a quick way to
generate the names, then go back and correct the "wrong" ones. Nice.