Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port LiquidFixpoint's FQ ("new-format") tests #363

Merged
merged 28 commits into from
Oct 18, 2024
Merged

Port LiquidFixpoint's FQ ("new-format") tests #363

merged 28 commits into from
Oct 18, 2024

Conversation

shingarov
Copy link
Owner

The "chain of tests" (as explained in the "Towards a Dynabook…" paper) follows the structure of the processing pipeline, i.e., for MachineArithmetic in particular,

SpriteLang → Horn → SMT,

meaning we have 6 kinds of tests. However, if we zoom in, we shall see an intermediate processing stage:

SpriteLang → Horn → FInfo → SMT.

In March 2024, the upstream LiquidFixpoint switched to "new format" tests (e.g. tests/pos/*.fq) where FInfos are spelled out explicitly. This PR ports these "new-format" capability to MA. This is important because much of essential functionality is covered by the "new-format" tests but not the Horn tests.

@shingarov shingarov force-pushed the fq-parser branch 2 times, most recently from 150cd2c to 05de807 Compare October 16, 2024 10:20
@shingarov shingarov closed this Oct 17, 2024
@shingarov shingarov reopened this Oct 17, 2024
@shingarov shingarov force-pushed the fq-parser branch 3 times, most recently from 9172dc3 to 8f68418 Compare October 18, 2024 13:47
It's not recursive, either, so no need for Delegate.
Tok isn't recursive, either, so no need for Delegate.
On the other hand, matchedParen is more generally useful than
just in the context of Fixpoint so it might make sense to have
it somewhere higher, but I don't feel good about adding an inst
var (to which class def, really?)
shingarov added a commit that referenced this pull request Oct 18, 2024
The initial objective of this work has been to factor common (non-Horn)
elements ouf of NNFParser to FixpointParser (so that the latter would
serve as a common superclass for NNFParser and FQParser, see #363).
As the work progressed, two other defects became evident: nomenclature
inconsistent with LiquidFixpoint, and the use of (extremely broken)
matchedParen even though we already have RefinementExpressionParser.
This commit addresses all three issues.

This is a combination of 23 commits:
Introduce FixpointParser which will serve as the common superclass of NNFParser/FQParser
Pull 'fixpoint' up to FixpointParser
Pull matchedParen and tok up to FixpointParser
Pull lowerId, upperId up to FixpointParser class
Consistently name hThing
Place parens in symSort (not its senders) for consistency with LF
Use naming for hCstr consistent with LF
Inline cstrAnd for consistency with LF
Parenthesize hBind consistently with LF
Inline #forall, #exists for consistency with LF
[cosmetic] Add "tag" TODO
Use naming for hCstr consistent with LF
Use naming for hPred consistent with LF
Inline predAnd for consistency with LF
Inline kappaApp, use kvSym for consistency with LF
Clear up confusion between pred, hPred and decidablePred
Inline #constant for consistency with LF
Rename qualif to hQualifier for consistency and to avoid confusion with F.qualifierP
Inline #constraint for consistency with LF
Rename var to hVar for consistency with LF
Pull common (i.e. non-Horn) elements from NNFParser to FixpointParser
Remove #matchedParen in favor of consistent use of RefinementExpressionParser
Route uses of RefinementExpressionParser through DecidableRefinement
@shingarov shingarov mentioned this pull request Oct 18, 2024
@shingarov shingarov merged commit 982c873 into pure-z3 Oct 18, 2024
3 checks passed
@shingarov shingarov deleted the fq-parser branch October 18, 2024 19:47
shingarov added a commit that referenced this pull request Oct 18, 2024
The initial objective of this work has been to factor common (non-Horn)
elements ouf of NNFParser to FixpointParser (so that the latter would
serve as a common superclass for NNFParser and FQParser, see #363).
As the work progressed, two other defects became evident: nomenclature
inconsistent with LiquidFixpoint, and the use of (extremely broken)
matchedParen even though we already have RefinementExpressionParser.
This commit addresses all three issues.

This is a combination of 23 commits:
Introduce FixpointParser which will serve as the common superclass of NNFParser/FQParser
Pull 'fixpoint' up to FixpointParser
Pull matchedParen and tok up to FixpointParser
Pull lowerId, upperId up to FixpointParser class
Consistently name hThing
Place parens in symSort (not its senders) for consistency with LF
Use naming for hCstr consistent with LF
Inline cstrAnd for consistency with LF
Parenthesize hBind consistently with LF
Inline #forall, #exists for consistency with LF
[cosmetic] Add "tag" TODO
Use naming for hCstr consistent with LF
Use naming for hPred consistent with LF
Inline predAnd for consistency with LF
Inline kappaApp, use kvSym for consistency with LF
Clear up confusion between pred, hPred and decidablePred
Inline #constant for consistency with LF
Rename qualif to hQualifier for consistency and to avoid confusion with F.qualifierP
Inline #constraint for consistency with LF
Rename var to hVar for consistency with LF
Pull common (i.e. non-Horn) elements from NNFParser to FixpointParser
Remove #matchedParen in favor of consistent use of RefinementExpressionParser
Route uses of RefinementExpressionParser through DecidableRefinement
@shingarov shingarov restored the fq-parser branch October 18, 2024 19:50
@shingarov
Copy link
Owner Author

Contrary to how GitHub shows it, this PR is NOT merged; it's a zombie in an inconsistent state, so we create #368 instead.

shingarov added a commit that referenced this pull request Oct 28, 2024
The initial objective of this work has been to factor common (non-Horn)
elements ouf of NNFParser to FixpointParser (so that the latter would
serve as a common superclass for NNFParser and FQParser, see #363).
As the work progressed, two other defects became evident: nomenclature
inconsistent with LiquidFixpoint, and the use of (extremely broken)
matchedParen even though we already have RefinementExpressionParser.
This commit addresses all three issues.

This is a combination of 23 commits:
Introduce FixpointParser which will serve as the common superclass of NNFParser/FQParser
Pull 'fixpoint' up to FixpointParser
Pull matchedParen and tok up to FixpointParser
Pull lowerId, upperId up to FixpointParser class
Consistently name hThing
Place parens in symSort (not its senders) for consistency with LF
Use naming for hCstr consistent with LF
Inline cstrAnd for consistency with LF
Parenthesize hBind consistently with LF
Inline #forall, #exists for consistency with LF
[cosmetic] Add "tag" TODO
Use naming for hCstr consistent with LF
Use naming for hPred consistent with LF
Inline predAnd for consistency with LF
Inline kappaApp, use kvSym for consistency with LF
Clear up confusion between pred, hPred and decidablePred
Inline #constant for consistency with LF
Rename qualif to hQualifier for consistency and to avoid confusion with F.qualifierP
Inline #constraint for consistency with LF
Rename var to hVar for consistency with LF
Pull common (i.e. non-Horn) elements from NNFParser to FixpointParser
Remove #matchedParen in favor of consistent use of RefinementExpressionParser
Route uses of RefinementExpressionParser through DecidableRefinement
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.

1 participant