Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlloyField

Hierarchy

Index

Constructors

constructor

  • Create a new Alloy field.

    Parameters

    • id: string

      The field's unique ID

    • types: AlloySignature[]

      An array of signatures defining the types of each column of the field

    • tuples: AlloyTuple[]

      The tuples defined by the field

    • Optional proxy: AlloyProxy

      If provided, a proxied signature will be created.

    • Optional varName: string

      If provided, the variable name to assign to this field when proxied.

    Returns AlloyField

Methods

clone

  • Create a clone of this field

    Parameters

    • signatures: AlloySignature[]

      An array of signatures. When creating the clone of this field, the types associated with each column are not cloned. Instead, provide an array of signatures and this method will find the corresponding types by signature ID in the array and use them to define types of the cloned field.

    • Optional proxy: AlloyProxy

      If provided, a proxied clone will be returned.

    Returns AlloyField

empty

  • empty(): boolean

equals

id

  • id(): string

in

  • Returns true if this set is a subset of the provided set, false otherwise.

    Parameters

    Returns boolean

join

  • Perform a join operation with another set. This operation is equivalent to the dot join operator in Alloy, in which this set is on the left side of the dot and that set is on the right side.

    Parameters

    Returns AlloySet

project

toString

  • toString(): string

tuples

types

Static fieldsFromXML

  • Build all fields from an XML <instance> element. All fields are fully populated with tuples.

    Parameters

    • instance: Element

      The XML <instance> element

    • sigIDs: Map<string, AlloySignature>

      A map of signature string IDs to signature objects

    • Optional proxy: AlloyProxy

      If provided, all fields will be proxied.

    Returns AlloyField[]