Juno(ID:1153/jun001)


Numerical constraint-oriented language for graphics applications. Solves its constraints using Newton-Raphson relaxation.

Inspired by writing figures for his thesis using Metafont and DRAW, the language itself is based on Dijkstra's calculus of guarded commands

Written in CEDAR


Related languages
Dijkstra's guarded command language => Juno   Based on
METAFONT => Juno   partly Inspired by
Juno => Juno 2   Evolution of

Samples:
References:
  • Nelson, Greg "Juno, a Constraint-Based Graphics System" view details Abstract: The authors describe a system that makes it easy and convenient to describe graphs and to include them as an integral part of the document formatting process.
    Extract: Programming Juno
    Programming Juno
    The Juno programming language is a version of the calculus of guarded commands described in E. W. Dijkstra's Discipline of Programming [5]. This is natural, because guarded commands are defined formally as predicate transformers, and "predicate" is just another word for "constraint". Dijkstra's language is a collection of predicate transformers acting upon the predicates of a theory of integers and arrays. The Juno programming language is essentially the same collection of predicate transformers acting upon the predicates of Euclidean geometry. But this section's description is conventional and operational.
    A Juno command can be considered to act upon an "abstract Juno machine". The state of this machine is determined by:
    ? an indefinite number of named point registers, each of which contains a value representing a point in the Cartesian plane.
    ? a single anonymous image, to be imagined as a map from the Euclidean plane to the set of colors, but represented as a map from a fine discrete grid to the set of colors.
    ? three mode registers, the color register, width register, and endsType register, whose contents will be described later.
    Extract: Painting commands
    Painting commands.
    The painting commands will be described first; these are used only after the point registers have been set by commands yet to be described. Here is list of them:
    A;B: Execute A, then execute B. (Composition)
    FILL p: Change the color of every image point entwined by the path p to the current contents of the color register. (A path entwines a point if the winding number of the path with respect to the point is non-zero.)
    STROKE p: Draw a stroke along the path p whose color is the contents of the color register, whose width is the contents of the width register, and whose ends are finished off in a style determined by the contents of the endsType register.
    c PAINT A: Set the color register to c, execute A~ restore the old contents o[ the color register.
    e ENDS A: Set the endsType register to e, execute A, restore the old contents of the endsType register.
    p, q WIDTH A: Set the width register to the distance between points e and q, execute A, restore the old contents of the width register.
    r WIDTH A: Set the width register to r millimeters, l execute A, restore the old contents of the width register. DRAW p: This is short for ROUND ENDS BLACK PAINT 1 WIDTH STROKE p.
    The basic marking commands have the form FILL p and STROKE p, where p is a path, that is, a connected sequence of edges and arcs. An edge is specified by its two endpoints; an arc is specified by its four Bezier control points.
    The semicolon has higher binding power than PAINT, ENDS, or WIDTH; for example, e ENDS A;B means e ENDS (A;B) rather than (e ENDS A) ; B.
    Extract: Constraint commands
    Constraint commands.
    Juno's constraint command is a special case of the general construct from the guarded command calculus, which has the form
    LET Variables I Constraints IN Command END ,
    where Variables is a list of local variables to be' introduced, Constraints is a conjunction of constraints on the values of the variables, and Command is what is to be executed in the scope of the local variables. If no values for the variables satisfy the constraints, the command is equivalent to Abort. If the constraints do not determine the values of the variables uniquely, then the command is non-deterministic, which means that the implementation is allowed to introduce any values that do satisfy the constraints.

          in SIGGRAPH '85 Conf Readings, B.A. Barsky ed, Jul 1985 view details