Hello,
With nicolas we started to have a look at the eclipse-php-parser (provide
with PDT), to export a famix-mse file from a PHP project. We already started
to build an eclipse plugin that does some work:
=> We create an AST for each php file of the project
=> Then we have a visitor on this ast, and we are therfore able to make a
specific action for each kind of node visited
=> For now, we just export some FAMIXNamespace, FAMIXClass, FAMIXMethods.
So what's left is to implement each visit-method to extract informations
for each node visited. For that we will have to know a bit more PHP :) Maybe
the metamodel will have to be extended to take into account some
PHP-specific elements, I don't know.
If you want to have a look, sources are available via svn at:
https://scm.gforge.inria.fr/svn/lse/Projects/Verveine
Vervaine provide the extractor (not yet finished) for Java ans this one for
PHP. Both are using a common mechanism to generate famix entities and
extract them to mse.
I will be on holidays until august and will probably no longer work on it
until august. So if you want to have a look (and have the courage to install
eclipse to read java code:)), have some suggestions, want to implement
something, feel free to participate :)
Some people suggested trying moose for analysis of SAS programs, and I'm
trying to figure out where to start with the meta-modeling.
SAS is not object oriented, though parts of it could be imagined to be.
The main SAS code contains blocks of statements that begin with DATA or
PROC; each block could probably be thought of as a function--to be
precise, the application of a function.
If I want to make some new models, where do I start? FM3? FAMIX?
elsewhere? The 4.0 release announcement says FM3 and FAMIX3 are both
implemented in Fame, so maybe start with Fame? I've read some
documentation, but I can't tell.
My inspiration for the project is understanding how some SAS datasets
were produced. I have a system that creates numerous datasets, which
feed into later datasets, etc. This is split at least across a couple
of program files and it's really too complicated to keep in the brain.
If I get ambitious it would also be useful to trace where particular
variables came from, in the sense of both datasets and individual
expressions.
The only thing resembling a SAS parser I've run into (except for SAS,
which is closed source) is a Perl module, and it looked relatively
primitive. I've been using PetitParser, and at the point I started
thinking about what it would parse results into.
Thanks for any pointers.
Ross Boylan
Hi all,
i did implement an SQL parser using Petit Parser. I toke the grammar specification from SQLite http://www.sqlite.org/lang.html . The grammar implemented is not complete, for now i did implement "just" the create table statement, it means that you should be able to parse at least a script for create the database.
The code is in squeaksource http://www.squeaksource.com/@09zbthA-fDDfyUNQ/_OIex3aA .
To download it you can evaluate this:
Gofer new
squeaksource: 'PetitSQLParser';
package: 'ConfigurationOfPetitSQLParser';
load.
(Smalltalk at: #ConfigurationOfPetitSQLParser) perform: #loadDefault
in the repository there are several packages: the core contains the parser for the grammar.
In the package parser there is a parser that instantiate some draft objects representing relational elements.
In the next future i will start to implement also other statements.
If you start to use it and you have some problem please let me know.
Cheers,
Fabrizio
I make changes to load Moose on pharo 1.2
here is the script:
=====
Gofer new
squeaksource: 'rb';
package: 'AST-Core';
package: 'Refactoring-Core';
package: 'Refactoring-Changes';
package: 'Refactoring-Critics';
package: 'Refactoring-Environment';
package: 'Refactoring-Spelling';
load.
(ConfigurationOfShout project version: '1.2') load.
Gofer new
squeaksource: 'Moose';
package: 'ConfigurationOfMoose';
load.
(Smalltalk at: #ConfigurationOfMoose) perform: #loadDefault.
=====
It loads, with some deprecation due to FileSystem. I have not the right to change that.
But moose loads :)
---
Jannik Laval
yes
I never know what I can type in there.
On Oct 26, 2010, at 2:06 PM, Cyrille Delaunay wrote:
> What is a fly by help? a popup window describing how it should be used ?
>
> 2010/10/26 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
> yes under the list of items
>
> On Oct 26, 2010, at 9:19 AM, Tudor Girba wrote:
>
> > You mean in the MooseFinder?
> >
> > Doru
> >
> >
> > On 25 Oct 2010, at 14:49, Stéphane Ducasse wrote:
> >
> >> cyrille
> >>
> >> this would good to have a flybyhelp in the query pane.
> >>
> >> Stef
> >> _______________________________________________
> >> Moose-dev mailing list
> >> Moose-dev(a)iam.unibe.ch
> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> > --
> > www.tudorgirba.com
> >
> > "Not knowing how to do something is not an argument for how it cannot be done."
> >
> >
> > _______________________________________________
> > Moose-dev mailing list
> > Moose-dev(a)iam.unibe.ch
> > https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
On Oct 27, 2010, at 4:48 PM, Simon Denier wrote:
>
> On 27 oct. 2010, at 16:27, Cyrille Delaunay wrote:
>
>> Hello,
>>
>> I'm currently looking at the use of the PackageOrganizerCache in Moose.
>> There was some work in pharo about a new, more performant, better-structured (I think it's the idea ? :)) 'Package system' called RPackage.
>> So before doing anything, I would like to know more about the use of PackageOrganizerCache:
>> - Why do we use a cache ? I guess this is because accessing directly parent packages of specific classes or methods was to slow using the current package system.
>> - If this is the good answer :), why was it too long? could another package system (RPackage) solve this problem and avoid us to use a cache ?
>> - For which kind of task is used the packageCache in Moose? I saw that it was used at the import of smalltalk code, to link classes and method to their parent package, is that all ?
>
> Basically, yes, yes, and yes.
>
> The current package system (PackageOrganizer + PackageInfo) is reeeally slow for some tasks, like computing package of methods (to detect class extensions), and it really brought down the Smalltalk importer to its knee on even not so large models. The big problem now is linking the package organizer to system events, so that it updates itself whenever a package is added, renamed, removed, changed...
So far this is not done in RPackage because the event were not there. But now they are available so we should check that.
I will check and discuss that with cyrille because this will help us.
> This was not done with PackageOrganizerCache because it's a bit difficult and because it was just a workaround at the time. Now RPackage should replace the current organizer and has to take care of such events. It also appear that RPackage initializes itself faster than PackageOrganizerCache (probably because it's more clever in its usage of PackageInfo API).
I do not know. So long that I looked at Rpackage.
> Anyway, it's a problem specific to the Smalltalk importer, not to Moose or Famix in general.
>
> --
> Simon
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
i have a problem with the moose panel: when i load my stuff (MooseJEE) i have a group of database tables which has defined on top 2 visualizations. When i load a model form a MSE file, the first time that i click on that entity it is actually recognized has a TableGroup (see figure 1). When i click a second time on it it not consider anymore a TableGroup but just a MooseGroup, consequently i loose all the information specifically related with the table group (see figure 2).
I define my group like this:
mooseModel>>>allTables
<navigation: 'All Data Base Tables'>
| group |
group := self allWithType: MJFAMIXTable ofGroupClass: MJFAMIXTablesGroup.
group description: 'All Data Base Tables'.
^group
SessionBeans group has the same definition but it works all the time.
Any ideas on which could be the problem?
Cheers,
Fabrizio
Hi Guys,
Why don't you do something more focused on the long term and don't you
change the Smalltalk compiler with namespaces?
I don't think it should be that hard since each class already belongs to a
category. Each category could instead be a dictionary from where the
compiler could find classes that are mentioned in the class source.
This has worked wonders in Java (classes inside packages). This way classes'
names can be repeated ad eternum without generating collisions or otherwise
polluting excessively the name space.
So for example:
FAMIXAssociation subclass: #FAMIXInvocation
instanceVariableNames: 'sender receiver receiverSourceCode signature
candidates'
classVariableNames: ''
poolDictionaries: ''
category: 'Famix-Core'
Would be instead:
Association subclass: #Invocation
instanceVariableNames: 'sender receiver receiverSourceCode signature
candidates'
classVariableNames: ''
poolDictionaries: ''
category: #FamixCore
Then the category would be an index in the SystemDictionary:
SystemDictionary at: #FamixCore put: Category new.
(SystemDictionary at: #FamixCore) belongingClassList add: #Invocation "this
should be done automatically by the subclass: method above"
(SystemDictionary at: #FamixCore) referencedClassList add: ... "classes that
are referenced by classes belonging to category #FamixCore"
What do you think?
Cheers,
Guillermo.
Message: 1
Date: Mon, 27 Sep 2010 22:00:33 +0200
From: Tudor Girba <tudor.girba(a)gmail.com>
Subject: [Moose-dev] Re: Class renaming in Moose Algos Graph
To: Moose-related development <moose-dev(a)iam.unibe.ch>
Message-ID: <C912A83B-6BDC-4775-AC26-CE2DBC5540AE(a)gmail.com>
Content-Type: text/plain; charset=us-ascii
Hi Simon,
These classes should be called MAlgo (or MAL ?). I started to do that a
while ago, but apparently I forgot to commit this change.
Cheers,
Doru
On 27 Sep 2010, at 19:42, Simon Denier wrote:
>
> On 27 sept. 2010, at 18:17, Lukas Renggli wrote:
>
>> Please note that the MA* (with an uppercase $A) prefix is already
>> taken by Magritte. Ma* (with a lowercase $a) is taken by Magma, if I
>> remember correctly they renamed their classes at some point a long
>> time ago to avoid the conflict with Magritte.
>
Thanks!!!
On Oct 31, 2010, at 8:06 PM, Tudor Girba wrote:
> Done.
>
> Doru
>
> On 31 Oct 2010, at 12:17, Stéphane Ducasse wrote:
>
>> Hi doru
>>
>> could you take 15 min and add comments to the OPAX classes?
>> in XMLSupport. There is not a line of comments, so I know that this is your private code that got there but still.
>>
>> Stef
>>
>>
>>
>>
>
> --
> www.tudorgirba.com
>
> "Don't give to get. Just give."
>
>
>
>
>
>
Done.
Doru
On 31 Oct 2010, at 12:17, Stéphane Ducasse wrote:
> Hi doru
>
> could you take 15 min and add comments to the OPAX classes?
> in XMLSupport. There is not a line of comments, so I know that this is your private code that got there but still.
>
> Stef
>
>
>
>
--
www.tudorgirba.com
"Don't give to get. Just give."