Lawcode Theory
History
9-4-2007: cleanup & wiki-migration
11-10-2005: First Posting
Purpose
To attempt to examine law from a programmer's perspective: treating it as a logical program, that can be tested, optimized, and debugged.
Concepts
Law could be compiled into code based on its wording. Depending on the jurisdiction, there are standards that appear that could be constructed as objects and variables.
- Variables: nouns tend to be prefaced by "a:" a person, a man, a body of water, etc.
- Conditional logic: "no person under the age of 21" becomes "if(person.age < 21)".
- Math: "the clerk shall collect an additional $4" becomes "clerk.fee += 4".
- Objects: departments, agencies, persons, etc, could be codified as classes and objects with specified functions and variables unique to the subject.
Example
On November 8, 2005, the State of Texas passed by 76% a constitutional amendment banning gay marriage. However, it was raised in some corners, and I myself read the law for myself and came with a similar conclusion, that the amendment may have dis-recognized ALL marriage in the state.
Constitutional Amendment Ballot Item 2, Texas, 2005
SECTION 1. Article I, Texas Constitution, is amended by
adding Section 32 to read as follows:
_Sec. 32. (a) Marriage in this state shall consist only of
the union of one man and one woman._
_(b) This state or a political subdivision of this state may
not create or recognize any legal status identical or similar to
marriage._
If you turned this law into pseudocode, you may come up with something like this...
// ---begin pseudocode---
//marriage defined by A1.S32.a
object marriage
{
var man;
var woman;
}
//similar marriage conjectured by A1.S32.b
object marriage_equivalent
{
var partner;
var partner;
}
//marriage test defined by A1.S32.b
var function marriagetest(object relationship)
{
if(relationship == marriage) return null;
if(relationship == marriage_equivalent) return null;
}
main()
{
//create an equivalent marriage as defined before & test its validity
civilunion = new marriage_equivalent;
if(marriagetest(civilunion) == null) print "Not Married";
//create a marriage as defined before & test its validity
newmarriage = new marriage;
if(marriagetest(newmarriage) == null) print "Not Married";
}
// ---end---
Suggested targets of analysis
- Florida Marriage Law: multiple pieces of the law increment the clerk's fee. The fee varies based on what is set in state law, plus what the county is adding from their books.
- The US PATRIOT Act contains provisions that are also found in the Alien and Sedition Acts. Analysis should reveal equavalent functions and variables.
Reference Links