This segment of code makes use of two data section predicates, status and children. The income calculations on form 1040 show how calculations from different forms are tied together. The following rules from the adjusted income section of 1040 and the medical deductions for schedule A, show how straight forwardly Prolog represents some confusing intertwined tax code. Here is the code that calls schedule A to get itemized deductions, calculates the appropriate standard deduction, and makes the right decision on which to use for the tax form. The tax computation is done by another predicate which knows how to build tax tables.
Some forms require tabular information to be filled in on the form.
So far, the tax program does not handle this case. TableName is the name of a predicate in the data section which will write the required table. The report predicate calls TableName when it encounters this type of value. For example, on schedule B - 2, you must list all of the banks you earned interest from. The report predicate is modified to call a predicate process to deal with the Value.