Law does have subroutines like this... but they're implicit via "as used in this section, X is defined as" clauses that may be pages away or defined decades prior, as well as de facto definitions scattered through centuries of case law. New legislation can't simplify things unless the entire graph of implicit definitions is considered.
All this was inscrutable before LLMs, but LLMs bring their own challenges: to summarize something in plain text, is it using a deep graph of definitions that are sourced and verifiable, or hallucinating their existence? IMO architectures as in https://arxiv.org/html/2410.04949v1 and https://arxiv.org/html/2409.13252v1 are useful; one uses LLMs to create local knowledge graphs and integrate them, then translates natural language queries into (successive) graph queries or graph-based RAG approaches. Things are still evolving in real time here, and IMO we've only scratched the surface of what's possible.
All this was inscrutable before LLMs, but LLMs bring their own challenges: to summarize something in plain text, is it using a deep graph of definitions that are sourced and verifiable, or hallucinating their existence? IMO architectures as in https://arxiv.org/html/2410.04949v1 and https://arxiv.org/html/2409.13252v1 are useful; one uses LLMs to create local knowledge graphs and integrate them, then translates natural language queries into (successive) graph queries or graph-based RAG approaches. Things are still evolving in real time here, and IMO we've only scratched the surface of what's possible.