Documentation

CslibFrontier.Computability.PolyTime.CSP.Edge.Forest.Program

Finite chronological forest-search program #

The work representation uses the existing positional occurrence records: unary constraint and port positions, binary original names. Only final result positions are converted to binary global indices. Every loop traverses an actual list or its length. The stopped event occupies a separate small field: the completed log stays in the same encoding throughout the iteration.

@[reducible, inline]

One work expansion: its positional input record and ordered positional output records.

Instances For
    @[reducible, inline]

    A unary-position input record is framed; its framed output list follows. Names stay binary.

    Instances For
      @[reducible, inline]

      Completed work expansions, newest first.

      Instances For
        @[reducible, inline]

        A framed list of the documented work expansions.

        Instances For
          @[reducible, inline]

          Work scan state: ordered children and the optional first meeting port.

          Instances For
            @[reducible, inline]

            The child list is framed, followed by an option tag and a positional meeting record.

            Instances For
              @[reducible, inline]

              Small terminal data: current input, current children, and meeting output.

              Instances For
                @[reducible, inline]

                Input and children are framed in order, followed by the meeting record.

                Instances For
                  @[reducible, inline]

                  Log and remaining ports, followed by running / exhausted / meeting status.

                  Instances For
                    @[reducible, inline]

                    Log and remaining list stay in fixed framed fields. The two option tags distinguish running, exhausted and meeting; event data never duplicate or reframe the completed log.

                    Instances For

                      Original roots, retaining first positional occurrence order.

                      Instances For

                        Used positional records in the source log's order.

                        Instances For

                          Discovered variables in the source log's order.

                          Instances For

                            Root/discovery membership, including children already inserted at the current copy.

                            Instances For

                              First actual parent output's original constraint position; timestamps are irrelevant here.

                              Instances For

                                Follow parents through older records, computing just the root of the actual ancestry walk.

                                Instances For

                                  Feasible same-constraint, distinct-variable partners in actual incidence order. The validity check is global, including on invalid inputs and malformed explicit relation tables.

                                  Instances For

                                    One scan step. A meeting freezes both ordered children and the first meeting output.

                                    Instances For

                                      Scan actual partners using a finite left fold.

                                      Instances For

                                        One outer step. Noncanonical external states whose chosen port is not an actual occurrence stop immediately; this guard gives uniform growth on every state, without scanning its index.

                                        Instances For

                                          Convert a work expansion's positional records into binary global occurrence positions.

                                          Instances For

                                            Finalize once, after the loop. Classification uses roots of the actual older ancestries.

                                            Instances For

                                              Total native forest search. Exactly the actual occurrence width is accepted. The outer clock is one more than the actual occurrence count, so the final exhaustion check is paid for.

                                              Instances For

                                                Reject either short or long occurrence buffers.