Skip to content

Conversation

@mattulbrich
Copy link
Member

@mattulbrich mattulbrich commented Sep 8, 2025

Related Issue

For quite some time, we have a prototype for JML proof scripts which we finally want to bring to the mater branch.

Intended Change

Proof scripts can be written into JML comments and can be obeyed during automatic verification.
The major benefit is that the localisation of the proof node to which a proof script should be applied is natural.
The other benefit is that one can use JML expressions and thus does not have to leave the realm of JML to do script-guided proofs.

This relies on #3587 and needs #3654 merged.

Plan

  • Refine the syntax
  • Adapt lexer and parser
  • Reimport the implementation that was available on an older branch
  • Make it more convenient
  • Add examples
  • Code cleanup
  • Document the changes

Type of pull request

  • New feature (non-breaking change which adds functionality)
  • There are changes to the (Java) code
  • There are changes to the taclet rule base (possibly small adaptations)

Ensuring quality

WIP:

  • I made sure that introduced/changed code is well documented (javadoc and inline comments). ✔️
  • I made sure that new/changed end-user features are well documented (https://github.com/KeYProject/key-docs). ✔️
  • I added new test case(s) for new functionality. ✔️
  • I have tested the feature as follows: ... examples and test cases
  • I have checked that runtime performance has not deteriorated. not for non-script proofs.

Additional information and contact(s)

Planned to be done Mid 09/25

The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.

(cherry-picked from earlier attempt to implement JML proof scripts)

# Conflicts:
#	key.core/src/main/java/de/uka/ilkd/key/java/Recoder2KeYConverter.java
#	key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JMLTransformer.java
#	key.core/src/main/java/de/uka/ilkd/key/java/recoderext/JmlAssert.java
#	key.core/src/main/java/de/uka/ilkd/key/java/statement/JmlAssert.java
#	key.core/src/main/java/de/uka/ilkd/key/speclang/jml/pretranslation/TextualJMLAssertStatement.java
#	key.core/src/main/java/de/uka/ilkd/key/speclang/njml/TextualTranslator.java
…aDL arguments)

(cherry-picked from earlier attempt to implement JML proof scripts)
(cherry-picked from earlier attempt to implement JML proof scripts)
# Conflicts:
#	key.core/src/main/java/de/uka/ilkd/key/logic/Semisequent.java
#	key.core/src/main/java/de/uka/ilkd/key/scripts/RuleCommand.java
#	key.core/src/main/java/de/uka/ilkd/key/scripts/SetCommand.java
#	key.core/src/main/java/de/uka/ilkd/key/strategy/StrategyProperties.java
(cherry-picked from earlier attempt to implement JML proof scripts)
(cherry-picked from earlier attempt to implement JML proof scripts)

# Conflicts:
#	key.core/src/main/java/de/uka/ilkd/key/macros/ApplyScriptsMacro.java
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

❌ Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.14%. Comparing base (28025d8) to head (ec5929d).
⚠️ Report is 33 commits behind head on main.

Files with missing lines Patch % Lines
...src/main/java/org/key_project/logic/PosInTerm.java 0.00% 13 Missing ⚠️
...rc/main/java/org/key_project/util/java/IOUtil.java 0.00% 11 Missing ⚠️
.../org/key_project/util/collection/ImmutableSet.java 0.00% 5 Missing ⚠️
...ain/java/org/key_project/util/java/StringUtil.java 0.00% 5 Missing ⚠️
...org/key_project/util/collection/ImmutableList.java 0.00% 3 Missing ⚠️
...in/java/org/key_project/util/java/IntegerUtil.java 0.00% 3 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (28025d8) and HEAD (ec5929d). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (28025d8) HEAD (ec5929d)
14 10
Additional details and impacted files
@@              Coverage Diff              @@
##               main    #3657       +/-   ##
=============================================
- Coverage     47.16%   37.14%   -10.03%     
+ Complexity    15801      760    -15041     
=============================================
  Files          1673      129     -1544     
  Lines         96171     5689    -90482     
  Branches      15397      898    -14499     
=============================================
- Hits          45359     2113    -43246     
+ Misses        45641     3387    -42254     
+ Partials       5171      189     -4982     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wadoon wadoon self-requested a review September 8, 2025 23:22
@wadoon wadoon added this to the v2.12.4 milestone Sep 8, 2025
@wadoon
Copy link
Member

wadoon commented Sep 9, 2025

I have written an integer split command.

An induction command is on the way with support for int, user-data types, bsum(?).

Commit: 4644331

…her goals, print position

manual cherry-pick

From 547ce29 Mon Sep 17 00:00:00 2001
From: Julian Wiesler <wiesleju@gmail.com>
Date: Wed, 22 Feb 2023 13:57:21 +0100
Subject: [PATCH] Position info for scripts with url=null, run scripted goals
 before other goals, print position information
…o since it splits a lot better

# Conflicts:
#	key.core/src/main/java/de/uka/ilkd/key/macros/ApplyScriptsMacro.java
manual cherry-picking

commit 886588a
Author: Mattias Ulbrich <ulbrich@kit.edu>
Date:   Sun Feb 5 13:14:29 2023 +0100
manually cherry-picked from old branch
@mattulbrich mattulbrich marked this pull request as ready for review October 11, 2025 00:11
@mattulbrich mattulbrich added the Review Request Waiting for review label Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants