Documentation

Cvc.Untyped.Theory.Nullable.Defs

Nullable constructors, sort-erased #

cvc5's Nullable is the Option sort: a value is either nullable.null or nullable.some v. Unlike a declared datatype, Srt.nullable gives the same sort every time for the same element sort.

It is a datatype underneath, so a nullable value is an APPLY_CONSTRUCTOR term.

Constructors #

The null value of the nullable sort over the element sort elm.

Equations
Instances For

    The nullable value holding elem, nullable.some elem.

    Equations
    Instances For

      The element the nullable term nullable holds, nullable.val.

      Equations
      Instances For

        Whether the nullable term nullable is null, nullable.is_null.

        Equations
        Instances For

          Whether the nullable term nullable holds an element, nullable.is_some.

          Equations
          Instances For

            Values #

            A nullable value is the constructor applied to nothing or to one element, so it is read off the term's kind and children. Unlike a set or a sequence, this works on a built term as well as on a model's answer.

            The element a nullable term denotes, or none if it denotes the null value.

            Fails unless the term is built by a nullable constructor (see isNullableValue): a declared constant of nullable sort, for instance, is not.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Whether a term is built by a nullable constructor, nullable.null or nullable.some.

              That is what getNullableElem? needs. Being nullable-sorted is not enough: a declared constant of nullable sort is built by neither.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                The optional value a nullable term denotes.

                Equations
                Instances For