Skip to content

New IDE support#109

Merged
Aurel300 merged 123 commits into
Aurel300:rewrite-2023from
zgrannan:zgrannan/ide
Nov 3, 2025
Merged

New IDE support#109
Aurel300 merged 123 commits into
Aurel300:rewrite-2023from
zgrannan:zgrannan/ide

Conversation

@zgrannan
Copy link
Copy Markdown

@zgrannan zgrannan commented Oct 6, 2025

Updates to support the Prusti Assistant IDE (Prusti Assistant PR: viperproject/prusti-assistant#264)

This work includes the changes made in #57 and also:

  1. Updates CI to create artifacts for Windows (Arm, x64), MacOS (Arm), and Linux (x64)
  2. Adds an extern spec to panic! so that assertions are treated properly
  3. Adds more error backtranslations

Note that (2) is necessary to ensure that the Prusti Assistant tests pass. However, this change also causes seven test cases in this repository to fail: namely, there were some tests that previously passed only because they did not report errors for assertions.

Six of the seven cases failed because they involve body_invariant which is not yet handled. The remaining test case is related to type-conditional spec refinement, which, I believe, is also not yet handled.

trktby and others added 30 commits June 3, 2024 13:16
Also comment out a line that crashes when not run from the same
directory. This was problematic for working with Prusti Assistant.
Port basic functionality for the new prusti-server work flow according
to PR viperproject/prusti-dev#1334 .
Querying signatures, spans of call contract collection and call finding
does not work yet.
PR: viperproject/prusti-dev#1334
Defpath only verification does not work since test_entrypoint currently
just puts the entire program into the request regardless of the
verification tasks at hand.
Update the flags in the documentation.
PR: viperproject/prusti-dev#1334
Requires the viperserver backend to support these messages too.
Every body owner function that is not passed to be verified explicitly
acts as though it were pure and trusted to skip the encoding of their
bodies.
Additionally, VERIFY_ONLY_DEFPATH now takes a vector of String instead
of just a string.
`SpanOfCallContracts` now has a vector as it's `call_spans` field so
only one object is created per function definition rather than one per
call.
`CallSpanFinder` now also collects local functions for call contract
span emission. Functions that are never called need not be emitted.
A main goal here is that the vir-viper translation happens on the same
thread that encodes the program in the local verification case. This
should happen so the allocated arena, which is thread local, can be
used.
Additionally, the JVM reliant bits are a bit more hidden from the
general procedure.
* Impure generics

* Fixed bug due to type parameters not being encoded

* Remove fractional perm

* mk_bool doesn't need extra typarams
* domain fields don't need a full encoding of their type yet

* type alias for do_encode_full result

* parameterise TaskEncoderDependencies by the owning encoder

* remove some dependency unwraps

* remove 'tcx lifetime, use 'vir

* check for cycles when requesting dependencies or emitting output ref

* add try operators for some emit output refs
Move backtranslation to where server messages are processed.
Move `EncodingInfo` to encoder crate.
- The viper program is now sent using a `GlobalRef`, so it actually
compiles.
- Cache usage no longer involves the `VerificationRequestProcessing`
object.
- The cache is now lazy, therefore only loads if the `ENABLE_CACHE` flag
  is set.
- The `VerificationRequestProcessing` object is no longer constructed
  when all the requests are cache hits. The thread it holds is also not
spawned as a result.
@zgrannan zgrannan marked this pull request as ready for review October 24, 2025 18:52
@zgrannan zgrannan changed the title [WIP] New IDE support New IDE support Oct 24, 2025
Comment thread .github/workflows/deploy.yml
@@ -1,3 +1,5 @@
use prusti_contracts::*;
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I guess we need this to import the extern spec for panic!? This is not great...

@Aurel300 Aurel300 merged commit 04fd56b into Aurel300:rewrite-2023 Nov 3, 2025
5 of 7 checks passed
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.

4 participants