-
Notifications
You must be signed in to change notification settings - Fork 11
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
Pab/devel - conditional exports #90
Merged
Conversation
This file contains 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
This was for older versions of axiom; I don't think it makes a massive amount of sense to retain support for these, especially as the hashcode calculation has changed. Simplifies the code slightly too.
negations. Add test case Plus a formatter for DNFs for easier debugging.
…est. Use in ablogic.. This way, conditions like prime?(p) will be matched with prime?(p)$F Add confirming assertion in sefo.c, and some tests.
…anoid and check during initialisation.
This way, a change in Makefile.am (usually a new test) will filter into Tests.am. And so the test will run next build.
…rrect. Basically, it is looking for S has with { coerce: I -> S }. This should be I -> %, as it is the form actually exported.
…into tiGetTopLevelTForm. tiSefo is less heavyweight when determining the type of an expression.
When we compile an expression like 'A has with f: %', a reference to % on the 'with' expression wasn't being copied over across files. So, now we save it off in the semantics part of the abstract syntax, and ensure it reappears when the tform for the expression is being computed.
Things like 'foo has with { f: A -> B }' should work just fine. Turns out we were getting this really wrong. So, test it, and we'll know if it's all good.
When matching 'add' bodies against context, look at implicit symes before conditions. Otherwise implicit symes that have conditions will not be properly matched.
Code that flattens AB_And in a condition (eg. A has B and A as X) was flat out wrong, discarding most if not all of the actual condition. Fix it.
To be used when gathering conditions from syntax
identifier is defined onto the symbol.
…ting point field.
non-GcdDomain arguments. Not entirely sure what the right thing to do is here. All ideas welcomed.
depend only on CommutativeRing, not GcdDoman. So, tweak.
…at as well as the symbol being defined, it is defined in contexts matching the condition on the export. So: A category like 'with {if A then { b: % }} should not be matched by 'add { if X then { b: % }}', unless A implies X. Replace 'A' with Ring and 'X' with Field to get the idea.
Add more complex error printer for partially implemented exports.
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.
Lots of stuff here, largely fallout from noticing that A(T: with): with { x: % } == add { if A has B then x: % == ... }
was accepted when it shouldn't be.
Along the way also fixed:
This does not yet completely fix #87, but gets close.