Skip to content

findall-variation to better support setof/3 #3227

@UWN

Description

@UWN

The built-in findall/3 is used to implement setof/3 incurring a lot of unnecessary overheads

  1. Duplicate leaf answers are not detected
  2. The precise order of answers is not required, they will be sorted anyway
  3. Identical ground subterms between leaf answers are not shared
  4. Non-ground subterms between leaf answers that are variants of each other and that will become identical directly after findall/3 are not shared

Hashing may now be possible (1 and 2).

Ideally, also hashing of all identical ground subterms (3).

All of this would be for the benefit of setof/3 and (to a lesser degree) of bagof/3. (#3211)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions