Overview
Atlassian Sourcetree is a free Git and Mercurial client for Windows.
Atlassian Sourcetree is a free Git and Mercurial client for Mac.
Language Semantics
Our "language" has five kinds of values and four other kinds of expressions:

A NoPoints represents the empty set of twodimensional points.

A Point represents a twodimensional point with an
xcoordinate
and aycoordinate
. Both coordinates are floatingpoint numbers. 
A Line is a nonvertical infinite line in the plane, represented by a slope and an intercept (as in
y = mx + b
wherem
is the slope andb
is the intercept), both floatingpoint numbers. 
A VerticalLine is an infinite vertical line in the plane, represented by its
xcoordinate
. 
A LineSegment is a (finite) line segment, represented by the
x
andycoordinates
of its endpoints (so four total floatingpoint numbers). 
An Intersect expression is not a value. It has two subexpressions. The semantics is to evaluate the subexpressions (in the same environment) and then return the value that is the intersection (in the geometric sense) of the two subresults. For example, the intersection of two lines could be one of:
NoPoints
, if the lines are parallel a
Point
, if the lines intersect  a
Line
, if the lines have the same slope and intercept (see the note below about what we mean by "the same" for floatingpoint numbers)

A Let expression is not a value. It is like letexpressions in other languages we have studied: The first subexpression is evaluated and the result bound to a variable that is added to the environment for evaluating the second subexpression.

A Var expression is not a value. It is for using variables in the environment: We look up a string in the environment to get a geometric value.

A Shift expression is not a value. It has a deltaX (a floatingpoint number), a deltaY (a floatingpoint number), and a subexpression. The semantics is to evaluate the subexpression and then shift the result by
deltaX
(in the xdirection; positive is "to the right") anddeltaY
(in the ydirection; positive is "up"). More specifically, shifting for each form of value is as follows:NoPoints
remainsNoPoints
. A
Point
representing(x,y)
becomes aPoint
representing(x+deltaX, y+deltaY)
.  A
Line
with slopem
and interceptb
becomes aLine
with slopem
and an intercept ofb+deltaYm*deltaX
.  A
VerticalLine
becomes aVerticalLine
shifted by deltaX; the deltaY is irrelevant.  A
LineSegment
has its endpoints shift by deltaX and deltaY.