Comments (14)
description of the issue?
Not clear what is meant
from famix.
This was to reify type declarations as associations
from famix.
Ah yes. Reification is needed. But creating an object for this could be costly in memory.
In the old query system, the queries created "fake reification" on the fly.
This could be a better solution ?
from famix.
The problem is that the MM does not know about this dependencies and we have to introduce a lot of hack in the query system of Moose in order to be able to query those relations. I don't think the memory we save is worth the extra complexity it brings.
from famix.
from famix.
Since they are not reified as an association, the meta description does not know it is an association, there is no 'source' or 'target' and thus we need to search for them by hand, add them to the query results etc.. This makes the code of Moose Query more complexe and we cannot do everything we can do with other associations with type declarations since they are not reified.
from famix.
Another example of a problem caused by the fact that it is not reified is that it will not be possible to create navigation queries on them with the query model Clotilde is doing.
from famix.
I know we can have hacks etc.
But it is a bad idea because it will certainly introduce bugs.
So reify type declaration looks like a good idea for me too.
Sometimes it is interesting to not use association, but we have to be sure at 100% that we will not need them with Moose Query.
IMO it is only for users models and not the one we proposed.
from famix.
from famix.
May be we can do it without reifying the dependence and without creating a hack to?
We decide that dependence is a strong "property"that we want to be able to always compute.
(seems a reasonable assumption to me)
We create "marker"of relations (in the sense of FamixMetamodelGenerator>>defineRelations) that create depedencies.
e.g. (tTypedEntity property: #declaredType) isDependency
(note that all properties are not dependencies even if they have opposite entities, e.g. comment
are sourceAnchor
are not)
then we change queryOutgoingDependencies to collect all these relations.
The from
is the entity having the relation, and to
is the entity in the property.
That would solve moosetechnology/Moose#2303 and moosetechnology/Moose#2304 also
from famix.
Note: this could imply
- either generalizing MooseQueryTypeDeclarationAssociation which is specific to the
declaredType
property - or removing it because we would allow non associations to deal with the
isSource
/isTarget
mechanism - or may be a bit of both
At this moment in history, the 2nd option looks like the most promising, least disturbing to me
from famix.
First analysis, possible steps :
- look at
TEntityMetaLevelDependency>>dependencyFM3PropertyDescriptionIn:
so that it returns all properties that relate to other entities (relations in FamixMetamodelGenerator parlance) - review the
isSource
/isTarget
mechanism so that for these properties we can define the owner as source and the content as target (whereas associations have 2 properties one being the source and the other the target)
from famix.
It seems that the relationQuery have solve this issue.
What do you think @badetitou @NicolasAnquetil?
Can we close this issue?
from famix.
No, I think it is still on the table:
by relation query you mean FamixQueries (I hate this name), the model behind the MiQueryBrowser?
If so, then the problem is solved for the MiQueryBrowser, but not for the MooseQueries, the API used by programmers.
And we still need this API because we cannot do everything with the queryBrowser.
Any opinion on introducing a new dependency
marker in the builder to mark relationships that introduce dependencies (see comment #121 (comment))?
from famix.
Related Issues (20)
- FamixMetamodelGenerator should only have direct children
- Rename methods with #MSEProperties to #FameProperties
- Rework #numberOfComments? HOT 4
- Asking if an entity is a child or a parent of another entity HOT 5
- remove #flag: from FamixMetamodelBuilder >> getTraitNamed: HOT 1
- clarify baseline HOT 2
- It should not be possible to tag an entity several times HOT 3
- FamixJavaVisitor is outdated HOT 1
- Bug annotation type added to package HOT 2
- asOrderedCollection can't be used correctly for getting targets HOT 1
- Questions on Generics meta-model
- MooseGroup do not understand message `#collectWithIndex:`
- Why TComment uses TEntityMetaLevelDependency HOT 2
- add methods #newClassNamed: to FamixMetamodelGenerator
- Port new Generic modeling to FamixCpp
- Example method is not FamixJavaParametricMethod according to the documentation
- simplify MooseObject>>#attributeAt: / #cacheAt: / propertyAt: HOT 7
- FamixStAttribute>>isSharedVariable is volatile
- CyclomaticComplexity of Pharo importer HOT 1
- Should FamixTFile be able to hold source text? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from famix.