Skip to content

Equivalence Classes

Andrew Johnson edited this page Jul 22, 2024 · 17 revisions

Equivalence Classes are an important concept used throughout the compiler.

Operations on Classes

Set operations are used to manipulate objects and their classes. Some common operations include:

  • without-<class> remove information
  • with-<class> add information (strong)
  • guess-<class> add information (weak)
  • with-only-<class> add & normalize information (strong)
  • guess-only-<class> add & normalize information (weak)

Type Classes

Some common type classes include:

  • representation
  • size
  • fields
  • fields-size
  • datatype-normal
  • datatype-tag
  • property
  • proposition

Type Slots

Type Slots are similar to classes but are much more specific. A Slot is a single Ground Type possibly with some parameters but nothing else.

  • with-slot add information
  • with-only-slot narrow information
  • without-slot remove information