Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
When you try to import a smalltalk model and select a another strategy than the default one, you get some errors
Comment #1 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I fixed bugs that came from Famix. Now there seems to be some issues from RoelTyper (When I try to import a big model). For example :
TypeCollector class >> typeInstvar:ofClassWithLookup: "self typeInstvar: #origin ofClassWithLookup: Quadrangle" | theClass | theClass := aClass. [theClass isNil not and: [(theClass instVarNames includes: var) not]] whileTrue: [theClass := theClass superclass]. theClass isNil ifTrue: [^ ExtractedType new]. ^ self typeInstvar: var ofClass: theClass
If it does not find the instance variable, it returns 'ExtractedType new' , whereas ExtractedType is an abstract class and should not implement 'new'
Comment #2 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
The importer now check that a FAMIXVariable is an instance variable before asking roeltyper to cpmpute its type. Avoid to end up in the case where roeltyper does not find the variable.
There is now another problem: If you try to import all 'Morphic' packages in moose, and select 'compute for any kind of receiver', it raise an error
Updates: Labels: Component-SmalltalkImporter Milestone-4.4
Comment #3 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Please do not forget to write tests for these cases.
Comment #4 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
It would be good to get this nicely working. Cyrille, do you have time to look into this?
Comment #5 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I gave a solution that make the example working, but I didn't fixed the problem. I flaged the possible bug. Added an example to run (as comment) to highlight the problem. I added a statement for this specific case, where I return self (not able to fix anything).
From moose point of view, it seems to work nicely. I think we just let roelTyper less precise for those specific cases (that means a set of possible types bigger than if the code was running correctly).
Updates: Cc: cy.delau...@gmail.com
Comment #6 on issue 586 by jannik.l...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Cyrille can you be more precise ? where is the flag ? the example ? the statement ?
We should fix the bug !!
Comment #7 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
All is in TypeCollector >> handleAssignment:forTmp: I think it's a roel typer issue
Comment #8 on issue 586 by jannik.l...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Ok thank you. If it is, could you contact the developer ?
Comment #9 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I asked this question on the Pharo mailing list, but I got no answers. The RoelTyper issues can be reproduced on several classes. To see the classes that raise it and the corresponding errors, you can run:
classes := Dictionary new. Object withAllSubclassesDo: [:each | [(TypeCollector typeInstvarsOfClass: each )] on: Error do: [:error | classes at: each put: error ]]. classes inspect
Comment #10 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Any chance someone could look at this one?
I will have a look at it tomorrow.
Alexandre
On 8 May 2011, at 17:18, moose-technology@googlecode.com wrote:
Comment #10 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Any chance someone could look at this one?
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Comment #11 on issue 586 by jannik.l...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I tried, but no result. I do not know where to begin, as I do not know RoelTyper
Comment #12 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
There is still the version RoelTyper-cyrilledelaunay.83 in www.squeaksource.com/RoelTyper that does not concretly fix the problem, but just skip the problematic cases.
Comment #13 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I tried to use RoelTyper-cyrilledelaunay.83 but it does not work. Try:
- Load the last RoelTyper-cyrilledelaunay.83 - Import AST-Core - Check the RoelTyper inference
and you will get an error.
Comment #14 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Issue 626 has been merged into this issue.
Updates: Cc: stephane...@gmail.com jannik.l...@gmail.com
Comment #15 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Cyrille, could you take a look at this?
Comment #16 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
What do you mean by 'check the roelTyper inference' ? What I do is: - Load the last RoelTyper-cyrilledelaunay.83 - Import AST-Core using 'compute for any kind of receiver'
And the model is well imported without error. From that point, what should I do to get the error ?
Comment #17 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I meant to check the "Compute type of attributes (using RoelTyper)" checkbox.
You will get the error also with the RoelTyper-cyrilledelaunay.83.
Comment #18 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I added a test:
MooseSmalltalkImporterRoelTyperTest>>#testASTCore
Name: Moose-Tests-SmalltalkImporter-Core-TudorGirba.23 Author: TudorGirba Time: 13 May 2011, 10:34:20 am UUID: aa6c3196-3946-45c9-8e9d-260fa3ea89be Ancestors: Moose-Tests-SmalltalkImporter-Core-janniklaval.22
added test to expose the roel typer problem when computing types of attributes
Comment #19 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
indeed :)
Comment #20 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Like previous time, I was just able to implement something that skip the problem. RoelTyper-cyrilledelaunay.84. If the collection is empty, it returns. This make the test pass
Updates: Status: Fixed
Comment #21 on issue 586 by tudor.gi...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Thanks. It looks like the issue is fixed and it does not throw errors anymore. We do not know about the correctness anymore.
One problem we have to look for is that the fix was done in RoelTyper, and thus it can have other repercussions in the Pharo-world.
Comment #22 on issue 586 by stephane...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
Cyrille can you explain what was the problem?
Comment #23 on issue 586 by cy.delau...@gmail.com: Compute invocation candidates with different strategies seems to be broken http://code.google.com/p/moose-technology/issues/detail?id=586
I don't know what is the problem, I just put a '^self' when encountering problematic case (the empty collection). Like my previous change , I think it does not break anything, but just let RoelTyper less precise for some cases (that are not working)