By definition, if a jurisdiction doesn't recognise the corporation at all, it isn't a corporation. If the jurisdiction requires human beneficial owners to recognise it as a corporation, the named human beneficial owners are the owners, even if they're very passive owners who don't have any say in the operations or take anything out of the business (like, for example, the average AAPL stockholder). And we already have a word for software that prevents people with the legal title to assets from using them and pays out to other people instead: it's not "machine owned corporation", it's malware.
Law: do not kill. Machine kills. It has broken the law, and would, presumably, be subject to asset seizure, temporary deactivation, or, in extreme cases, permanent termination. Much like
how other 'persons' break the law and are held accountable.
Without a change in law, I don't see it. The owner or manufacturer of the machine is liable; they're subject to the law and prosecution. The machine could "suffer" the actions you describe, but that would be at most punishment against the owner, or more neutrally just removal of a hazard.
Guns and cars aren't prosecuted for murder. I'm assuming autonomous cars won't be either.