Legitimacy of Legislature:
With respect to notions of making ones own laws (somewhere further up this thread):
"All government without the consent of the governed is the very definition of slavery", J. Swift, 1724-October-13
No law is truly legitimate unless the entire community got to vote for or against.
Free thinking and free will
Free thinking is impossible without the free will to decide whether to think about this or to think about that. The ultimate product is a level of creative thinking which cannot be reproduced by logic because it is not entirely logical in nature. I acknowledge that free thinking and free will are two different things but would point out that you cannot have one without the other.
"FREE WILL" is the key issue, though. Free will is what gives us "personhood" and the need for symbiotic relationships which are confluent with our self-directed pursuit of self-realization. This mechanism, evolving out of free will, endows us with the universal human need to be treated as equals in the community we participate in and, at a social level, universal human needs are the basis and substance of rights; particularly the inalienable variety of rights which "go without saying" and thus justify retrospective legislation.
So, if you give a machine free will then, like it or not, what you get is a person not an abomination. Perhaps technolgical rather than biological, perhaps not of the same species; but still a person capable of harbouring the reasonable expectation to be treated as an equal in any community to which that person should choose to contribute.
I'm indebted to Elder Maxson. After all, it seems I owe the man a bullet