Comparing judicial precedent versus legislative codification for AI