3 ms·
> Direct File also incorporates the Fact Graph, a declarative, XML-based knowledge graph data structure that is designed to reason about incomplete information,
by internet_points 1y ago
> Direct File also incorporates the Fact Graph, a declarative, XML-based knowledge graph data structure that is designed to reason about incomplete information, such as a partially completed tax return. The Fact Graph is written in the Scala programming language; it runs on the JVM on the backend and is transpiled via Scala.js to run on the client as well. Direct File's Fact Graph is not domain-specific, and it may be useful to revenue agencies and as a reference for business rules engine implementations.
- MrLeap 1y agoInteresting, I want to read more about this.
- timhigins 1y agoThe code that defines how the fact graph works is here: https://github.com/IRS-Public/direct-file/tree/main/direct-file/fact-graph-scala https://github.com/IRS-Public/direct-file/tree/main/direct-f... but the actual tax definitions that deal with facts and derived calculation are here: https://github.com/IRS-Public/direct-file/tree/main/direct-file/backend/src/main/resources/tax https://github.com/IRS-Public/direct-file/tree/main/direct-f... See for example the standard deduction and tax rate calculations https://github.com/IRS-Public/direct-file/blob/main/direct-file/backend/src/main/resources/tax/standardDeduction.xml https://github.com/IRS-Public/direct-file/blob/main/direct-f... https://github.com/IRS-Public/direct-file/blob/main/direct-file/backend/src/main/resources/tax/taxCalculations.xml https://github.com/IRS-Public/direct-file/blob/main/direct-f... I imagine these are based on the MeF (Modernized e-File) schemas because the system needs to transform the input data into XML MeF schemas to submit electronically to the MeF system (See https://www.irs.gov/e-file-providers/modernized-e-file-mef-schemas-and-business-rules https://www.irs.gov/e-file-providers/modernized-e-file-mef-s...)
- throw678937 1y ago"A Fact Graph is a DAG, just like Excel." [1] A DAG won't work for everything! For example, the advance premium tax credit (i.e., the means-tested Obamacare health premium subsidy) has a circular relationship with the above-the-line deduction that self-employed people can take for healthcare costs. The IRS says you can iterate until you get stable values. [2] [1] https://github.com/IRS-Public/direct-file/blob/main/direct-file/fact-graph-scala/shared/src/main/scala/_tutorial/01_introduction.worksheet.sc https://github.com/IRS-Public/direct-file/blob/main/direct-f... [2] https://www.irs.gov/pub/irs-drop/rp-14-41.pdf https://www.irs.gov/pub/irs-drop/rp-14-41.pdf
- deleted 1y ago[deleted]