GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support external library contracts in Latte and LiquidTypeChecking by alcides · Pull Request #35 · liquid-java/latte

Conversation

@alcides

@alcides alcides commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

External library specifications were previously rejected as unsupported. This change lets application code refine JDK and third-party library methods, constructors and fields through @ExternalRefinementsFor, using the same contracts in Latte and LiquidTypeChecking. For example, an ArrayList transition through a local alias is visible when checking the original variable's size.

  • Resolve and validate Java signatures, overloads, inherited members and field types in a per-model registry stored on Spoon's AST. Placeholder bodies and field initializers do not become implementation facts.
  • Apply ownership contracts to external parameters and results, including constructor parameters. Preserve shared-object rejection, borrowed mutation effects and consumption of all caller aliases on @Free transfers.
  • Check parameter/result refinements, state transitions and state sets. Include external calls and constructor effects in loop analysis, and retain conservative global and unknown-call effects.
  • Add CLI/API classpath support and analyze separate specification/application paths together. A test builds a library JAR and verifies both API and CLI use without initializing the library.
  • Add checked examples, an external-specification guide, 42 focused tests and 15 promoted upstream inputs. All 410 imported fixture sources remain unchanged.

Validation: mvn -B spotless:apply clean verify -Pcompatibility passes with 522 tests, zero failures/errors, and 180/311 exact upstream matches (previously 165), with zero analysis crashes. The compatibility gate still checks every imported input and rejects newly accepted negative cases.

Library specifications are trusted contracts. Container-size specifications do not infer element ownership or return aliases. Expanded varargs calls require explicit arrays; varargs method references require an explicit-array lambda. These boundaries are documented and unsupported adapters are diagnosed explicitly.

This PR is stacked on feat/latte-liquid-typechecking, whose completed implementation was pushed as 1eb2448. Its diff contains only external-library support and related integration fixes. CI also runs for PRs targeting that base.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@alcides
Support external Java library contracts in Latte and LiquidTypeChecking
89ded1e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@alcides
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.