[07:13:56] --> mdupont has joined #peak [07:13:58] hey all [07:15:02] CASE/modelling tools: PEAK includes APIs to read object models created in the XML-based XMI format. Many open-source and commercial modelling tools support XMI, inlcuding Argo/Poseidon and MagicDraw UML. PEAK includes pre-built support for UML versions 1.3 and 1.4, and MOF 1.3.1, using XMI versions 1.0 and 1.1. (UML 1.5, CWM 1.0, CWM 1.1, and XMI 1.2-2.0 are anticipated for version 0.6.) Also included is a MOF->Python code generator, which was [07:15:02] d to generate the UML support, and which you can use to generate support for other modelling languages based on the MOF. [07:15:10] anyone care to talk about this aspect? [08:54:25] --> jack-e has joined #peak [11:10:17] --- mdupont is now known as mdupont-away [12:18:33] --> _Maniac has joined #peak [17:48:21] --> equip2rip has joined #peak [19:18:24] --- mdupont-away is now known as mdupont [19:19:32] --> pje has joined #peak [19:19:56] So... what about the CASE stuff did you want to talk about? [19:28:23] me? [19:34:48] Yes, you. [19:35:31] cool [19:35:44] i am working on a possible usage of peak [19:37:46] Okay. [19:37:52] Did you have any specific questions? [19:39:58] I've got to go to a staff meeting in about 15-20 minutes... [19:41:54] yes, [19:42:07] i would like to generate a set of classes from the xmi metamodel [19:42:31] basically create a new representation of the uml and mof system in a new language [19:42:36] can i use peak to do that? [19:42:47] do you generate python classes out of the metamodel? [19:42:49] What do you mean by a "new language"? [19:43:04] If you have a MOF metamodel for a modelling language, you can generate Python from it. [19:44:18] If you look at peak.metamodels.UML13.model and peak.metamodels.UML14.model you'll see generated code. [19:44:32] It was generated from the MOF models for UML 1.3 and UML 1.4 [19:44:42] i mean, by a new language, a rdfs/owl ontology [19:44:51] a c# class lib [19:44:58] and a postgres database schema [19:45:02] MDA [19:45:07] model driven architechture [19:45:28] i mean PHP front ends [19:45:36] Ah. Well, if you just want to generate such things from a UML model, just write a generator. [19:45:39] and DotGnu XMLRPC webservices [19:45:49] PEAK can load the UML model for you from an .xmi file. [19:45:49] can i use peak to write an XMI generator? [19:45:54] great [19:46:06] i want to use your code to bootstrap mine [19:46:13] i have existing code you might be interested [19:46:21] i extract the metadata from the gcc [19:46:45] you can feed that to PEAK to help ReverseEngineer other code [19:47:08] So, you're generating XMI from GCC-XML? [19:47:49] I am generating RDF/n3 from the GCC-Treedumps [19:47:53] introspector.sf.net [19:49:09] PEAK can load any XMI file for which there is a Python metamodel. [19:49:30] an then what can I do with it? do you have a template for a generator? [19:49:31] But, you can generate a Python metamodel for this, if there is a MOF metamodel (in XMI) describing the higher-level model. [19:49:43] do you want a generic RDFS/OWL generator? [19:50:02] * mdupont is willing to contribute one [19:50:04] You can look at peak.model.mof_generator, but it's specifically for generating one kind of Python code, from a MOF model. [19:50:26] I'm not currently familiar enough with RDF to even be interested in learning anything about RDF. :) [19:51:36] ok [19:51:39] I'm not sure what kind of template you need. PEAK loads the XMI file as UML (or MOF, or whatever) objects. [19:51:50] well, it will generate interest into your project for sure [19:51:59] For example, if you load a UML file, you get back a top-level "Model" object... [19:52:04] i will take the python generator and abstract it into a base class [19:52:18] You can then look in its ownedElements attribute for the packages contained in there, and so on. [19:52:19] then create a new derived class as a RDF emitter [19:52:35] * pje isn't interested in generating interest in PEAK right now. [19:52:52] ok [19:53:02] well, i am looking for a good usage of dotgnu [19:53:18] i think we can generate dotgnu webservices for passing object described by uml around [19:53:47] Okay. What modelling tool are you using to create the UML, and what version of XMI does it support? [19:54:00] imagine a way to generate an XML schema description that would be created from the UML model [19:54:27] I want to create an RDF <---> XMI converter [19:54:39] the UML is currently in Gnome DIA [19:54:40] I don't have to imagine it; there's a documented OMG method for it in XMI 2.0. :) [19:55:05] Okay, does DIA support XMI? I don't believe it does. [19:55:42] http://mail.gnome.org/archives/dia-list/2003-April/msg00176.html [19:55:48] http://mail.gnome.org/archives/dia-list/2003-April/msg00179.html [19:56:00] Looks like a definite no, at least as of April. [19:56:10] it does not have an XMI output, but the DIA.XML ==> RDF <==> XMI ===> UML might work? [19:56:35] pje: I have be researching into DIA for about 1.5 years now [19:57:23] * pje shrugs. I've never used DIA. I currently use MagicDraw for UML modelling. [19:57:50] ok, I am interested in your projects, I dont know python, but DOTGNU uses it alot [19:58:00] what type of python objects can you create, [19:58:12] are you saying I can use MagicDraw, is it free software? [19:58:18] Nope. [19:58:21] It's commercial. [19:58:27] thats why [19:58:36] i am not really interested in creating XMI [19:58:43] i am interest more in this path [19:59:07] Well, PEAK only handles UML in XMI format, because it's the only open standard for exchanging UML models. [19:59:15] UML-1.5.XMI => Peak => RDF => Intrspector [19:59:24] There are some free tools that support it, like Argo and Poseidon. [19:59:29] Argo is good [19:59:45] Also, there's SMW, the other Python library that supports XMI. It has a drawing tool in it as well. [19:59:48] * mdupont reminds himself to reinstall argo [19:59:53] Anyway, staff meeting is starting... BBL... [20:00:48] i want to use the UML metamodel as an ontology/vocabulary/dictionary to be used to describe parts of the Introspector gcc model [20:00:54] by exporting both to RDF [20:01:26] the prover tools like CWM and Eulersharp can make the connection outside both systems [20:13:39] hey, can we build in xmlrpc support for peak? [20:13:56] do you have GNU-E intergration? [20:19:59] --> pje has joined #peak [20:20:06] * pje is back. [20:20:15] No GNU-E integration. [20:20:25] peak.web should support XML-RPC. [20:20:32] It's not currently tested, though. [20:20:35] ok [20:20:42] we can integrate over xmlrpc [20:20:48] By the way, if you're not that familiar with Python, PEAK is definitely not for you. [20:20:53] with GNUE, PHPGW and DotGnu [20:21:03] PEAK is not finished; it really is alpha software. [20:21:08] It isn't documented. [20:21:11] Many things are in flux. [20:21:16] Lots of things aren't even *designed*. [20:21:17] pje: building an RDF generator should work if you python generator works [20:21:24] i am able to read and patch python [20:21:43] My "python generator" is a MOF model -> peak.model generator. [20:21:54] I made no effort to make it general. [20:22:51] pje: do you care to comment on this :http://rdfig.xmlhack.com/2003/07/31/2003-07-31.html#1059682335.993265 [20:23:08] ok, so the peak.model is a python class? [20:23:23] you can write your message in #rdfig [20:24:13] peak.model is a Python metamodel. [20:24:36] It's a MOF-aligned, Python-friendly metamodel. [20:25:10] mdupont, the problem I'm having with this conversation is that I have no clue what it is you actually want to *do*. [20:25:21] I mean, what *real life* problem are you trying to solve? [20:25:28] def __getstate__(self): r={} for k, v in self.__dict__.items(): if k[:3] not in ('_p_', '_v_'): r[k]=v return r [20:25:34] k[:3] ? [20:25:39] what does that signify? [20:26:40] *do* ? i want to markup the results of the gcc metamodel semantically and generate graphs to be layed out with the vcg tool and turned into UML by the rdf engine Euler sharp [20:26:55] by using rdf vocabularies and a proof engine, [20:27:05] I can unify the models of the gcc and uml [20:27:20] and emit uml objects from the gcc [20:27:32] that is what i want to do [20:27:33] So you want to generate UML models from GCC? [20:27:36] yes [20:27:43] Ah, that's much clearer. [20:27:51] PEAK won't be of any use to you in that whatsoever. [20:27:54] * pje grins. [20:28:18] PEAK doesn't have any *output* facility for UML. [20:28:22] Only input. [20:28:52] the uml metamodel in peak can be used to generate statements about the structure of the UML itself. you emit this into python. tha is your output. [20:29:15] that output can be abstracted into a base class [20:29:21] and i can derived from that. [20:29:32] abstract base emitter object [20:29:36] But that's not "generating UML models from GCC" [20:29:44] That's "generating something else from a UML model". [20:29:59] a code generator that understand the uml [20:30:04] By the way, if you look for the Python "SMW" library, it supports writing XMI as well as reading it. [20:30:30] are you saying that you cannot feed the mof and the uml metamodel into Peak and generate the representatives from it? [20:30:58] I'm not following what you mean by "representatives". [20:31:04] But here's what PEAK *will* do: [20:31:18] You can read any XMI file for which PEAK has a metamodel, represented as peak.model classes. [20:31:35] (See peak.metamodels.MOF131 for a hand-written example) [20:32:03] Once I hand-wrote MOF131, I could bootstrap any modelling language (e.g. UML 1.3-1.5) for which a MOF 1.3 model existed. [20:32:24] So, if you can find an XMI file for the modelling lanugage, you can load a MOF model into PEAK for it. [20:32:25] cannot that generation of a python equivalent from an given xmi, when that happens to the uml mode, be abstracted to a generic generator for an different language for representing the abstract notation of the meaning? [20:32:48] Maybe. [20:32:50] do you have the meta models for uml? [20:32:54] Yes. [20:33:01] See peak.metamodels. [20:33:18] There are XMI files for several modelling languages there. [20:33:48] And mof_generator actually creates them all; I just don't support/distribute the code for UML 1.5 and CWM 1.0/1.1. [20:34:26] ok, so i can modify the python generation and create other generators? [20:34:43] do you have example output of the UML metamodel translated into python? [20:35:01] First question: highly unlikely. [20:35:32] Peak/PEAK/src/peak/metamodels/xmi, is this supposed to be empty [20:35:44] Third question: yes [20:35:54] are you challenging me to do that? highly unlikely? [20:36:06] Second question: see peak.metamodels.UML13 and UML14 [20:36:21] re: challenging, no, I just don't think it's worth your time to bother. [20:36:31] Versus simply writing what you want in the first place. [20:36:34] ok [20:36:39] well thats a point [20:36:40] Would you try to "modify" IIS into Apache? [20:36:48] It'd be better for you to start from scratch. [20:36:50] i am working on the XMI vocab right now [20:37:10] well, i would like to see how you mapped the XMI into Objects [20:37:16] that is work i dont want to copy [20:37:19] The mapping is in peak.storage.xmi [20:37:21] i mean do again [20:37:37] Here's the thing... to load an XMI file into objects with PEAK is trivial. [20:37:52] That's why you don't care about the guts of mof_generator, except as an example. [20:38:05] so MOF.py is generated? [20:38:18] No, but UML13.model and UML13.model are. [20:38:24] ok, as an example [20:38:27] MOF131.py is hand-written. [20:38:31] * mdupont looks again [20:38:53] peak.model.mof2py is a sample generator. [20:38:59] dude! [20:39:02] that is great [20:39:11] peak\metamodels\UML14\model\Activity_Graphs.py is perfect [20:39:21] that can be modified into RDF really easy [20:39:22] !!! [20:39:27] It was generated by peak.models.mof2py [20:39:51] See the 'genPkg()' function, which loads an XMI file like this: [20:39:53] roots = storage.xmi.fromFile(modelFile, config.makeRoot()) [20:39:53] * mdupont snarfs peak.models.mof2py and runs to be the first to accomplish this great task [20:40:18] 'roots' is now a list of the top-level objects described by the XMI file. [20:40:35] In the case of the MOF models for UML et al, the top-level objects are all MOF 'Package' instances. [20:41:21] genPkg() then asks each package to "Externalize" itself to the "fileset" format. The "fileset" format is registered in peak.ini... [20:41:43] You can create your own generator type and register a factory to be used as a type of "externalization", but this is only for MOF models. [20:41:44] rom __future__ import generators? [20:41:59] cool! [20:42:01] thanks dude [20:42:22] __future__/generators is Python 2.2 that allows you to have functions "yield" values and continue. [20:42:54] class _Symbol(object): is cool! [20:43:07] ah, a type of pragma? [20:43:11] Yes. [20:44:43] It's used to introduce new features in the language. [20:44:45] class oncePerObject(advice): that is a cool pattern, extreme oo meets extreme lisp? [20:45:43] mdupont, I've forgotten about more cool things I've written in PEAK than I can remember. [20:45:50] So to speak. [20:45:58] metamodel = binding.bindTo("import:peak.metamodels.MOF131:") is a good binding syntax [20:46:08] well, i need to catch up on that [20:46:48] can i also feed you data to emit xmi, or is that that lib you mentioned? [20:46:56] PEAK doesn't emit XMI. [20:47:09] what if i wanted to create these object as if i was the parser? [20:47:13] SMW (System Modelling Workbench) will read and write. [20:47:22] * mdupont googles [20:47:39] If you want to create the objects, just import the classes and make instances. [20:51:48] e.g.: [20:51:54] from peak.metamodels.UML14 import UML [20:51:57] p = UML.Package() [20:52:24] c = UML.Class(name="MyClass", namespace=p) [20:52:32] print p.ownedElement [20:52:45] [] [20:53:07] print c.name -> "MyClass" [20:53:13] etc. [20:54:58] cool [20:55:03] thats great stuff [20:55:17] the usage api is very elegant [20:55:30] * mdupont wants to create something similar for c# [20:56:21] c#eak ;-) [20:56:36] Ah, finally somebody else speaks. :) [20:56:51] hey jack-e [20:56:56] i just followed you discussion (or at least tried to ;-) [20:57:11] c# is a good modelling tool, its reflection alows emits of xmlrpc webservices [20:57:21] hey phillip, James [20:57:22] DGEE is based on that [20:57:27] just call me mike [20:57:31] ok [20:57:41] mdupont, Python is plenty reflective enough for you to turn functions into XMLRPC services. [20:57:49] cool! [20:57:51] See ZPublisher, for example. [20:58:13] Python's 'xmlrpclib' also makes remote XMLRPC services into local function calls. [20:58:21] E.g. from xmlrpclib import Server [20:58:28] s=Server('http://whatever') [20:58:30] what do you think of setting up a uml repository webservice with your Peak? [20:58:36] s.someMethod(arg1,"arg2",etc) [20:59:00] I think that I don't know why I would want to. :) [20:59:16] You have to understand, my work on PEAK is driven by work and business needs. [20:59:30] So, if I don't need it, I don't need it. [21:02:17] mdupont: for providing webservices, you'll need more infrastructure with SOAP, WSDL, etc [21:02:33] not everything is available yet for python afaik [21:02:44] * pje prefers XML-RPC, since it doesn't require all that extra infrastructure. [21:02:49] Simple things should be simple. [21:02:50] or do you think of web-services in a more general way ? [21:03:06] SOAP and its ilk have too many options, which means limited interoperability. [21:03:22] XML-RPC has no options, no extensions, no ambiguity. So it's *somewhat* more interoperable. :) [21:03:49] Even so, I try to stick to a *subset* of the full XML-RPC spec, for best results. :) [21:04:27] * pje avoids the base64 and timestamp types [21:04:45] And still occasionally runs into Unicode issues with some (non-Python) XML-RPC libraries! [21:05:57] * jack-e wants to use twisted.pb, pyro or corba for networking (configurable) [21:06:55] pje: nice talking to you , i gotta run for 1-2 hours [21:07:06] Adios. [21:07:11] cu .. [21:07:50] * jack-e will soon have finished his zope2 consulting job and come back to peak-land ;-) [21:08:34] later jack-e, i hope to learn some zope. does it support webservices as well ? (stupid question0 [21:08:58] mdupont: it supports xmlrpc but not soap/etc [21:09:16] mdupont: if you get into zope, try zope3 .. [21:09:30] cool. [21:09:35] thanks dude, [21:09:40] it's far from stable/finished, but good concepts [21:10:11] say can you install it on a public webserver? we have a demo.dotgnu.org server, we can setup a test bed of interconnections betewen pgpgw, dotgnu and zope [21:10:20] that would be sure to attract alot of developers [21:11:47] you should give zope3 another 3-6 months to install it on a public web-server .. if you need something right now, you could do it with zope2 - but do not expect clean api's or uptodate concepts from zope2 [21:12:38] i don't know anything about pgpgw and dotgnu [21:12:51] i've played a bit with gnue [21:12:57] about 6 month ago [21:14:46] mdupont: you're located in germany as well ?? [21:15:48] ahh pgpgw ?? phpGroupWare ;-) [21:36:59] --> _Maniac_ has joined #peak [21:38:11] quarter to midnight in germany .. time for bed ... [21:38:11] cu all [21:43:36] * pje is wrestling with the configuration format for peak.web resource directories [21:44:24] .ini files either produce nonintuitive results, or require nonintuitive syntax. [21:45:18] While ZConfig requires us to work out some kind of precedence rules and have a fixed schema. [21:49:09] I would use Apache's processing of as a guideline, but so far, Apache's docs aren't all that clear on how *their* precedence mechanisms work. [21:59:53] back [22:17:20] --> jack-e has joined #peak [22:17:37] re [22:17:47] Hey. [22:17:52] pje: do you know if ne respects the PEAK_CONFIG variable ?? [22:17:57] What happened to bedtime? :) [22:18:02] 'ne'? [22:18:05] err .. :) [22:18:11] n2 i mean [22:18:19] Ah. Yes, of course. [22:18:41] i was just playing with n2 and tried to lookup urls defined in my nll.ini [22:18:58] so i just did: export PEAK_CONFIG=/nll.ini [22:19:01] peak n2 [22:19:11] I've successfully used n2 with PEAK_CONFIG-defined URL types. [22:19:12] but it doesn't resolve my urls :( [22:19:24] hmmmm [22:19:43] What happens? [22:19:59] url-scheme not found [22:20:49] Interesting. And other code works? [22:21:12] i haven't tested it for about 2 weeks now .. [22:21:19] let me run my unit tests .. mompl [22:23:44] argh .. i did a set PEAK_CONFIG in bash %-/ ...it's really time for bed now ;-) [22:25:48] I take it that means it does in fact work? [22:25:58] yes :) [22:26:10] mdupont: still there ? [22:26:14] * pje thought it did, since he's been using it for a while... [22:26:21] :) [22:30:27] yeah :) a "cd jabber.client://user:pass@host/resource" takes me to the prompt where i can do something on the connection-object :-) [22:31:32] Yeah, now if you make an IN2Interactor adapter for your connection, you can make a Jabber shell! [22:32:01] Note, btw, that you can specify the URL on the command line... [22:32:02] ok [22:32:22] Also, if you define a configuration property that's a 'naming.LinkRef("jabber.client:...")', [22:32:34] then you can go to 'peak n2 config:my.property' [22:32:38] And get to the same place. [22:32:54] i've read about the naming.LinkRef thingie .. [22:33:10] Yes, and I've lifted the earlier constraint on it. [22:33:37] It now works in properties defined by .ini files, whether or not you access it via config:. [22:33:45] it solves the problem we talked about a month ago, where i wanted to specify a sql-connection-string in an ini-file .. right ?? [22:34:21] * pje doesn't remember your problem, specifically. [22:34:37] But, certainly, it allows you to specify the connection string, e.g.: [22:34:40] [myapp] [22:34:50] connection = naming.LinkRef("anything") [22:35:01] And then bindToProperty('myapp.connection'). [22:35:11] i had to write a binding.Once method that retrieved the property and did a lookupComponent(result) [22:35:36] Before, you could do the same thing, but you had to 'bindTo('config:myapp.connection/')' instead of 'bindToProperty()'. [22:35:47] instead of just writing binding.bindToProperty(PropertyName('my.property')) to get an sql-connection back [22:35:55] ok [22:36:04] err [22:36:15] take out PropertyName [22:36:23] i really need some sleep %./ [22:37:10] * pje waves [22:37:18] so .. finally i'm out .. cu [22:39:25] * pje is going to go finish implementing what he just posted about [22:39:30] Bye all.