Skip to content

Conversation

@aqjune-aws
Copy link
Contributor

@aqjune-aws aqjune-aws commented Oct 31, 2025

This patch adds

  1. A translator from SMT.Term -> SMTDDM.Term as well as
  2. A string converter from SMTDDM.Term -> String
  3. Hooks the converter to SMT/DL/Encoder.lean, only when it is encoding a primitive term (as a small-step start!)
  4. Adds the get-option SMT command and relevant syntax categories (mentioned in the previous pull request).
  5. Slightly changes the .real constructor of the old SMT Term, from String to Decimal.

After 3, I checked the generated .smt2 files at vcs/ dir, and confirmed that they are equivalent modulo spaces! :)

There are a few features in the string converters that are unimplemented; they will be added later when Encoder.lean uses the DDM string converter more.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This patch adds a translator from SMT.Term to SMTDDM.Term, and also has a
small code snippet that prints the SMTDDM.Term into the format.

There are missing features, which will be addressed in the following commits.

- Whitespaces must exist between the printed subterms(!)
- Option types, triggers, real-number/bit-vector constants are left as unimplemented.
@aqjune-aws aqjune-aws marked this pull request as ready for review November 6, 2025 20:42
joscoh
joscoh previously approved these changes Jan 6, 2026
@aqjune-aws aqjune-aws dismissed stale reviews from joscoh and shigoel via 9e5751d January 6, 2026 15:51
joscoh
joscoh previously approved these changes Jan 8, 2026
MikaelMayer
MikaelMayer previously approved these changes Jan 8, 2026
Copy link
Contributor

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

I feel like we will really need sooner or later SpaceSepBy in the DDM but otherwise this is good for now.

@aqjune-aws aqjune-aws enabled auto-merge January 8, 2026 15:57
joehendrix
joehendrix previously approved these changes Jan 8, 2026
shigoel
shigoel previously approved these changes Jan 8, 2026
@MikaelMayer MikaelMayer dismissed stale reviews from joehendrix, shigoel, joscoh, and themself via e9e5fa1 January 9, 2026 19:56
@aqjune-aws aqjune-aws added this pull request to the merge queue Jan 9, 2026
Merged via the queue into main with commit 4251492 Jan 9, 2026
11 checks passed
@aqjune-aws aqjune-aws deleted the jlee/smt2 branch January 9, 2026 21:09
@aqjune-aws
Copy link
Contributor Author

Thank you all! :)

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.

6 participants