The Monster Burger Challenge

42 views
Skip to first unread message

Meng Wong

unread,
Oct 5, 2016, 4:11:08 PM10/5/16
to ta...@lists.legalese.com
What's the simplest contract you can imagine?

How about this one:

THE 72OZ STEAK RULES

Meal consists of: Shrimp Cocktail, Baked Potato, Salad, with Roll, Butter, and of course the 72 oz. Steak

Entire meal must be completed in one hour. If any of the meal is not consumed (swallowed)…YOU LOSE!
Before the time starts, you will be allowed to cut into the steak, and take one bite. If the steak tastes good and is cooked to your satisfaction, we will start the time upon your acceptable approval. The time will not stop, and the contest is on, so make SURE before you say “yes.”
Once you have started you are not allowed to stand up, leave your table, or have anyone else TOUCH the meal.
You will be disqualified if anyone assists you in cutting, preparing or eating of your meal. This is YOUR contest.
You don’t have to eat the fat, but we will judge this.
Should you become ill, the contest is over… YOU LOSE! (Please use the container provided as necessary.)
You are required to pay the full amount up front; if you win we will refund 100%.
You must sit at a table that we assign.
If you do not win the steak challenge, you are welcome to take the leftovers with you.
No consumption or sharing of the leftovers is allowed in the restaurant once the contest is over.
If you fail to complete the challenge, you must pay the full $72 dollars.

So: imagine the scene at the roadhouse, late on a Friday night, the kind of full-moon Texas night that sets the coyotes to howling and the ranch hands to tequila.

A warm, wet wind blows in from the bayou. The saloon doors swing. Conversation lulls. A pool ball clicks. Heads turn. A stranger has come to town.

She fixes the the maître d' with a steely glare. Wordlessly, she sweeps her Stetson off her head, and points it at the sign on the wall that reads "Are You Man Enough To Handle The Big Texan's 72 Ounces?"

(I know, the scenario is problematic. Is the Big Texan even the kind of restaurant that has a maître d'?)

The room goes quiet as a dry creekbed. The manager emerges. Looks at her, narrows his eyes, tilts his head. She follows him to a table in front of the stage, where the light is good. He hands her the rules on a card.

Her eyes miss nothing. In a blink, her wallet has drawn and gone. $72 lies on the table. Small, unmarked bills.

She growls: "challenge accepted!"

She is, of course, an android: incept date 2016.

How has she formalized this contract?

What is her internal representation of the deal in L4?

Meng Wong

unread,
Oct 5, 2016, 6:48:27 PM10/5/16
to ta...@lists.legalese.com
On Wed, Oct 5, 2016 at 4:10 PM, Meng Wong <meng...@legalese.com> wrote:
What's the simplest contract you can imagine?
What is her internal representation of the deal in L4?
 
Let's begin with a simplified version of the Big Texan Steak. Then we'll build on it.

Please note that I'm approaching all this from the standpoint not of a lawyer but of a computer scientist – what Norbert Wiener might call a cyberneticist. More on that later.

Simplify the contract to its essentials. Instead of a fancy steak, we'll start with a Basic Burger.

The simple terms: Pay $7.20 up front. House produces a burger. Patron has to eat it all in an hour, starting from when it's picked up. If Patron finishes the burger within an hour, Patron gets money back. If not, house keeps the money
  • There are two parties: the Patron and the House.
  • There is consideration: $7.20.
  • There is a deliverable, with a deadline: the Patron must down the burger, leaving nothing on the plate, within one hour.
  • After downing the burger within the hour, the Patron must announce completion to the House.
  • If the deliverable is met, the House pays the Patron $7.20.
  • If not, House keeps the cash.
Sounds straightforward, right? There's at least one bug! We'll get to that later.

Before we formalize this in L4, let's formalize it in something other than L4.

We'll use a sequence diagram: one of the tools of the trade in the software world. It's nice to have tools: UMLet, RFFlow, WebSequenceDiagrams, the humble mscgen. Lawyers don't have these kinds of tools; they have to write in words. In Word.

The Basic Burger terms enumerate two scenarios: success and failure.





The success scenario looks like this:

# MSC for the Basic Burger -- success scenario
msc {
  p [label="Patron"], h [label="House"];

  p->h [ label = "pay $7.20" ] ;
  h->p [ label = "deliver burger"];
  p=>p [ label = "pick up burger" ];
  ---  [ label = "clock starts" ];
  p=>p [ label = "eat burger" ];
  ... ;
  p->h [ label = "declares completion" ];
  ---  [ label = "condition: burger is all eaten && clock < 1h" ];
  h->p [ label = "pay $7.20" ];
  ---  [ label = "END" ];
}

Inline image 1






The failure scenario looks like this:

# MSC for the Basic Burger -- failure scenario
msc {
  p [label="Patron"], h [label="House"];

  p->h [ label = "pay $7.20" ] ;
  h->p [ label = "deliver burger"];
  p=>p [ label = "pick up burger" ];
  ---  [ label = "clock starts" ];
  p=>p [ label = "eat burger" ];
  ... ;
  ---  [ label = "clock reaches 1 hour" ];
  ---  [ label = "condition: some portion of burger remains uneaten" ];
  ---  [ label = "END" ];
}
Inline image 2





Can you spot the bug?

Experienced programmers will immediately ask: "but what about the race condition"? In other words, what if the Patron is declaring completion at exactly the 1-hour mark? Then neither scenario matches. We need to add code to handle a situation where the completion notice was lost, the clock reached 1 hour, and the burger is eaten:






Timeout Scenario:

# MSC for the Basic Burger -- timeout scenario
msc {
  p [label="Patron"], h [label="House"];

  p->h [ label = "pay $7.20" ] ;
  h->p [ label = "deliver burger"];
  p=>p [ label = "pick up burger" ];
  ---  [ label = "clock starts" ];
  p=>p [ label = "eat burger" ];
  ... ;
  p-xh [ label = "declares completion" ] ;
  ---  [ label = "clock reaches 1 hour" ];
  ---  [ label = "condition: no portion of burger remains uneaten" ];
  h->p [ label = "pay $7.20" ];
  ---  [ label = "END" ];
}

Inline image 3








There are a handful of minor cases that, for the sake of completeness, we should deal with.

What if the Patron didn't finish the burger, but declared that she did?

# MSC for the Basic Burger -- mistaken completion scenario
msc {
  p [label="Patron"], h [label="House"];

  p->h [ label = "pay $7.20" ] ;
  h->p [ label = "deliver burger"];
  p=>p [ label = "pick up burger" ];
  ---  [ label = "clock starts" ];
  p=>p [ label = "eat burger" ];
  ... ;
  p->h [ label = "declares completion" ] ;
  ---  [ label = "condition: some portion of burger remains uneaten" ];
  h->p [ label = "uh, nope, you gotta eat that bit there" ] ;
  ---  [ label = "resume" ];
  ... ;
}

Inline image 4




What about this situation? The Basic Burger contract doesn't cover this.

Inline image 1

That's where the idea of a default rule comes in. Default rules are how incomplete contracts become complete contracts. You may have written some exception handlers, but if an exception was thrown that none of your handlers caught, the system has default handlers of its own, to catch divide by zero errors, out of memory errors, IO-against-a-closed-filehandle errors, you name it. Usually your program dies but at least you get a different trace depending on the error.

What default rule should apply in a case where the House is out of burgers? It's common sense:

Inline image 6

The contract didn't need to specify it, because the contract operates in a larger context, in a jurisdiction which specifies all kinds of default rules, that kick in when a contract fails to cover an edge case.

In my next post, we'll look at how L4 would describe the Basic Burger.

Koh Jie Kai

unread,
Oct 5, 2016, 11:03:17 PM10/5/16
to ta...@lists.legalese.com

Hi guys. Am a lawyer (not a computer scientist!). Have been lurking for a while – this is a fascinating project.  

 

To put the contract back into terms a common law lawyer would be familiar with (as a simple example):

 

++

 

1.      The House agrees to sell the Patron a burger for $7.20 (the “Consideration”).

 

2.      The House agrees to refund the Patron the Consideration in full, subject to completion of all of the following conditions precedent:
(a)  the Patron shall consume the burger in full leaving nothing on the plate (“Full Consumption”);

(b)    Full Consumption must take place within 1 hour of receipt of the burger by the Patron; and

(b)  the Patron shall announce his completion of Full Consumption to the House.

 

++

 

What would be the challenges in re-creating drafting styles and structures familiar to lawyers (as above?)

 

Kind regards,

 

Jiekai

--
You received this message because you are subscribed to the Google Groups "Users and General Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to talk+uns...@lists.legalese.com.
To post to this group, send email to ta...@lists.legalese.com.

image002.jpg
image004.jpg
image006.jpg
image008.jpg
image010.jpg
image012.jpg

Jason Morris

unread,
Oct 6, 2016, 4:47:58 PM10/6/16
to Users and General Discussion
Yeah, interesting.

With varying degrees of answers to "what do you mean by ___?" and "how will you know?" and "who is responsible for ___?" and "what happens if ____?", there are any number of natural langauge contracts that could express similar ideas. Expressing EXACTLY the idea expressed by the diagrams would be painful in natural language. That is the purpose of the diagram langauge.

Something more precisely the same in legal langauge might be:

Subject to availability, the patron may enter the contest by paying $7.20 to the house.
If the patron enters the contest, the house will provide the patron with a burger.
The patron may declare that they have finished the burger.
When the patron declares that they have finished the burger, the house will promptly confirm whether the patron has finished the burger, and promptly inform the patron.
If
a) the house confirms that the patron has finished the burger, and
b) the time elapsed between providing the burger to the patron and the patron's confirmed declaration that they have finished the burger is one hour or less,
then the house will pay the patron $7.20.


This, of course, considers possibilities like multiple incorrect declarations of "i'm done." It also times the finishing at the time of declaration, not the time of the confirmation. "Promptly" prevents the house from failing to inform the patron that they missed a part.  There is no "the patron must finish the burger" because they need not.  Nor need they declare. If they don't, it's a regular burger purchase. The second part of the agreement only comes into effect if they declare being done, which is optional. They can also declare while wrong, so there is no point in saying that they must eat first and then declare, otherwise an incorrect declaration is a breach, not by the mechanism of the contract itself. "Subject to availability" adds in the edge case that Meng mentioned.

But I'm a lawyer who was a computer geek first, so I'm more likely to optimize the number of words than the readability, and what I wrote is going to  be less intuitive to people.

The proposed contract version also has another problem. While it says that the patron must eat it in under an hour, and announce that they ate it in under an hour, the contract doesn't say whether or how the announcement relates to the timing. If the person eats it in 50 minutes, and announces the next day, that complies with the contract, and the contract has no agreed mechanism for determining the truth of the "ate it in one hour" requirement.

The problem with translating from L4 to a natural langauge will not be generating an accurate rendering. It will be picking one, and making it readable.

Consider what happens when you translate the C programming language to English in sufficiently precise a way to translate it back:

extern printf ();
enum S { x1, x2};

main
() {
struct S { int abdd; } j;
int i = x1; switch(i) {
case 1:
case 2: printf ("%d\n",45);
 
default: printf ("%d\n",45);
;
;
}
if(i) {
printf
("%d\n",i);
} while(i--) {
2;
}
for(i; i; i++);
do {3;}
while (i);
}

(with apologies for the mangled spacing)

becomes...

Let printf be an external function with no arguments returning an integer.
Let S be an enumeration with values x1 equal to 0 and x2 equal to 1.

Let main be a function returning an integer. It is called with no arguments.
To perform the function, let S be a structure with member abdd, where abdd is
an integer. Let j be a S structure. Let i be an integer, whose initial value
is enumeration x1. Perform block 1, starting at case i, or the default case
if no such case exists. To perform block 1, first let this be the start of
case 1. Let this be the start of case 2. Pass the string "%d\n" and 45 to
printf. Then let this be the start of the default case. Pass the string
"%d\n" and 45 to printf. Next, compute nothing. After that, compute nothing.
This ends block 1. Continuing on, we next perform block 2 provided zero does
not equal i. To perform block 2, pass the string "%d\n" and i to printf.
Continuing on, we next continue to perform block 3 as long as zero does not
equal i before decrementing i by one at the beginning of the iteration. To
perform block 3, evaluate 2. Continuing on, we next continue to compute
nothing as long as zero does not equal i prior to the iteration; before
starting this loop, evaluate i; upon completion of each iteration of the
loop, increment i by one. Then continue to perform block 4 as long as zero
does not equal i at the end of the iteration. To perform block 4, evaluate 3.


J
Reply all
Reply to author
Forward
0 new messages