From: Andreas L. <no...@sb...> - 2001-05-28 14:25:30
|
I have been working on a XACE draft specication and prototype. The following is still totally open and subject to change. I just wanted to get your feedback (especially from Eric - since I don't want to waste furthere time on the project if it is not going to make it into GOBO and thus eXML): Here is the XML Schema: -- <?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:annotation> <xsd:documentation xml:lang="en"> XACE </xsd:documentation> </xsd:annotation> <!-- the two root level constructs. one for applications, one for libraries --> <xsd:element name="system" type="SystemType"/> <xsd:element name="library" type="LibraryType"/> <!-- the root element for applications. similar to "system" in ACE files --> <xsd:complexType name="SystemType"> <xsd:attribute name="name" type="xsd:string" use="required"> <xsd:sequence> <xsd:element name="root" type="RootType" minOccurs="1" maxOccurs="1"/> <xsd:element name="clusters" type="ClustersType" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <!-- the root element for libraries. --> <xsd:complexType name="LibraryType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:sequence> <xsd:element name="clusters" type="ClustersType" minOccurs="1" maxOccurs="1"/> </xsd:sequence> </xsd:complexType> <!-- element specifieng the root class and creation procedure of a system --> <xsd:complexType name="RootType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="creation_procedure" type="xsd:string" use="required"/> </xsd:complexType> <!-- sequence of clusters --> <xsd:complexType name="ClustersType"> <xsd:sequence> <xsd:element name="cluster" type="ClusterType" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <!-- individual cluster --> <xsd:complexType name="ClusterType"> <xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:sequence> <xsd:choice> <xsd:element name="path" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="library" type="xsd:string" minOccurs="1" maxOccurs="1"/> </xsd:choice> <xsd:element name="cluster" type="ClusterType" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:schema> -- The missing bits (besides meta data such as version, author, documentation, ...) are external clauses and option clauses. Here is an example for an XACE file: -- <?xml version="1.0"?> <system name="FOO"> <root class="FOO" creation_procedure="make"/> <clusters> <cluster name="xace_test"> <path location="${EXML}/src/xace/test/"/> <cluster name="KERNEL"> <library location="${EXML}/library/kernel.xace"/> </cluster> </cluster> </clusters> </system> -- It will be a property of XACE that external classes (different from all aproaches done till yet) can be nested. So sub-clusters and libraries each declare their external dependecies and the resulting build files will get this information merged together. This solves the problem of combining differen C dependent libraries. The xace tool has the following command line usage: xace [-DVALUE]* [--se|--ise|--ve|--hact] [options] xace-file Where -D defines conditional variables, that serve a similar process than they do in gepp. I thought a lot about this. But I think going for it is the best way. Here is an example (not yet in Schema) of how such a conditional will look like: Only if a variable is defined the cluster will be included. the same can be done for options and external clauses of course. For every selected compiler a variable with the compiler short hand in upper case will be defined automatically. -- <cluster condition="ISE|HACT"> ... </cluster> -- Also the scheme is quite strict now. It never assumes default values. These can be introduced in a later stage of the project. The use of the KERNEL library is an interesting application of the conditional. An application only needs to inlcude this one-liner and the kernel.xace file that will ship with eXML (together with the xace tool). The kernel cluster will include conditional clusters so your build files will only get what they need. to produce the output for SE for example all that needs to be done in for the above example is: xace --se foo.xace feedback welcome, Andreas |
From: Alexander K. <kw...@ah...> - 2001-05-28 16:08:35
|
Andreas Leitner wrote: ... > It will be a property of XACE that external classes (different from all > aproaches done till yet) can be nested. So sub-clusters and libraries > each declare their external dependecies and the resulting build files > will get this information merged together. This solves the problem of > combining differen C dependent libraries. > > The xace tool has the following command line usage: > xace [-DVALUE]* [--se|--ise|--ve|--hact] [options] xace-file > > Where -D defines conditional variables, that serve a similar process > than they do in gepp. I thought a lot about this. But I think going for > it is the best way. Here is an example (not yet in Schema) of how such a > conditional will look like: Only if a variable is defined the cluster > will be included. the same can be done for options and external clauses > of course. For every selected compiler a variable with the compiler > short hand in upper case will be defined automatically. > > -- > <cluster condition="ISE|HACT"> > ... > </cluster> We were planning to introduce the similar XML scheme in VE when "cluster.es" was developed. Unfortunately at that time there were no descent XML parser and Windows INI files did the job. At the moment "cluster.es" in its INI format is still used, but we would like to switch to XML format sometime. It seems that current "cluster.es" works pretty nice for VE, so the future XML need to be functionally as rich as "cluster.es" is. It also would be great if some common format like the proposed XACE will be used. The comparison with "cluster.es" shows that XACE misses the following in its current incarnation: 1. The possibility to specify the source files a) in several paths b) with different file masks (AFAIK this is only supported by VE - all other compilers read only *.e files) c) depending on some additional settings (like the current OS) d) recursively 2. The possibility to specify cluster dependencies taking some settings into account (e.g., OS platform again) 3. The possibility to specify external dependencies (again taking some settings into account). 1c, 2 and 3 all require some general mechanism to make XACE conditional. Using compiler-name variable is OK, but it does not cover all the needs (at least not for VE). Some extension mechanism is also required to allow compiler-specific options to be specified. As to the system settings, usually there are at least two versions of the system - debug and finalized. And it would be rather attractive to switch between different sets of the settings just by specifying a different command-line parameter or by selecting a system type in the GUI environment without the need to modify XACE every time. The same applies to libraries (precompiled clusters). As to two top-level elements ("system" and "library"), there is a possibility that the system/library and cluster reside in the same folder, so the description file can list properties of both of them. In fact nothing prevents one XACE file to specify several related clusters. I still do not have the complete picture of what and how can be specified in XACE-like language, but I do want to see it a cross-platform solution for Eiffel vendors. Looking forward, Alexander Kogtenkov Object Tools, Moscow |
From: Andreas L. <no...@sb...> - 2001-05-28 16:25:30
|
On 28 May 2001 20:06:42 +0400, Alexander Kogtenkov wrote: > Andreas Leitner wrote: > We were planning to introduce the similar XML scheme in VE when "cluster.es" > was developed. Unfortunately at that time there were no descent XML parser > and Windows INI files did the job. At the moment "cluster.es" in its INI format > is still used, but we would like to switch to XML format sometime. > > It seems that current "cluster.es" works pretty nice for VE, so the future XML > need to be functionally as rich as "cluster.es" is. It also would be great if > some common format like the proposed XACE will be used. Hehe, if we could come up with a reasonable XACE format and VE would support it, we could also hack SE to understand XACE. Then 2 or 4 compilers would use XACE nativly - cool (; I am moving this thread over to: http://www.yahoogroups.com/groups/exml in order to not "spam" this list with XACE mails. I will send a response to your message and a refined XACE draft shortly. regards, Andreas |
From: Andreas L. <no...@sb...> - 2001-05-28 17:24:22
|
On 28 May 2001 20:06:42 +0400, Alexander Kogtenkov wrote: > Andreas Leitner wrote: > We were planning to introduce the similar XML scheme in VE when "cluster.es" > was developed. Unfortunately at that time there were no descent XML parser > and Windows INI files did the job. At the moment "cluster.es" in its INI format > is still used, but we would like to switch to XML format sometime. > > It seems that current "cluster.es" works pretty nice for VE, so the future XML > need to be functionally as rich as "cluster.es" is. It also would be great if > some common format like the proposed XACE will be used. > > The comparison with "cluster.es" shows that XACE misses the following > in its current incarnation: > 1. The possibility to specify the source files > a) in several paths see updated specs > b) with different file masks (AFAIK this is only supported by VE - all other > compilers read only *.e files) hmmm, dificult. because all other compilers look only for ".e" files. The most I could do is add an extension, that will only be accepted if the "--ve" flag is given. not sure if this is a good idea though. > c) depending on some additional settings (like the current OS) > d) recursively > 2. The possibility to specify cluster dependencies taking some settings into > account (e.g., OS platform again) Well, that can be handled using condition variables. a native ve implementation of XACE for example could always define "PLATFORM" to the current target platform. Or am I missing something. > 3. The possibility to specify external dependencies (again taking some settings > into account). It's on the todo list and a must have, since I want eXML to work with it (; > 1c, 2 and 3 all require some general mechanism to make XACE conditional. > Using compiler-name variable is OK, but it does not cover all the needs (at least > not for VE). Some extension mechanism is also required to allow compiler-specific > options to be specified. i will look into compiler options later. can you give me examples where condition variables are not sufficient? btw, I was thinking about a mechanism to select only subclusters in a library. alla "GOBO.KERNEL". We could then also allow "GOBO.KERNEL.SPEC.${EIFFEL_COMPILER}", I think that fits the VE system more closely, right? > As to the system settings, usually there are at least two versions of the system - > debug and finalized. And it would be rather attractive to switch between different > sets of the settings just by specifying a different command-line parameter or > by selecting a system type in the GUI environment without the need to modify XACE > every time. The same applies to libraries (precompiled clusters). That's where condition variables are totaly sufficient. Just make two "option" blocks with condtions: <options condtion="RELEASE_BUILD"> ... </options> <options condition="DEBUG_BUILD"> ... </options> > As to two top-level elements ("system" and "library"), there is a possibility that the > system/library and cluster reside in the same folder, so the description file can list > properties of both of them. In fact nothing prevents one XACE file to specify several > related clusters. Don't understand. Of course you can specify more clusters in once XACE file. regards, Andreas |
From: Andreas L. <no...@sb...> - 2001-05-28 17:27:03
|
Ooops, wrong list. (; Andreas |
From: Eric B. <er...@go...> - 2001-05-28 17:50:53
|
Andreas Leitner wrote: > > I have been working on a XACE draft specication and prototype. The > following is still totally open and subject to change. I just wanted to > get your feedback (especially from Eric - since I don't want to waste > furthere time on the project if it is not going to make it into GOBO and > thus eXML): If we want Gobo to be some sort of open-source, I don't think I should be the only one to decide what should go in Gobo and what shouldn't. If a majority of people wants something into Gobo, then we should probably listen to them. For what XACE is concerned, I didn't look at the proposal into details yet, but from what I've seen it is much more flexible and powerful than the pseudo Ace file templates with 'gepp' that I included in the last release of Gobo. So in my opinion you can continue working on XACE because it will be great to have a portable way to write Xace files and generate the corresponding compiler-dependent Ace files easily on demand (or use the Xace files directly if they are natively supported by Visual Eiffel one day). For the name of your tool, wouldn't it be more consistent to call it 'gexace' (or something else but with the prefix 'ge')? PS: I look forward to see and try the first prototype of your tool on a real example. -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Andreas L. <no...@sb...> - 2001-05-28 18:00:03
|
On 28 May 2001 19:45:21 +0200, Eric Bezault wrote: > For the name of your tool, wouldn't it be more consistent > to call it 'gexace' (or something else but with the prefix > 'ge')? Sure, but it's not in GOBO yet. These changes will happen just before the merger. To do it now, just starts confusion: A tool that is part of eXML should not start with "ge", a tool that is part of GOBO should. > PS: I look forward to see and try the first prototype > of your tool on a real example. Me too. Btw, I think I will extend condition variables to include values. just like environment variables. Therefor I was looking for a new command line syntax and came up with that: variable-definitions: --define="VAR_NAME[=VALUE]( VAR_NAME[=VALUE])*" examples: --define="FOO=BAR" --define="FOO=bar ISE VE PLATFORM=linux" this new form has the advantage that it is get-opt conform. Now this is not GOBO conform, but I think in this case we should consider changing the ge-tools to conform to get-opt instead. What do you think? Andreas |
From: Eric B. <er...@go...> - 2001-05-28 22:19:10
|
Andreas Leitner wrote: > > Btw, I think I will extend condition variables to include values. just > like environment variables. Therefor I was looking for a new command > line syntax and came up with that: What does the C preprocessor do in that case? Is it something like that: -DFOO=BAR ? > variable-definitions: --define="VAR_NAME[=VALUE]( VAR_NAME[=VALUE])*" > > examples: > --define="FOO=BAR" > --define="FOO=bar ISE VE PLATFORM=linux" > > this new form has the advantage that it is get-opt conform. Now this is > not GOBO conform, but I think in this case we should consider changing > the ge-tools to conform to get-opt instead. What do you think? Why not, but I'm a little bit skeptical about having several definitions in the same --define option. Furthermore, if --define=FOO is the long option usage, isn't there a short option usage as well such as -d FOO ? -- Eric Bezault mailto:er...@go... http://www.gobosoft.com |
From: Andreas L. <no...@sb...> - 2001-05-29 02:26:15
|
On Mon, 28 May 2001, Eric Bezault wrote: > Why not, but I'm a little bit skeptical about having > several definitions in the same --define option. I know, but do you have a better idea? Using the variable name as option brings troubles with reserved option names. How does the parser distinguish between --ise (which is an option) and --ise="foo" (which is a variable definition). > Furthermore, if --define=FOO is the long option > usage, isn't there a short option usage as well such > as -d FOO ? IIRC the GNU standards (and thus get-opt) prohibit values on short-name-options. You can say --foo=bar, but not -f bar. regards, Andreas |
From: Berend de B. <be...@po...> - 2001-05-28 19:22:41
|
Eric Bezault <er...@go...> writes: > So in my opinion you can continue working on XACE because > it will be great to have a portable way to write Xace files > and generate the corresponding compiler-dependent Ace files > easily on demand (or use the Xace files directly if they > are natively supported by Visual Eiffel one day). Yes, generating the correct Ace is very interesting. Currently Ace doesn't do includes (very limited): VE and SE are more powerful in this regard. Groetjes, Berend. (-: |