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

Generalize PAtomEq to PAtom #370

Closed
wants to merge 11 commits into from
Closed

Generalize PAtomEq to PAtom #370

wants to merge 11 commits into from

Conversation

shingarov
Copy link
Owner

No description provided.

Thus, the keyword #smt2: is gone in favor of unary #smt2.
This has the advantage that we don't have to lug the SymEnv as
argument to unFApp, z3sort etc.
A "bind" ties a name to a (refined) type.
Liquid-Fixpoint has two grammars for tests, the "Horn format"
and the "new format".  In the Horn format we write something like
```  (forall ((x int) (x>0)) ... )
and the above parses to an H.All over H.Bind, see `hBindP` in `Horn/Parse.hs`.
The "new format" for the same bind would be
```  {x: int | x > 0 }
see top-level `Parse.hs`.

Until today, we got away with simply calling them "bind" because we only
deal with the Horn format now, but introducing the "new format" leads to
confusion between the two; this commit renames those binds which mean hBind.
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
Copy link
Owner Author

Subsumed in #381.

@shingarov shingarov closed this Oct 29, 2024
@shingarov shingarov deleted the generalize-patom-eq branch October 29, 2024 15:15
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