This is something I've given some thought to since encountering logic programming. Could something like this be done in say, Prolog?
Most complaw research happen in the logic department of universities.
- blawx.com use ergo 2 in the backend
- Kowalski ( author of iso prolog ) wrote a paper on the topic in the 80's http://www.doc.ic.ac.uk/~rak/papers/British%20N ationality%20Act.pdf
Also Prolog does not solve all the problems related to programming the law, especially it doesn't have a nice way to handle redefinitions of variables with legislative exceptions as described https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3088206