Hi all,
after doing some reading to prepare for tomorrows talk, I started to
implement traversal strategies for Moose, based on the new Fame
framework. Currently implemented is a simple single edge strategy,
using classes or properties as waypoints, Multiple single edge
strategies can be combined to a compound strategy. I stopped
yesterday night shortly before implementing the actual visiting...
If you are interested you may have a look at the package Fame-
Traversals in MetaDevelopment on SCG Store, there are even tests,
using the EquationSystem example as sample model :)
cheers,
AA
There is a new famix.jar online (revision 14476), see url
https://www.iam.unibe.ch/scg/svn_repos/Sources/Famix/MSE4Java/famix.jar
The following opposites are fixed now
> Opposites must match: Moose.Model.mooseModel
> Opposites must match: FAMIX.AbstractStructuralEntity.accessedByList
> Opposites must match: FAMIX.InheritanceDefinition.superclass
> Opposites must match: FAMIX.InheritanceDefinition.subclass
> Opposites must match: FAMIX.Class.incomingInheritance
> Opposites must match: FAMIX.Class.accessedByList
> Opposites must match: FAMIX.Class.outgoingInheritance
> Container must be single-values: FAMIX.Class.method
cheers,
AA
Mmh... the website still seems to have that "bug" related to the system
below it. If I let the site open for a few hours without touching it;
and then try to open a link; I get redirected to "localhost:...."which
obviously fails. And for me this kind of browsing behavior is quite
common; since I open websites in tabs and tempt to forget about it :) I
guess it has something to do with cookies expiring?
cheers
hi,
I just seen that #union: in Collection is implemented as following:
^self copy addAll: aSet.
Thus it returns the passed parameter instead of the resulted
collection (see #addAll: in collection).
bests,
Hani
Wouldn't it be useful to be able to specify properties to be keyed when
they are multivalued? This would allow us to generate dictionary related
code for those keyed elements; and en plus give us a way to specify that
one of the properties can not be used twice within a same environment.
Example usage would be the classes property of a fm3.Package which would
be keyed by the property name.
Like this we would be able to do something like:
aPackage.getFromClassesAt("aName") instead of having to loop over the
classes until we find the right one.
I know that Adrian just stores all fm3specified packages+classes into
one big dictionary... but of course; having this property would also
enable its use one level lower.
Just a thought.
Toon
@adrian
I was just checking your fm3.mse file... first of all; all files should
end in a newline so maybe you want your endDocument to print a newline
at the end...
Then I see that for opposites you do not specify derived anymore either?
Thats already good.
The container property you have, that is for identifying back links
right? If so... aren't all One's of a One->Many relationship back links?
Does anybody know of a metamodel where this is not the case? If not ...
maybe we could throw that out and infer this too?
cheers
Hi,
I worked for some days with the new version of Moose in which the
Group and MooseModel have AbstractGroup as super class, and it seems
to work just fine.
As a consequence, I now published this as development so it gets
loaded with Moose Config.
Please let me know if you encounter any problems due to this change.
Doru
--
www.tudorgirba.comwww.tudorgirba.com/blog
"Problem solving efficiency grows with the abstractness level of
problem understanding."
When I try loading the latest version of moose.
Warning: Package "SmallDudeUtils" cannot be loaded.
The following classes cannot be loaded because their superclasses are
neither in the image nor in the package being loaded:
BooleanVector (subclass of Root.Smalltalk.SCG.Vector)
BooleanMatrix (subclass of Root.Smalltalk.SCG.Matrix)
BooleanSymetricMatrix (subclass of
Root.Smalltalk.SCG.SymetricMatrix)
Please find below the latest draft of the MSE format
There is a new mse element, annotations, which can be used twofold
(1) To structure mse files into multiple documents. For example an
mse file may contain an @mse header document and both a @metamodel
and @model document, or even multiple @version1 @version2 ...
documents. The only reserved annotation would be @mse for the leading
header document.
So a valid document could eg look like this
@mse ((MSE.File
(metamodel 'http://moose.unibe.ch/spec/famix/3.0')
(model '@model'))
@model
((FAMIX.Package (id: 1)
(name 'LAN')
(classes
(FAMIX.Class ...
...
...
))))
(2) Annotations for elements. Attribute names may start with an @ to
indicate an attribute not conforming to the metamodel, for example
the longDesc of a Moose measurement, or the category of a Moose meny
entry would use this feature. But also the variable indexed slots of
Magritte elements.
(MA.Element
(name 'ABC')
(attr 0.5 0.75 -1 0.2)
(@1 'foo')
(@2 'bar')
(@3 nil)
(@4 'qux'))
Also there are two new primitives
- Nil
- Datetime
Nil is not to be confused with unset values, which may have a default
value different from nil
(...
absent = default value
(attr ) = default value
(attr nil) = nil value
(attr "..some..") = some value
...)
Similar to SAX, there is a ParserClient interface for reading MSE
documents using callbacks. This interface allows an application to
register for MSE document parsing. The sequence of callbacks is
limited to the following protocol
MAIN := beginFile ( annotation* beginDocument ELEM* endDocument )*
endFile
ELEM := beginElement serial? (beginAttribute ( primitive | reference
| ELEM )* endAttribute) endElement
which is based on this grammer and tokens
root := fragment | file
fragment := elementNode
file := document*
document := annotation* "(" elementNode* ")"
annotation := AT_NAME
elementNode := "(" elementName serial? attributeNode* ")"
elementName := NAME
attributeNode := "(" attributeName valueNode* ")"
attributeName := NAME | AT_NAME
valueNode := primitive | id-reference | reference | elementNode
primitive := STRING | NUMBER | BOOLEAN | DATE | NIL
serial := "(" "id:" INTEGER ")"
id-reference := "(" "idref:" INTEGER ")"
reference := "(" "ref:" NAME ")"
Breaks input-stream into tokens. Accepts the following grammar
Tokens
Open ::= "("
Close ::= ")"
AtName ::= "@" ( Letter | Digit )+
Keyword ::= "id:" | "idref:" | "ref:"
Name ::= Letter ( Letter | Digit )* ( "." ( Letter | Digit )+ )*
String ::= ( "'" [ˆ']* "'" )+
Boolean ::= "true" | "false"
Nil ::= "nil"
Date ::= Digit{4} "-" Digit{2} "-" Digit{2} ( "," Digit{2}
":" Digit{2} ":" Digit{2} )
Number ::= "-"? Digit+ ( "." Digit+ )? ( "e" ( "-"? Digit+ ))?
Terminals
Digit ::= [0-9]
Letter ::= [a-zA-Z_]
Whitespace
Whitespace ::= Space Tab ecetera...
Comment ::= "\"" [ˆ"] "\""
----
What do you think?
AA