We should approach this from a two-tiered testing platform.
The first tier is rather like how you'd do it in Rails or any other TDD environment.
We write a list of tests that we know should pass as true at the end. Let's say, start with the US and State constitutions as the basis.
def must_not_prohibit_exercise_of_religion()
{
People.can_exercise_religion?
}
We then write in the test laws and see what side effects occur. When those side effects occur, we must make note of them and consider the potential exceptions. def freedom_of_speech()
{
unless(crowded_theatre && People.speak == fire)
People.can_speak?
end
}
As a second layer then we must test it on smaller populations to determine the effects. This has worked wonderfully in some situations. "Gay Marriage will destroy marriage and society" is a claim I've heard prior. So test it in Massachusetts. Several years later, no marriages on record have been destroyed due to gay marriage, and the metrics of society's stability have not moved significantly in any direction that we can attribute to same-sex marriage. So it (should) pass and become law nationally because we've observed its effects. We can observe similar for the long term effects of required health insurance in Massachusetts as we debate how things should work out nationally.Just as we have 'human-readable code' why shouldn't our laws be machine readable? Computers can remember/understand 200+ years of case law probably better than humans. Again, this is something that we could test.
One of my friends is working on a law firm run by computers (http://www.robotandhwang.com/). Of course the machines can't show up in court or legally offer advice, but they can advise the attorney. (Law.com and ABA Journal have cited him doing this, so maybe it isn't as crazy as it sounds).