decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
rangeCheck ain't just mathematics | 197 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
rangeCheck ain't just mathematics
Authored by: bprice on Tuesday, May 15 2012 @ 02:35 AM EDT
"throw new ArrayIndexOutOfBoundsException(..." doesn't look like the mathematics in any course I took. But then I only have a bachelors in mathematics.
Your plaint demonstrates only that your bachelors in mathematics doesn't cover all of mathematics.

The statement you give is an expression in a Java-ish mathematical notation. In ordinary algebraic notations, scalar multiplication may be denoted by an infix centered dot •, ⋅, or ·, by a centered oblique cross × or ⊗, or by adjacency (iff at least one of the multiplicand and multiplier are non-numeric symbols). In most programming notations, scalar multiplication is denoted by an asterisk * (some use ×, but only when it's available in the character set the notation is designed for). In the notations of other mathematical fields (oops: field is a term of art in math) areas, · and × have different meanings, like inner product and matrix product.

Programming is largely based on recursive function theory, applied to full integer subsets, other domains which can be mapped onto them (Boolean, Character), vectors thereof (arrays, strings), and suchlike.

Your example shows the use of adjacency to denote function composition (often seen as a centered circle ○), the omission of parameter bracketing in many cases, and the use of multi-character names for most everything.

In your example, at a high level:

  • throw is a function on the domain of the class Throwable, with a null range.
  • new ArrayIndexOutOfBoundsException(... is syntactic sugar for new(ArrayIndexOutOfBoundsException). ArrayIndexOutOfBoundsException(..., where
    • new is a function on the domain of Class (in this case, ArrayIndexOutOfBoundsException) and range Instance-object-of Class.
    • The dot is an infix selector operator between a Class or instance object and an item symbol (set-of-function or datum). The entire infix expression denotes, in this case, a set of functions.
    • The composition of a set-of-functions and an actual parameter list (... denotes application of a member of the set to the actual parameter list. In particular, the function applied is the one whose formal parameter list 'corresponds to' (per the language definition) the given actual parameter.
    • ...
There is a lower level in which the discourse concerns the state vector of the computation, and how various functions fool around with it: that's the level where throw is defined with respect to the rest of the program.

I hope you get the message: programming is a collection of mathematical disciplines. Just like all such disciplines, programming has a set of notations for the abstractions that are pertinent to that discipline, so that the practitioner doesn't have to mess with lower-level abstractions. The lower levels are still there, just as the Peano foundations for arithmetic are still there: you can, for the most part, safely ignore them.

---
--Bill. NAL: question the answers, especially mine.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )