Calculating how much secured territory you
have then got (given the status of all groups) looks possible, but I
am not aware of any software which does it perfectly.
This is easy and has the low time complexity of flood
filling once the life and death status are determined,
see the Japanese 2003 Rules. Notes: You can apply those
rules also for area-scoring or stone-scoring, if
principle determination of life and death is all you
want. OC, you can simplify life and death in the rules
by omitting the useless traditional exceptions.
Not so easy, if we are using what we might call "vernacular Japanese
rules", as implemented on Go servers and played in Britain. These rules
allow you to score territory in a live group even if it is adjacent to
dame.