Next: Analysis of Large Programs
Up: Preferences
Previous: MrSpidey Analysis Preferences Window
The MrSpidey Type Display preference window controls how
MrSpidey computes and displays type information. An example of this
window is shown in figure 3.2, and the controls
are described below.
Figure 3.2: MrSpidey Type Display preferences window
-
Show types as:
Types can be displayed either as basic types (default), which just
show the range of functions, or as type schemas, which show how the
domain and range of a function are related (e.g. (X1 ->
X1)). Basic types contain less information, but are more compact,
which is an important benefit when working with large programs. With
basic types, users can also choose whether or not to show instance
variables and structure fields. For large programs, it is often best
not to show these components, in order to produce reasonably compact
types.
-
Constraint simplification algorithms:
This radio box controls which constraint simplification algorithm is
used to simplify the constraint system of an expression, before
converting that constraint system to a type. These constraint
simplification algorithms are described
in [4].
-
Type naming:
This parameter controls what types are named in a rec type
expression, and can be:
-
Recursive:
Names just enough types to express recursive types.
-
Multiple: (default)
Names every type that is referred to more than once
-
Non-Trivial:
Names every type except trivial types such as num, sym,
etc.
-
All:
Names all types.
-
Primitive types:
This parameter can be:
-
(prim ...):
Displays primitive types as (prim car) etc.
-
Given types:
Displays the given types of primitives, e.g.
((cons a b) -> a)
. -
Inferred types: (default)
Displays the inferred domain and range of primitive functions, e.g.
((cons num 4) -> num)
.
-
Use equivalences to simplify types:
If this control is on (default), then a number of rewriting rules are
used to simplify types before they are displayed.
-
Use equivalences that make types tidy:
If this control is on (default), then some of the type rewriting rules
will merge types into disjoint unions, thus losing a certain amount of
type information in order to produce a more compact type.
Next: Analysis of Large Programs
Up: Preferences
Previous: MrSpidey Analysis Preferences Window
PLT