(Laws | Contracts) are just a set of rules that may have been codified in a sloppy fashion which allows a number of implicit logic errors to slip through as there is no formal testing.
I have worked in areas related to encoding acts of legislation and regulation into chunks of DSL for processing by a rule engine. It was easier than I expected, but was not without challenges.
When compared to normal business process automation, at least laws have a specific definition(s) for every term already defined as well as specific outcomes; whereas the agony of throwing BAs at interpreting a business function that is poorly defined and without any specific outcomes can be a nightmare.
Imagine the first inroads are as supplementary tools to identify legal loopholes and gaps(the implicit logic errors when the rules are combined).
In terms of writing contracts, this has already been heavily automated; remember EDI, umm, trading systems, electronic purchasing?
Judiciary bodies already use software that highlight variations in sentencing whilst guiding judges and magistrates on a range of factors that determined previous sentence ranges(precedents).