Fix syntax error on Rocq output by using a better printing system#59
Open
jrosain wants to merge 15 commits intoGoelandProver:masterfrom
Open
Fix syntax error on Rocq output by using a better printing system#59jrosain wants to merge 15 commits intoGoelandProver:masterfrom
jrosain wants to merge 15 commits intoGoelandProver:masterfrom
Conversation
67efaf7 to
8567f3c
Compare
8567f3c to
9924ece
Compare
9924ece to
3ac8373
Compare
d07aec8 to
e6006eb
Compare
e6006eb to
8b1f120
Compare
Member
|
The following problems produces an error when trying to export the
|
Member
Author
This is actually a bug introduced by #46, but nice catch! |
* non destructive search **does not** manage typed search, only destructive search does * dmt might be incompatible with typed search
8b1f120 to
6d8ef73
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug fix
Closes: #52
Description
In this PR, I got rid of the non-understandable gibberish that was
MappableString(and besides, that was not mappable) and replaced it with a modular & composablePrintersystem.A
Printertakes aPrinterConnectives(that specify how to print all possible connectives) that always has a fallback on a specifiedPrinterConnective(or, if unspecified, the default one). It means that aPrinterConnectivecan avoid defining all the connectives, and only the ones that are relevant to it.A
Printeris also composed of aPrinterAction, that defines a bunch of functions, one that is always called for every string it returns, one that is called for IDs, for bound variables, for meta variables and for types. In particular, it makes it possible to define general-purposePrinterActionand compose it through others actions. I've added thePrinterActionthat gets rid of irrelevant parentheses. I've also gotten rid of the printing of ids by default (because aPrinterActionis additive and not subtractive: it's difficult to undo something already done like printing unique indices of ids). I've still left the option with-print-id. Anyway, I think it's better this way. I've also defined thePrettyPrinterand the printer action that quotes functional names if needed.I've also reworked Rocq's printer so that it gets rid of unwanted characters (like the
@in skolem symbols) and replaces defined constants with$...to the value we want them to have in Rocq. I've integrated Rocq compilation inside the test-suite workflow: an eligible problem gets its proof compiled in Rocq. By eligible, I mean every problem that returns valid and doesn't already outputs something. Some problems got in theno_chkfolder (/bugs_no_chk) because the proof wasn't compiling (see #56).Typed proofs are not available through GS3, so I've designed a test but put it in the
bugs_no_chkfor now but it should be moved later.I'm also pretty sure I've broken Lambdapi's output but this is work for another PR.
PR dependencies
-ocoqand modernize presearch information messages #51Test-suite update
bugs/bug_52-1.pwhich is the original bug file of Syntax error in Rocq output due to illegal character in skolem symbols / types #52.bugs_no_chk/bug_52-2.pwhich has type informations.bugs/bug_52-3.pwhich tests for the presence of meta variables in the proof.proofs/files (less parentheses + small changes on the printing of skolemized terms).I've also updated the
run-test-suitefile torocq compilethe proofs and to make its output clearer, and updated the CI script that runs the test suite to install Rocq.