I agree that this would be nice, however. as a non-lawyer and someone who considers themself to be not a "real" developer (even though I write software every day) I have often wondered how alike law and code are, really, when it comes to defining intent via a keyboard.
Or a unit test that determines whether the discussion during a meal with a customer was "substantially about business matters".
Anything more complex is an input to the system, the system can still be tested.
The function you ask about would be "getDeductiblePercentage()," and the unit tests would return various hard coded numbers. Actually determining that value for a real taxpayer is still hard.
Being able to show how information flows through the US tax code would be useful, even if it doesn't solve all the problems that arise from its intricacy.
This wouldn't replace human judgment; nobody in power would allow that. But even the capriciousness of politics can be expressed as Boolean logic (var isDeductible = taxpayerIsMe && !taxpayerIsYou). The tests could at least memorialize all the pork.