-
Notifications
You must be signed in to change notification settings - Fork 66
Disallow unbound type variables #783
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
Conversation
…epting terms in BoolTermFormula
… somewhat, but needs more testing
…n tuple elements (it does not fully work for booleans yet)
|
I got the following "new" proof after some tuple related crash disappeared, but according to TPTP the problem is satisfiable. Maybe it would be good to look into this if we really merge the PR. |
|
Having a quick look at
It's a bit hidden behind the tuple mess, but |
Yes, special terms have an extra opening parenthesis because otherwise the initial special arguments wouldn't be separated from the functor by any parenthesis. This (and other problems, for example with tuples) could be solved e.g. by separating the logic for parentheses (or brackets, etc.), similarly as we separate outputting the header with |
I think the proof looks relatively straightforward, so I wouldn't worry about unsoundness here either. I can write Geoff an email. |
MichaelRawson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice, we get rid of some evil SpecialTerms and fix the $let-binding properly. I trust you got all the miscellaneous changes in the rest of Vampire right, and the core changes look good to me.
Phew, I thought I messed something up. |
|
Yeah, sorry - I wish it gave more informative e-mail when it's cancelled rather than failed. Gotta save those cycles. |
The original intention of the PR was to fix #744, but I started with the assumption that we should disallow unbound type variables in all places. For example, we wouldn't allow an operator type of e.g. a function
fto be!>[X0: $tType]:((map(X0,X1) * X0) > X1)but only!>[X0: $tType, X1: $tType]:((map(X0,X1) * X0) > X1)where all variables inside the type are prenex quantified.I think this check would be reasonable to merge since unbound type variables of terms make the type variables fixed such that from then on those variables cannot be changed anywhere and
X1cannot be used for anything else in any formula/clause wherefis present.Then, to make this work I got to refactoring
letbinders which resulted in a big amounts of code refactored and removed. Not sure if all paths are covered, but this is a relatively stable iteration.There may be also other theories/operators that needs "polymorphization" like arrays, but I will also leave those for the future.