MODULE Line; (* Procedures and predicates for lines and line segments. *) IMPORT Geometry, PS; (* A line segment "[a, b]" is defined by its two endpoints "a" and "b". *) PROC Draw(a, b) IS PS.MoveTo(a); PS.LineTo(b) END; UI PointTool(Draw); (* Add the line segment "[a, b]" to the current path. The current point becomes "b". *) PRED On(p, a, b) IS Geometry.Colinear(a, p, b) END; UI PointTool(On); (* The point "p" is on the line "[a, b]". *)