java.lang.Object
com.darkcollective.relix.provenance.Semirings

public final class Semirings extends Object
Resolves a Semiring by name — the lookup the surfacing layer uses to turn a --provenance=<name> request into a concrete semiring without the caller hard-wiring the singletons.

It answers from SemiringCatalog.installed(), so the names it resolves are the bundled six plus every semiring an installed SemiringLibrary offers. Names are case-insensitive, and each bundled semiring carries a friendly alias: set → boolean, bag/natural → counting, shortest-path → tropical, lattice → security, polynomial/why → lineage, best-path → cheapest-route.

Use SemiringCatalog directly to read a semiring's description, to assemble a catalog of your own, or to re-run discovery.

  • Method Details

    • byName

      public static Optional<Semiring<?>> byName(String name)
      Resolves an installed semiring by (case-insensitive) name or alias.
      Parameters:
      name - the semiring name or alias; may be null
      Returns:
      the matching semiring, or empty if name is null or unknown
    • names

      public static List<String> names()
      Returns the canonical names of every installed semiring. Aliases are omitted; this is the list to show in help and error messages.
      Returns:
      the canonical names of every installed semiring