Skip to content

Preserve predicate wildcard calls when splitting Podlang predicates - #543

Open
robknight wants to merge 4 commits into
stack/podlang-parse-validationfrom
stack/podlang-predicate-splitting
Open

Preserve predicate wildcard calls when splitting Podlang predicates#543
robknight wants to merge 4 commits into
stack/podlang-parse-validationfrom
stack/podlang-predicate-splitting

Conversation

@robknight

Copy link
Copy Markdown
Collaborator

This PR fixes the handling of higher-order calls such as P(A) when a Podlang predicate is split into multiple predicates.

Previously, wildcard calls were parsed as ordinary local predicate references and inferred from their names during lowering. That became ambiguous after splitting introduced generated continuation predicates. Predicate-position uses were also missing from the splitter's wildcard dependency graph, so a split piece could fail to declare or promote the predicate-valued wildcard it used.

This change:

  • tags validated higher-order calls explicitly as wildcard references
  • tags generated continuation calls separately from source-level predicate references
  • resolves these reference kinds directly during lowering instead of inferring them from names
  • chooses continuation names that do not collide with source predicate names
  • counts predicate-position wildcard uses during chain and tree splitting
  • carries predicate-valued wildcards between split pieces when required

The change includes splitter, lowering, and end-to-end regression coverage for unconstrained predicate wildcards, generated-name collisions, and both chain and tree splits.


Stack created with GitHub Stacks CLIGive Feedback 💬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant