added uml2cdl from infsec rep

git-svn-id: https://projects.brucker.ch/su4sml/svn/su4sml/trunk@6797 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
Jürgen Doser 2007-08-17 07:00:17 +00:00
parent 174a38ae36
commit 2e62cde0a9
33 changed files with 9742 additions and 0 deletions

View File

@ -0,0 +1,21 @@
Copyright (c) 2007, Regents of the ETH Zurich
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the ETH Zurich nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -0,0 +1,4 @@
.PHONY: doc
doc:
smldoc --showsummary --directory=doc/api --linksource --overview=doc/overview.html src/uml2cdl.cm

View File

@ -0,0 +1,51 @@
uml2cdl - A converter from uml activity diagrams to WS-CDL
Copyright (C) 2005 Achim D. Brucker, Jürgen Doser and Burkhart Wolff
uml2cdl is free software; you can redistribute it and/or modify
it under the terms stated in LICENCE.TXT (BSD Licence)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Comments are welcome
Achim D. Brucker <brucker@inf.ethz.ch>
Jürgen Doser <doserj@inf.ethz.ch>
Burkhart Wolff <burhart.wolff@inf.ethz.ch>
Overview:
- src/ contains the main sml-sources for the converter. If you have
mlton installed, try typing 'make uml2cdl' or 'make uml2cdl-cygwin'
in the src/ directory. If you are using SML/NJ, try typing
'CM.make "uml2cdl.cm"' in you sml environment. If you are using
some other ML system, try typing 'use "ROOT.ML"'
- lib/ contains libraries that are needed for building uml2cdl. One
dependency is 'su4sml', an sml library for working with .xmi
files that is being developed internally in the contexts of work on
Model-Driven Security and Isabelle/HOL-OCL.
The other dependency is 'fxp', a functional xml parser written in
sml, on top of which su4sml implements parsing of .xmi files.
- doc/ contains preliminary documentation for uml2cdl. Build it by
typing 'latex cdl-profile.tex'
- examples/ contains some example files for testing the functionality
of uml2cdl.
- contrib/ contains additional files that may be useful for actually
using uml2cdl. Most notably it contains 'Uml2CdlClient.java',
which shows how one can use the uml2cdl functionality from
Java-code by using (local or remote) socket communication. This
assumes that 'inetd' is running on the respective machine and has
been configured to execute 'uml2cdl' on connects to the specified
port.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,14 @@
public class Uml2Cdl
{
static {
System.loadLibrary("uml2cdl");
}
public static native int uml2cdl( String input_file_name, String output_file_name );
public static void main( String args[] )
{
uml2cdl("input.xmi","output.xmi");
}
}

View File

@ -0,0 +1,48 @@
import java.net.*;
import java.io.*;
public class Uml2CdlClient{
public static void main(String[] args) throws Exception{
if (args.length != 1){
System.out.println("Usage: java Uml2CdlClient <XMI>");
System.exit(0);
}
//open a socket and corresponding input and output streams
Socket s = new Socket("lennox",443);
BufferedOutputStream buf_sock_out
= new BufferedOutputStream(s.getOutputStream());
BufferedInputStream buf_sock_ins
= new BufferedInputStream(s.getInputStream());
//read a file and write it on the socket
BufferedInputStream buf_infile
= new BufferedInputStream(new FileInputStream(args[1]));
byte[] b = new byte[1000];
int i ;
while((i = buf_infile.read(b,0,1000)) != -1){
buf_sock_out.write(b,0,i);
}
buf_sock_out.flush();
//if we close the stream, as it will also close the socket.
//therefore we just "close" the output half of the socket
s.shutdownOutput();
//read result from socket and print on stdout
try {
while(!s.isClosed() &&
(i = buf_sock_ins.read(b,0,1000)) != -1){
System.out.write(b,0,i);
System.out.flush();
}
//we catch the socketexception, because the server just shuts down
//the connection after he has sent everything...
} catch (SocketException msg){}
buf_sock_ins.close();
}
}

View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include "uml2cdl-smlffi.h"
#include "uml2cdl-jni.h"
/* void f(char * i,char* o){
uml2cdl(i,o);
}
*/
JNIEXPORT jint JNICALL Java_Uml2Cdl_uml2cdl (JNIEnv * env,jclass b, jstring input,jstring output){
const char* in = (*env)->GetStringUTFChars(env, input, 0);
const char* out = (*env)->GetStringUTFChars(env, output, 0);
uml2cdl(in,out);
return 0;
}

View File

@ -0,0 +1,230 @@
%PDF-1.4
%âãÏÓ
1 0 obj
<<
/Title ()
/Author ()
/Subject ()
/Keywords ()
/Creator (FreeHEP Graphics2D Driver)
/Producer (org.freehep.graphicsio.pdf.PDFGraphics2D Revision: 1.18 )
/CreationDate (D:20051007192754+02'00')
/ModDate (D:20051007192754+02'00')
/Trapped /False
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 4 0 R
/PageMode /UseOutlines
/ViewerPreferences 5 0 R
/OpenAction [6 0 R /Fit]
>>
endobj
5 0 obj
<<
/FitWindow true
/CenterWindow false
>>
endobj
6 0 obj
<<
/Parent 3 0 R
/Type /Page
/Contents 7 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
/Filter [/ASCII85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^'p<j;TWr=u\"sMMq:^b$+%8VjGX_;`]qpAgHC1JHcYoucH[-Vu4RU5+pGh%/rV-!Pfk.S:!q%Ib
T:T[LVW-)VRf8.3oVE)TH]kL4ou`8g4]fRBAc*_oLVn-(ErqSQ'nlUnk$2r+i`3$__gH9J3]_Qpq_LOl
Re<<=2Wu98?7u^uT^#5b%G7gVhG]crfB'?n]DM85F'i3YhH0`e\Q`EIgg!o6DJlM)IJ7UOjiu?+_tE-i
S*J\Gjo+;c26"=)4TG)gHM_Ycr=9sPDr4kfp@WS$rPSTgL[1;&`t6SFePX!Wg&1:,Tus@<(M8)g,kDD.
MJMLT21A_7"7,sh<.Z2R~>
endstream
endobj
8 0 obj
5449
endobj
9 0 obj
<<
/Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding 10 0 R
>>
endobj
10 0 obj
<<
/Type /Encoding
/Differences [0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron /.notdef /Euro /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis]
>>
endobj
3 0 obj
<<
/Parent null
/Type /Pages
/MediaBox [0 0 842 595]
/Resources 11 0 R
/Kids [6 0 R]
/Count 1
>>
endobj
12 0 obj
[/PDF /Text /ImageC]
endobj
13 0 obj
<<
/F1 9 0 R
>>
endobj
14 0 obj
<<
/Alpha1
<<
/ca 1
/CA 1
/BM /Normal
/AIS false
>>
>>
endobj
11 0 obj
<<
/ProcSet 12 0 R
/Font 13 0 R
/ExtGState 14 0 R
>>
endobj
4 0 obj
<<
/Type /Outlines
/First 15 0 R
/Last 15 0 R
>>
endobj
15 0 obj
<<
/Parent 4 0 R
/Title (Page 1 \(untitled\))
/Prev null
/Next null
/Dest [6 0 R /Fit]
>>
endobj
xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000342 00000 n
0000008550 00000 n
0000009022 00000 n
0000000524 00000 n
0000000601 00000 n
0000000690 00000 n
0000006250 00000 n
0000006274 00000 n
0000006409 00000 n
0000008927 00000 n
0000008706 00000 n
0000008747 00000 n
0000008793 00000 n
0000009112 00000 n
trailer
<<
/Size 15
/Root 2 0 R
/Info 1 0 R
>>
startxref
9256
%%EOF

View File

@ -0,0 +1,196 @@
%PDF-1.4
%âãÏÓ
1 0 obj
<<
/Title ()
/Author ()
/Subject ()
/Keywords ()
/Creator (FreeHEP Graphics2D Driver)
/Producer (org.freehep.graphicsio.pdf.PDFGraphics2D Revision: 1.18 )
/CreationDate (D:20051007192639+02'00')
/ModDate (D:20051007192639+02'00')
/Trapped /False
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 4 0 R
/PageMode /UseOutlines
/ViewerPreferences 5 0 R
/OpenAction [6 0 R /Fit]
>>
endobj
5 0 obj
<<
/FitWindow true
/CenterWindow false
>>
endobj
6 0 obj
<<
/Parent 3 0 R
/Type /Page
/Contents 7 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
/Filter [/ASCII85Decode /FlateDecode]
>>
stream
Gb"/,>Ar7S'RnZ;d,XgB::uCGL8$rbF[M(qkaDp../%$o8tsn&>K>FDr;)Ni.>\[K8[adQ2N]+/Aa8dS
G.s$u+le3r%jUB9m)S^/"@I_;O<?If"8?9dn1Rj<9EY"!'V@2h=icr%2pNcuF+/D>r-#Dsme*],_07ii
1@Xg0.71^EMGQW\&Psb!s0@$Gqk&Mr2sdq*%eSS$cKB]0(RNEkp/B'B])7?FQ3W<&g(j<mSl\(5VXu&U
qjZ2/WN%?**rjOG?`k@]#C18;JcS7j,SF(.1'(HCahil4NUnV)9I%?,_&rq:Tia^LAMa`^S3N9)/ukZY
hQXZLm4%sLGFe>[&ri\Z_gbc[HKm=d3at;a-XCo2S[-#Re/nX?U9),#Mm(G[SR;AHr7Un2o@($Y5J-)c
S6+n!?d0'5$f_=%7C\Io;q'UbD(ALkX^D),(;.qqesk3!S$'*h+5`7,@X)':MLL()LkBACp<T?iF7V4[
AZ#C7npj,%M3(;dL1GP@h5&`3\X8s$l/aZnL%oSoW%JQ@S$4sM6@JK?;3c%FJ_aD7Tr[['iLj4*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lEA@^L,X*!ZV=PkIijZ7Idef4APGAl<(ldb9\c2W:'Y:`cAliu8>l,Cou]t`=3
?eLdfk!!@[-^jl2DL6l">m%Pr9M=J0WEl3A^4iO%"+@H/8>D9YUTqp6)=g4gro@T`m/I7(8>H~>
endstream
endobj
8 0 obj
2748
endobj
9 0 obj
<<
/Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding 10 0 R
>>
endobj
10 0 obj
<<
/Type /Encoding
/Differences [0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron /.notdef /Euro /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis]
>>
endobj
3 0 obj
<<
/Parent null
/Type /Pages
/MediaBox [0 0 842 595]
/Resources 11 0 R
/Kids [6 0 R]
/Count 1
>>
endobj
12 0 obj
[/PDF /Text /ImageC]
endobj
13 0 obj
<<
/F1 9 0 R
>>
endobj
14 0 obj
<<
/Alpha1
<<
/ca 1
/CA 1
/BM /Normal
/AIS false
>>
>>
endobj
11 0 obj
<<
/ProcSet 12 0 R
/Font 13 0 R
/ExtGState 14 0 R
>>
endobj
4 0 obj
<<
/Type /Outlines
/First 15 0 R
/Last 15 0 R
>>
endobj
15 0 obj
<<
/Parent 4 0 R
/Title (Page 1 \(untitled\))
/Prev null
/Next null
/Dest [6 0 R /Fit]
>>
endobj
xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000342 00000 n
0000005849 00000 n
0000006321 00000 n
0000000524 00000 n
0000000601 00000 n
0000000690 00000 n
0000003549 00000 n
0000003573 00000 n
0000003708 00000 n
0000006226 00000 n
0000006005 00000 n
0000006046 00000 n
0000006092 00000 n
0000006411 00000 n
trailer
<<
/Size 15
/Root 2 0 R
/Info 1 0 R
>>
startxref
6555
%%EOF

View File

@ -0,0 +1,193 @@
%PDF-1.4
%âãÏÓ
1 0 obj
<<
/Title ()
/Author ()
/Subject ()
/Keywords ()
/Creator (FreeHEP Graphics2D Driver)
/Producer (org.freehep.graphicsio.pdf.PDFGraphics2D Revision: 1.18 )
/CreationDate (D:20051007192703+02'00')
/ModDate (D:20051007192703+02'00')
/Trapped /False
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 4 0 R
/PageMode /UseOutlines
/ViewerPreferences 5 0 R
/OpenAction [6 0 R /Fit]
>>
endobj
5 0 obj
<<
/FitWindow true
/CenterWindow false
>>
endobj
6 0 obj
<<
/Parent 3 0 R
/Type /Page
/Contents 7 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
/Filter [/ASCII85Decode /FlateDecode]
>>
stream
Gb"/,>Ar7S'RnZ;i8]PX/8q8]TdZ#!h6<X@g*YPqMIA2J2g4@W.Q]5F?U%F4,uLNka`1Kg-Ci#=7"42W
4?Vfe,rU@,1I;))Y7Tq+Jj@7!-l@sWE&A$Q_c`'4+lB3N4"".-OFA8VIg>T'ak?;u4M]m$R2%t0^"/&7
^M*sPTS,"l3<[X5kC7'V(jlbuGU\Q!$8;ObK+J"'#K,K+HrXq!5eU]FH(q6SF+]UXo4(G@9Y2]A+ONoi
=rOCg@A:!#6tE92QAVV-aW=NHq/]QN_-on6AJl88&Q$6J&eRJFdl=t0QBqa%m"W)gdL*(L#@>R,?LJ;P
Z!HIkT<^X9&uh4^VIcg>U([qK`],*%=GQ>!Xk97gmSLUU9]BD3ZcAEMi5r0)h7NS%r:'@CO5TS-nDZ3J
[r1;2,QsMHFKO!aQF<*'P=TOpIK'-Z4<H6)dGd2-gl1\?AI'k2$<&&Uie5cuPs9W(?<q53Q.9Vj#YF\I
'i5G[!A(h3HZ=6.mrkBl"!$IEAa@iA<H'':2>(R(5XtHtZn>(e*QNJ1BSY+d\T0tcK(2>f;j*4-_aV>m
F[UqC6\n+P=kjJZb923tq"fBB)Oq7lWP`,ET]Tk'?kb!$>>7=D^b)2\>sQ=?rYFAW0RVu!3k;o8))_,+
h.'WG.NM^;PnAQ,*ZFEZGro;SZs/J72&0!/g0BAJ,F/%\XHaH;\kT&;CT;-]\ZqI?9De$p>?WTp:sQ3:
i,(%gF#PEWPA`c.&&VkC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X1VZ?\mI'T1LA8l^?1lk,uq_Z>Q9)UqJT/pk<T8%7lb'K[G9mC;:AbX/(pTA%EfRP[1(U]*Alg:6^
_u9m.fni-^&-(LpG<2GrB]n>/'MRj5k-r[S27B-4+62#HoC+qd>]#m97`^[uSqlVc9;l$H=2C0iEHU.Y
@_hdO&G9bLS!ZW%CBH@@N^hs\d0P`h:cphq=Y![],gRr&X733")lpb.:3P_5`>O7:X<PRUSDkAUY3-LI
lF7b1.+ZjO0FAduaH\OPW*`dB^-?)#)O/-p3(Y6M8A(?oR*=<1!FKIC2YQk(7Fj=-69Me<$qp?UiZuSK
n`7QNMdu1bdioT]F<DCQ+\!.@ATFE=6L?V._gf"CniSeS;N,09U3TF]l&aG[DchM15,sFk&mO9'jbpbp
@pLJrM52POB1FOb1<Sen("F!1.[A+!2N]EjZb;VR=/`H.q@P=P,J&\cURYf<FA`s,aqR-qBH)5kJSAM<
;;GOfC+I,j.ruX4,=PZIA!S8mAk>N:&_S:h<PE0MbiC)9Z8IuoAKtJk6`*&500Q$\jd)[1[rH\sOI<4D
dTeu&Us6t1m05@;@t[E3Ph)c@EDRI7;3r*`E]':\=(!phJ[^R!BJNi:_8etOrd=YOS1eK\>=i`#^l./>
d5_Kh9WlAcE.=@/s5_'pH9[P27s"1^G'/9r^P6-epQUXFUY<r1Hn!d7q6IQ.Di/lXr"&%JHpR~>
endstream
endobj
8 0 obj
2505
endobj
9 0 obj
<<
/Type /Font
/Subtype /Type1
/Name /F1
/BaseFont /Helvetica
/Encoding 10 0 R
>>
endobj
10 0 obj
<<
/Type /Encoding
/Differences [0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron /.notdef /Euro /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis]
>>
endobj
3 0 obj
<<
/Parent null
/Type /Pages
/MediaBox [0 0 842 595]
/Resources 11 0 R
/Kids [6 0 R]
/Count 1
>>
endobj
12 0 obj
[/PDF /Text /ImageC]
endobj
13 0 obj
<<
/F1 9 0 R
>>
endobj
14 0 obj
<<
/Alpha1
<<
/ca 1
/CA 1
/BM /Normal
/AIS false
>>
>>
endobj
11 0 obj
<<
/ProcSet 12 0 R
/Font 13 0 R
/ExtGState 14 0 R
>>
endobj
4 0 obj
<<
/Type /Outlines
/First 15 0 R
/Last 15 0 R
>>
endobj
15 0 obj
<<
/Parent 4 0 R
/Title (Page 1 \(untitled\))
/Prev null
/Next null
/Dest [6 0 R /Fit]
>>
endobj
xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000342 00000 n
0000005606 00000 n
0000006078 00000 n
0000000524 00000 n
0000000601 00000 n
0000000690 00000 n
0000003306 00000 n
0000003330 00000 n
0000003465 00000 n
0000005983 00000 n
0000005762 00000 n
0000005803 00000 n
0000005849 00000 n
0000006168 00000 n
trailer
<<
/Size 15
/Root 2 0 R
/Info 1 0 R
>>
startxref
6312
%%EOF

View File

@ -0,0 +1,202 @@
%PDF-1.4
%âãÏÓ
1 0 obj
<<
/Title ()
/Author ()
/Subject ()
/Keywords ()
/Creator (FreeHEP Graphics2D Driver)
/Producer (org.freehep.graphicsio.pdf.PDFGraphics2D Revision: 1.18 )
/CreationDate (D:20050930123004+02'00')
/ModDate (D:20050930123004+02'00')
/Trapped /False
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 4 0 R
/PageMode /UseOutlines
/ViewerPreferences 5 0 R
/OpenAction [6 0 R /Fit]
>>
endobj
5 0 obj
<<
/FitWindow true
/CenterWindow false
>>
endobj
6 0 obj
<<
/Parent 3 0 R
/Type /Page
/Contents 7 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
/Filter [/ASCII85Decode /FlateDecode]
>>
stream
Gb"/+D3*F0')q<+To[e9AGK!*-jm=UH9fjlD7YK(/W+#rFZ/Z5]nt@q,5Lmj_\\H@-!AN=\#EGKY`aaY
R3BNe5"!b1e4An9`Sa*cHk8tKX155]D07_NR:5@)bh*i:.t=ZQhQ_<R4o9N5SpgIslHSWf?<uIa$EVrd
a.&FqNZqAT/0YB0,.M7rImG`krgJ]/>H%89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
/Differences [0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron /.notdef /Euro /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis]
>>
endobj
3 0 obj
<<
/Parent null
/Type /Pages
/MediaBox [0 0 842 595]
/Resources 11 0 R
/Kids [6 0 R]
/Count 1
>>
endobj
12 0 obj
[/PDF /Text /ImageC]
endobj
13 0 obj
<<
/F1 9 0 R
>>
endobj
14 0 obj
<<
/Alpha1
<<
/ca 1
/CA 1
/BM /Normal
/AIS false
>>
>>
endobj
11 0 obj
<<
/ProcSet 12 0 R
/Font 13 0 R
/ExtGState 14 0 R
>>
endobj
4 0 obj
<<
/Type /Outlines
/First 15 0 R
/Last 15 0 R
>>
endobj
15 0 obj
<<
/Parent 4 0 R
/Title (Page 1 \(untitled\))
/Prev null
/Next null
/Dest [6 0 R /Fit]
>>
endobj
xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000342 00000 n
0000006264 00000 n
0000006736 00000 n
0000000524 00000 n
0000000601 00000 n
0000000690 00000 n
0000003964 00000 n
0000003988 00000 n
0000004123 00000 n
0000006641 00000 n
0000006420 00000 n
0000006461 00000 n
0000006507 00000 n
0000006826 00000 n
trailer
<<
/Size 15
/Root 2 0 R
/Info 1 0 R
>>
startxref
6970
%%EOF

View File

@ -0,0 +1,199 @@
%PDF-1.4
%âãÏÓ
1 0 obj
<<
/Title ()
/Author ()
/Subject ()
/Keywords ()
/Creator (FreeHEP Graphics2D Driver)
/Producer (org.freehep.graphicsio.pdf.PDFGraphics2D Revision: 1.18 )
/CreationDate (D:20050930123024+02'00')
/ModDate (D:20050930123024+02'00')
/Trapped /False
>>
endobj
2 0 obj
<<
/Type /Catalog
/Pages 3 0 R
/Outlines 4 0 R
/PageMode /UseOutlines
/ViewerPreferences 5 0 R
/OpenAction [6 0 R /Fit]
>>
endobj
5 0 obj
<<
/FitWindow true
/CenterWindow false
>>
endobj
6 0 obj
<<
/Parent 3 0 R
/Type /Page
/Contents 7 0 R
>>
endobj
7 0 obj
<<
/Length 8 0 R
/Filter [/ASCII85Dec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oding 10 0 R
>>
endobj
10 0 obj
<<
/Type /Encoding
/Differences [0 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /breve /caron /circumflex /dotaccent /hungarumlaut /ogonek /ring /tilde /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /bullet /dagger /daggerdbl /ellipsis /emdash /endash /florin /fraction /guilsinglleft /guilsinglright /minus /perthousand /quotedblbase /quotedblleft /quotedblright /quoteleft /quoteright /quotesinglbase /trademark /fi /fl /Lslash /OE /Scaron /Ydieresis /Zcaron /dotlessi /lslash /oe /scaron /zcaron /.notdef /Euro /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /.notdef /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis]
>>
endobj
3 0 obj
<<
/Parent null
/Type /Pages
/MediaBox [0 0 842 595]
/Resources 11 0 R
/Kids [6 0 R]
/Count 1
>>
endobj
12 0 obj
[/PDF /Text /ImageC]
endobj
13 0 obj
<<
/F1 9 0 R
>>
endobj
14 0 obj
<<
/Alpha1
<<
/ca 1
/CA 1
/BM /Normal
/AIS false
>>
>>
endobj
11 0 obj
<<
/ProcSet 12 0 R
/Font 13 0 R
/ExtGState 14 0 R
>>
endobj
4 0 obj
<<
/Type /Outlines
/First 15 0 R
/Last 15 0 R
>>
endobj
15 0 obj
<<
/Parent 4 0 R
/Title (Page 1 \(untitled\))
/Prev null
/Next null
/Dest [6 0 R /Fit]
>>
endobj
xref
0 16
0000000000 65535 f
0000000016 00000 n
0000000342 00000 n
0000006096 00000 n
0000006568 00000 n
0000000524 00000 n
0000000601 00000 n
0000000690 00000 n
0000003796 00000 n
0000003820 00000 n
0000003955 00000 n
0000006473 00000 n
0000006252 00000 n
0000006293 00000 n
0000006339 00000 n
0000006658 00000 n
trailer
<<
/Size 15
/Root 2 0 R
/Info 1 0 R
>>
startxref
6802
%%EOF

View File

@ -0,0 +1,276 @@
\documentclass[pdftex]{scrartcl}
\usepackage{longtable}
\usepackage{graphicx}
\title{\umlToCdl~System Description \\ Version 1.0}
\author{J\"urgen Doser and Burkhart Wolff\footnote{This work is part of the EU-funced TrustCom Project
\texttt{http://www.eu-trustcom.com/}}}
\date{}
\newcommand{\st}[1]{\texttt{<<#1>>}}
\newcommand{\xml}[1]{\texttt{<#1>} \ldots \texttt{</#1>}}
\newcommand{\umlToCdl}{\texttt{UML2CDL}}
\newcommand{\cdl}{\texttt{CDL}}
\begin{document}
\maketitle
\section{Introduction}
\umlToCdl\ converts a UML model into the XML-based \emph{Choreography
Description Language} \cdl~\cite{cdl} describing the interaction of
distributed processes occuring in web-based services. Since \cdl\
can be compiled to BPEL4WS~\cite{bpel05,qiu05} which can be
interpreted by BPEL-engines directly, \umlToCdl\ is the front-end of a
tool-chain allowing for the abstract description of (some aspects of)
web-based services following the \emph{model-driven architecture}
(MDA) approach.
This system description serves several purposes:
\begin{enumerate}
\item We describe the principle format of the supported UML model
(essentially consisting of a class diagram and a collection of
associated activity graphs),
\item we describe the principles of the translation,
\item we add a list of known restictions and don't do's necessary for
the practical handling of \umlToCdl, and
%\item we will outline some future extensions of our tool.
\end{enumerate}
\section{The Structure of input \umlToCdl\ Models}
A UML Model that can be processed by \umlToCdl\ must have the
following structure:
\begin{enumerate}
\item it must have a class model (the \emph{base model}), defining the
information types, partners, roles and relationships,
\item a number of activity graphs may be associated to classes of this
model, describing the actual choreographies,
%\item \ldots
\end{enumerate}
\subsection{Example: SAC}
For the SAC example, the class model is given in
Figure~\ref{fig:SAC-class-model}.
\begin{figure}
\centering
\includegraphics[scale=0.9,angle=90]{SAC_static_model.pdf}
\caption{Class model for SAC}
\label{fig:SAC-class-model}
\end{figure}
The actual dynamic behavior of the choreography is given in
Figure~\ref{fig:SAC-chor-model}
\begin{figure}
\centering
\includegraphics[trim=200 0 0 0]{SAC_chor_model.pdf}
\caption{Choreography for SAC}
\label{fig:SAC-chor-model}
\end{figure}
\subsection{Example: SAC2}
For the SAC2 example, the class model is given in
Figures~\ref{fig:SAC2-participants} and \ref{fig:SAC2-relationships}.
Note that the example is not yet fully modeled: the second parallel
activity is not complete. But it shows how to model parallel
activities.
\begin{figure}
\centering
\includegraphics[scale=0.85,angle=90]{SAC2-participants.pdf}
\caption{The participants in SAC2}
\label{fig:SAC2-participants}
\end{figure}
\begin{figure}
\centering
\includegraphics[scale=0.85,angle=90]{SAC2-relationships.pdf}
\caption{the relationships in SAC2}
\label{fig:SAC2-relationships}
\end{figure}
The actual dynamic behavior of the choreography is given in
Figure~\ref{fig:SAC2-chor-model}
\begin{figure}
\centering
\includegraphics[trim=200 0 0 0]{SAC2-chor-model.pdf}
\caption{Choreography for SAC2}
\label{fig:SAC2-chor-model}
\end{figure}
\newpage
\section{The Translation}
\umlToCdl\ is implemented in SML and includes a particular package
called fxp~\cite{fxp} for the XML processing. SML is a functional
programming language with a strong type system supporting parametric
polymorphism, parameterized modules (functors), pattern matching and
higher-order functions. As such, it is particularly suited for
symbolic computations and the flexible construction of compilers.
Although developped internally with the SML implementation SML/NJ
110.52~\cite{njml}, \umlToCdl\ has been cross-compiled via the SML
compiler MLton\cite{mlton} to ANSI-C. On this basis, an \texttt{.exe}
binary
%as well as \texttt{.dll} libraries
has been generated to be used in the TrustCom system architecture on
Windows platforms using the cygwin environment.
\footnote{Acknowledgements to Achim Brucker who contributed to this
part of our build process.}
\umlToCdl\ consists of three phases:
\begin{enumerate}
\item a generic XML-parser based on fxp,
\item a component converting the parsed XML-tree into
an abstract syntax for XMI following the UML 1.4
standard (as supported by Poseidon 3.1, see below).
\item a component converting the XMI representation into
\cdl.
\end{enumerate}
In the following, we focus on key elements of the translation of
the XMI into CDL.
\begin{longtable}{p{5cm}|p{4.5cm}|p{5.5cm}}
\textbf{UML Model Element with Stereotype}& \textbf{WS-CDL Element} &
\textbf{Remark} \\\hline\hline
Package \st{CDL.Package} & \xml{package} &
attribute \texttt{name} is taken from the name of the package,
attributes \texttt{author}, \texttt{version} and
\texttt{targetNamespace} can be specified using tagged values
\texttt{CDL.author}, \texttt{CDL.version} and
\texttt{CDL.targetNamespace} \\\hline
Class \st{CDL.InformationType} & \xml{informationType} &
%I'm not sure if we really have to model them explicitely, or if we
%can derive them from the types of the attributes/variables in the
%choreography. This is related to the question of how do we handle
%tokens, and token locators.
attribute \texttt{exceptionType} is taken from the tagged value
\texttt{CDL.exceptionType}. The attribute \texttt{type}
(resp. \texttt{element} is \emph{currently} taken from the tagged
value \texttt{CDL.type} (resp. \texttt{CDL.element}). We can
discuss to use class attributes with names \texttt{type} or
\texttt{element} instead, whose types corresponds to classes in
another package describing the WSDL or some SML Schema.
\\\hline
Class \st{CDL.Token} & \xml{token}
& the information type of the token is given by the attribute with
name \texttt{informationType}\\
\\\hline
Class \st{CDL.ChannelType} & \xml{channelType}
& the role of a channel is given by an association, the reference
type by the attribute with name \texttt{reference}. the
\texttt{identity} and \texttt{passing} elements are currently not
supported.
\\\hline
Class \st{CDL.RoleType} & \xml{roleType} &
the behaviors of a roletype are specified using realisations of
interfaces. \\\hline
AssociationClass \st{CDL.RelationshipType} & \xml{relationshipType} &
the roles in a relationship are given by the classes/roletypes
connected to this association class\\\hline
Class \st{CDL.ParticipantType} & \xml{participantType} &
the roletypes of a participant type are specified using composite
aggregations from the participant type to the role type\\\hline
Class \st{CDL.Choreography} & \xml{choreography} &
The attribute \texttt{complete}, \texttt{isolation}, \texttt{root},
and \texttt{coordination} can be specified using the tagged
values \texttt{CDL.complete}, \texttt{CDL.isolation},
\texttt{CDL.root} and \texttt{CDL.coordination}. The variables
(both informationtype and channeltype) used in the choreography are
specified using attributes of the respective type. The roletypes of
the variables are specified by the tagged value \texttt{CDL.roletypes}
\\\hline
Interface --- & \xml{behaviour}
& only when realised by a roletype (see above)
\\\hline
Activity \st{CDL.silent} & \xml{silent} & The
partition to which the state belongs defines the roleType. The
description of the silent actions is given by the body of the entry
action, if the language of the entry action expression is either
``documentation'', ``reference'', or ``semantics'' (which are the
possible description types in WS-CDL)
\\\hline
Activity \st{CDL.noAction} & \xml{noAction} & The
partition to which the state belongs defines the roleType.
\\\hline
Activity \st{CDL.request} of \st{CDL.respond} & \xml{send}
& see Objectflow below
\\\hline
Activity \st{CDL.receive} & \xml{receive}
& see Objectflow below
\\\hline
ObjectFlow & \xml{exchange} & the
connected action states are translated to send and receive
activities, a sequence of such objectflows defines an
\xml{interaction}. The name of the variable transfered in the
exchange is given by the name of the objectflow state, the
information type of the exchange is given by the type of the objectflow
state. The action (request resp. response) is given by the stereotype of the send
action -> \texttt{<<CDL.request>>} and \texttt{<<CDL.respond>>}. The
relationshipTye, the channelVariable, and the operation for this
interaction are given by tagged values, the fromRole and the toRole
of the exchange are given by the partition of the send and receive
states (the order depends on whether it is a request or a respond
exchange).
\\ \hline
successive activities & \xml{sequence} &
\\ \hline
Fork Pseudostate & \xml{parallel} & all
subsequent activities up to the matching join pseudostate \\\hline
\end{longtable}
Not every detail of the description above may be currently fully
implemented (see the remarks), but no big obstacle in implementing
them are expected.
The following tables shows major elements that are currently not
implemented at all:
\begin{longtable}{p{5cm}|p{4.5cm}|p{5.5cm}}
\textbf{UML Model Element with Stereotype}& \textbf{WS-CDL Element} &
\textbf{Remark} \\\hline\hline
Activity \st{CDL.perform} & \xml{perform} &
\\\hline
Choice Pseudostate --- & \xml{choice} & \\\hline
\end{longtable}
Furthermore, it is as yet undecided, how to handle workunits and
tokenLocators.
\section{Known Restrictions and Useful Workarounds}
A number of restrictions are imposed on \umlToCdl\ Version 1.0:
\begin{enumerate}
\item the XMI currently must be generated by \emph{Poseidon for UML
3.1-0}, most likely the Community Edition. Support for
Together Designer 2005 may be possible in the future. Support for
Together Control Center or other earlier versions of Borland
Together is unlikely.
\item don't use cut-copy-paste when editing the diagrams: this may
lead to sharings of model-elements and inconsistent XMI output of
Poseidon.
\item since Poseidon 3.1-0 does unfortunately not support
swimlanes/partitions in activity charts, we currently require to
encode them by adding the tagged value \emph{partition} with
a string containing its name.
\item the tool currently does almost no exception handling and input
checking, so it requires some care to provide a model that is
sufficiently consistent to process it.
\end{enumerate}
%\section{Conclusion}
\bibliography{trustcom}
{\small
\sloppy
\bibliographystyle{abbrv}
}
\end{document}

View File

@ -0,0 +1,3 @@
<body>
<center>UML2CDL - a Converter from UML to WS-CDL</center
</body>

View File

@ -0,0 +1,332 @@
@STRING{lncs = "Lecture Notes in Computer Science" }
@Book{ winskel:semantics:1993,
bibkey = { winskel:semantics:1993},
author = {Glynn Winskel},
title = {The Formal Semantics of Programming Languages},
publisher = {MIT Press},
address = {Cambridge, Massachusetts},
pages = 384,
year = 1993
}
@Book{ andrews:introduction:1986,
author = {Peter B. Andrews},
title = {An Introduction to Mathematical Logic and Type Theory: To
Truth Through Proof},
year = 1986,
month = may,
publisher = {Academic Press},
myseries = {Computer Science and Applied Mathematics},
address = {Orlando}
}
@Article{ church:types:1940,
author = {Church, Alonzo},
title = {A formulation of the simple theory of types},
journal = {Journal of Symbolic Logic},
year = 1940,
volume = 5,
pages = {56--68}
}
@Book{ nipkow.ea:isabelle:2002,
author = {Tobias Nipkow and Lawrence C. Paulson and Markus Wenzel},
title = {Isabelle/HOL --- A Proof Assistant for Higher-Order
Logic},
publisher = {Springer},
series = {LNCS},
volume = 2283,
abstract = {This book is a self-contained introduction to interactive
proof in higher-order logic (HOL), using the proof
assistant Isabelle2002. It is a tutorial for potential
users rather than a monograph for researchers. The book has
three parts.
1. Elementary Techniques shows how to model functional
programs in higher-order logic. Early examples involve
lists and the natural numbers. Most proofs are two steps
long, consisting of induction on a chosen variable followed
by the auto tactic. But even this elementary part covers
such advanced topics as nested and mutual recursion. 2.
Logic and Sets presents a collection of lower-level tactics
that you can use to apply rules selectively. It also
describes Isabelle/HOL's treatment of sets, functions and
relations and explains how to define sets inductively. One
of the examples concerns the theory of model checking, and
another is drawn from a classic textbook on formal
languages. 3. Advanced Material describes a variety of
other topics. Among these are the real numbers, records and
overloading. Advanced techniques are described involving
induction and recursion. A whole chapter is devoted to an
extended example: the verification of a security protocol.
},
year = 2002
}
@Article{ nipkow:winskel:1998,
author = {Tobias Nipkow},
title = {Winskel is (almost) Right: Towards a Mechanized Semantics
Textbook},
journal = {Formal Aspects of Computing},
volume = 10,
pages = {171--186},
abstract = {We present a formalization of the first 100 pages of
Winskel's textbook `The Formal Semantics of Programming
Languages' in the theorem prover Isabelle/HOL: 2
operational, 2 denotational, 2 axiomatic semantics, a
verification condition generator, and the necessary
soundness, completeness and equivalence proofs, all for a
simple imperative programming language.},
year = 1998
}
@MastersThesis{ kimmig:red-black:2003,
address = {Freiburg},
author = {Angelika Kimmig},
type = {Studienarbeit},
language = {german},
month = nov,
public = {yes},
school = {Universit\"at Freiburg},
title = {Red-black Trees of smlnj},
year = 2003
}
@PhDThesis{ wenzel:isabelleisar:2002,
author = {Markus M. Wenzel},
title = {Isabelle/Isar --- a versatile environment for
human-readable formal proof documents},
school = {TU M\"unchen},
year = 2002,
abstract = {The basic motivation of this work is to make formal theory
developments with machine-checked proofs accessible to a
broader audience. Our particular approach is centered
around the Isar formal proof language that is intended to
support adequate composition of proof documents that are
suitable for human consumption. Such primary proofs written
in Isar may be both checked by the machine and read by
human-beings; final presentation merely involves trivial
pretty printing of the sources. Sound logical foundations
of Isar are achieved by interpretation within the generic
Natural Deduction framework of Isabelle, reducing all
high-level reasoning steps to primitive inferences.
The resulting Isabelle/Isar system is generic with respect
to object-logics and proof tools, just as pure Isabelle
itself. The full Isar language emerges from a small core by
means of several derived elements, which may be combined
freely with existing ones. This results in a very rich
space of expressions of formal reasoning, supporting many
viable proof techniques. The general paradigms of Natural
Deduction and Calculational Reasoning are both covered
particularly well. Concrete examples from logic,
mathematics, and computer-science demonstrate that the Isar
concepts are indeed sufficiently versatile to cover a broad
range of applications.},
pdf = {papers/2002/wenzel.pdf},
address = {M\"unchen},
month = feb
}
@Article{ grieskamp.ea:instrumenting:2004,
author = {Wolfgang Grieskamp and Nikolai Tillmann and Margus
Veanes},
booktitle = {Third International Conference on Quality Software: QSIC
2003},
title = {Instrumenting scenarios in a model-driven development
environment},
journal = {Information and Software Technology},
year = 2004,
number = 15,
volume = 46,
pages = {1027--1036},
pdf = {papers/2004/grieskamp.ea-instrumenting-2004.pdf},
doi = {10.1016/j.infsof.2004.07.007},
abstract = {SpecExplorer is an integrated environment for model-driven
development of .NET software. In this paper we discuss how
scenarios can be described in SpecExplorer's modeling
language, Spec#, and how the SpecExplorer tool can be used
to validate those scenarios by various means.}
}
@InCollection{ brucker.ea:symbolic:2005,
abstract = {We present a method for the automatic generation of test
cases for HOL formulae containing primitive recursive
predicates. These test cases can be used for the animation
of specifications as well as for black-box testing of
external programs. Our method is two-staged: first, the
original formula is partitioned into test cases by
transformation into a Horn-clause normal form (HCNF).
Second, the test cases are analyzed for instances with
constant terms satisfying the premises of the clauses.
Particular emphasis is put on the control of test
hypotheses and test hierarchies to avoid intractability. We
applied our method to several examples, including AVL-trees
and the red-black tree implementation in the standard
library from SML/NJ. },
keywords = {symbolic test case generations, black box testing, theorem
proving, Isabelle/HOL },
address = {Linz},
author = {Achim D. Brucker and Burkhart Wolff},
booktitle = {Formal Approaches to Testing of Software},
language = {USenglish},
pages = {16--32},
publisher = {Springer-Verlag},
series = lncs,
number = 3395,
editor = {Jens Grabowski and Brian Nielsen},
title = {Symbolic Test Case Generation for Primitive Recursive Functions},
year = 2005
}
@Article{ visser.ea:model:2003,
author = {Willem Visser and Klaus Havelund and Guillaume Brat and
Seungjoon Park and Flavio Lerda},
title = {Model Checking Programs},
journal = {Automated Software Engg.},
volume = 10,
number = 2,
year = 2003,
issn = {0928-8910},
pages = {203--232},
doi = {http://dx.doi.org/10.1023/A:1022920129859},
publisher = {Kluwer Academic Publishers},
address = {Hingham, MA, USA},
pdf = {papers/2003/ase00FinalJournal.pdf}
}
@TechReport{ brucker.ea:hol-testgen:2005,
author = {Achim D. Brucker and Burkhart Wolff},
institution = {ETH Zürich},
language = {USenglish},
month = apr,
title = {{HOL-TestGen} 1.0.0 User Guide},
categories = {testing,holtestgen},
classification= {unrefereed},
keywords = {symbolic test case generations, black box testing, theorem
proving, Isabelle/HOL},
year = 2005,
number = 482,
num_pages = 50
}
@Misc{ imp,
title = {{IMP}},
note = {\url{http://isabelle.in.tum.de/library/HOL/IMP/Denotation.html}}
}
@Misc{ testgen,
title = {{HOL-TestGen}},
note = {\url{http://www.brucker.ch/projects/hol-testgen/}}
}
@TechReport{ plotkin:structural:1981,
author = {Gordon D. Plotkin},
title = {A structural approach to operational semantics},
institution = {Computer Science Department, Aarhus University, Denmark},
year = 1981,
number = {DAIMI FN-19}
}
@InProceedings{ clement.ea:simple:1986,
author = {Dominique Cl\'ement and Thierry Despeyroux and Gilles Kahn
and Jo\"elle Despeyroux},
title = {A simple applicative language: {mini-ML}},
booktitle = {LFP '86: Proceedings of the 1986 ACM conference on LISP
and functional programming},
year = {1986},
pages = {13--27},
location = {Cambridge, Massachusetts, United States},
doi = {http://doi.acm.org/10.1145/319838.319847},
publisher = {ACM Press},
address = {New York, NY, USA},
pdf = {papers/1986/p13-clement.pdf}
}
@InProceedings{ boyapati.ea:korat:2002,
author = {Chandrasekhar Boyapati and Sarfraz Khurshid and Darko
Marinov},
title = {Korat: automated testing based on Java predicates},
booktitle = {Proceedings of the international symposium on Software
testing and analysis},
year = 2002,
pages = {123--133},
location = {Roma, Italy},
abstract = {This paper presents Korat, a novel framework for automated
testing of Java programs. Given a formal specification for
a method, Korat uses the method precondition to
automatically generate all (nonisomorphic) test cases up to
a given small size. Korat then executes the method on each
test case, and uses the method postcondition as a test
oracle to check the correctness of each output.To generate
test cases for a method, Korat constructs a Java predicate
(i.e., a method that returns a boolean) from the method's
pre-condition. The heart of Korat is a technique for
automatic test case generation: given a predicate and a
bound on the size of its inputs, Korat generates all
(nonisomorphic) inputs for which the predicate returns
true. Korat exhaustively explores the bounded input space
of the predicate but does so efficiently by monitoring the
predicate's executions and pruning large portions of the
search space.This paper illustrates the use of Korat for
testing several data structures, including some from the
Java Collections Framework. The experimental results show
that it is feasible to generate test cases from Java
predicates, even when the search space for inputs is very
large. This paper also compares Korat with a testing
framework based on declarative specifications. Contrary to
our initial expectation, the experiments show that Korat
generates test cases much faster than the declarative
framework.},
publisher = {ACM Press},
}
@Misc{cdl,
title = {Web Services Choreography Description Language Version 1.0},
month = {December},
year = 2004,
note = {W3C Working Draft 17},
annote = {http://www.w3.org/TR/2004/WD-ws-cdl-10-20041217/}
}
@Misc{bpel05,
title = {Business Process Execution Language for Web Services},
month = {May},
year = 2003,
note = {Version 1.1 5 May 2003},
annote = {http://www.siebel.com/bpel}
}
@InProceedings{qiu05,
author = {Zongyan Qiu and Shuling Wang and Geguang Pu and Xiangpeng Zhao},
title = {Semantics of BPEL4WS-Like Fault and Compensation Handling},
booktitle = {Formal Methods 2005},
year = 2005,
volume = {LNCS 3582},
month = {July}
}
@Misc{fxp,
author = {Andreas Neumann and Alexandru Berlea},
title = {fxp --- The Functional XML Parser},
note = {http://atseidl2.informatik.tu-muenchen.de/~berlea/Fxp/}
}
@Misc{njml,
author = {Andrew Appel and Matthias Blume and Emden Gansner and Lal George and Lorenz Huelsbergen and David MacQueen and John Reppy and Zhong Shao},
title = {Standard ML of New Jersey},
note = {http://www.smlnj.org/}
}
@Misc{mlton,
title = {The MLton Home Page},
note = {http://mlton.org/}
}

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,46 @@
##
##
#
# program sources
SOURCES=cdl2xml.sml cdl.sml uml2cdl.sml xmi2cdl.sml
#
# basic MLton setup:
MLTON=mlton
#
# setup for compiling and linking dlls
CC_DLL_OPT=-Wl,--add-stdcall-alias -shared
LD_DLL_OPT=-Wl,--add-stdcall-alias -shared -Wl,--export-all-symbols -Wl,--export-all-symbols
DLL_NAME=cyguml2cdl
#
# setp for compiling and linking dynamic libs
CC_SO_OPT= -fPIC
LD_SO_OPT= -shared
SO_NAME=libuml2cdl.0.0.so
#
# system binaries
RM=rm
SH=/bin/sh
#
# compile targets
.PHONY: clean
uml2cdl: uml2cdl.mlb $(SOURCES)
$(MLTON) uml2cdl.mlb
uml2cdl-cygwin: uml2cdl-cygwin.mlb $(SOURCES)
$(MLTON) uml2cdl-cygwin.mlb
$(DLL_NAME): uml2cdl-cygwin.mlb $(SOURCES)
$(MLTON) -codegen c -export-header uml2cdl-smlffi.h \
-output "$(DLL_NAME)"
-cc-opt "$(CC_DLL_OPT)" -link-opt "$(LD_DLL_OPT)" \
uml2cdl-cygwin.mlb
$(SO_NAME): uml2cdl.mlb $(SOURCES)
$(MLTON) -codegen c -export-header uml2cdl-smlffi.h \
-link-opt "-WL,-soname,$(SO_NAME)" -output $(SO_NAME) \
-cc-opt "$(CC_SO_OPT)" -link-opt "$(LD_SO_OPT)" \
uml2cdl.mlb
clean:
$(RM) -f $(DLL_NAME) $(SO_NAME) uml2cdl uml2cdl-cygwin uml2cdl-smlffi.h

View File

@ -0,0 +1,44 @@
(*****************************************************************************
* uml2cdl - a CDL parser using a UML profile
*
* ROOT.ML - main "ROOT.ML" file for uml2cdl
* Copyright (C) 2005 Achim D. Brucker <brucker@inf.ethz.ch>
* Juergen Doser <doserj@inf.ethz.ch>
* Burkhart Wolff <bwolff@inf.ethz.ch>
*
* This file is part of uml2cdl.
*
* su4sml is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* su4sml is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
******************************************************************************)
(* ****************************************************** *)
(* include su4sml library: *)
val curdir = OS.FileSys.getDir ();
OS.FileSys.chDir "../lib/su4sml/src";
use "ROOT.ML";
OS.FileSys.chDir curdir;
(* ****************************************************** *)
(* Representation of a Choreography in WS-CDL *)
use "cdl.sml";
(* ****************************************************** *)
(* Conversion Processes *)
use "xmi2cdl.sml"; (* conversion XMI to CDL *)
(* use "rep2cdl.sml"; (* alternatively, use Rep-datastructures? *) *)
use "cdl2xml.sml"; (* conversion CDL to XML *)
(* use "uml2cdl.sml"; (* main function *) *)

View File

@ -0,0 +1,939 @@
(**
* SML types corresponding to the WS-CDL xml schema.
* also includes some helper functions.
*)
structure CDL =
struct
open XML_Schema
(**
* The CDL description type.
*
*<simpleType name="tDescriptionType">
* <restriction base="string">
* <enumeration value="documentation"/>
* <enumeration value="reference"/>
* <enumeration value="semantics"/>
* </restriction>
* </simpleType>
*
*)
datatype tDescriptionType = documentation | reference | semantics
fun tDescriptionType2String documentation = "documentation"
| tDescriptionType2String reference = "reference"
| tDescriptionType2String semantics = "semantics"
fun tDescriptionTypeFromString "documentation" = documentation
| tDescriptionTypeFromString "reference" = reference
| tDescriptionTypeFromString "semantics" = semantics
| tDescriptionTypeFromString "" = documentation
(* Basically, each type below that extends tExtensibleElements *)
(* should have an additional record field: "description: {_type: tDescriptionType,
content: string }" *)
(* The content of the description is "free-form XML" *)
type tDescription = { description_type: tDescriptionType,
content: string }
(*
<simpleType name="tBoolean-expr">
<restriction base="string"/>
</simpleType>
<simpleType name="tXPath-expr">
<restriction base="string"/>
</simpleType>
*)
type tBoolean_expr = string
type tXPath_expr = string
(*
<simpleType name="tWhenType">
<restriction base="string">
<enumeration value="before"/>
<enumeration value="after"/>
<enumeration value="timeout"/>
</restriction>
</simpleType>
*)
datatype tWhenType = when_before | after | timeout
(*
<simpleType name="tUsage">
<restriction base="string">
<enumeration value="once"/>
<enumeration value="unlimited"/>
</restriction>
</simpleType>
*)
datatype tUsage = once | unlimited
fun tUsage2String once = "once"
| tUsage2String unlimited = "unlimited"
fun tUsageFromString "once" = once
| tUsageFromString "unlimited" = unlimited
(*
<simpleType name="tAction2">
<restriction base="string">
<enumeration value="request"/>
<enumeration value="respond"/>
</restriction>
</simpleType>
*)
datatype tAction2 = request | respond (* conflicts with tAction! *)
(*
<simpleType name="tAction">
<restriction base="string">
<enumeration value="request-respond"/>
<enumeration value="request"/>
<enumeration value="respond"/>
</restriction>
</simpleType>
*)
datatype tAction = request | respond | request_respond (* conflicts with tAction2 *)
fun tAction2String request = "request"
| tAction2String respond = "respond"
| tAction2String request_respond = "request-respond"
fun tActionFromString "request" = request
| tActionFromString "respond" = respond
| tActionFromString "request-respond" = request_respond
(*
<complexType name="tFinalizerReference">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="choreographyName" type="NCName" use="required"/>
<attribute name="choreographyInstanceId" type="cdl:tXPath-expr"
use="optional"/>
<attribute name="finalizerName" type="NCName" use="optional"/>
</extension>
</complexContent>
</complexType>
*)
type tFinalizerReference = {choreographyName: NCName,
choreographyInstanceId: tXPath_expr option,
finalizerName: NCName}
(*
<complexType name="tVariableRef">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="variable" type="cdl:tXPath-expr"
use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tVariableRef = {variable: tXPath_expr}
(*
<complexType name="tSourceVariableRef">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="variable" type="cdl:tXPath-expr"
use="optional"/>
<attribute name="expression" type="cdl:tXPath-expr"
use="optional"/>
</extension>
</complexContent>
</complexType>
*)
type tSourceVariableRef = {variable: tXPath_expr,
expression: tXPath_expr}
(*
<complexType name="tCopy">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="source" type="cdl:tSourceVariableRef"/>
<element name="target" type="cdl:tVariableRef"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="causeException" type="boolean"
use="optional" default="false"/>
</extension>
</complexContent>
</complexType>
*)
type tCopy = {name: NCName,
causeException: bool option,
source: tSourceVariableRef ,
target: tVariableRef }
(*
<complexType name="tRecord">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="source" type="cdl:tSourceVariableRef"/>
<element name="target" type="cdl:tVariableRef"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="causeException" type="boolean" use="optional" default="false"/>
<attribute name="when" type="cdl:tWhenType" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tRecord = {name: NCName,
causeException: bool option,
when: tWhenType}
(*
<complexType name="tVariableRecordRef">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="variable" type="cdl:tXPath-expr"
use="optional"/>
<attribute name="recordReference" use="optional">
<simpleType>
<list itemType="NCName"/>
</simpleType>
</attribute>
<attribute name="causeException" type="boolean"
use="optional" default="false"/>
</extension>
</complexContent>
</complexType>
*)
type tVariableRecordRef = {variable: tXPath_expr option,
recordReference: NCName list,
causeException: bool option}
(*
<complexType name="tExchange">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="send" type="cdl:tVariableRecordRef"/>
<element name="receive" type="cdl:tVariableRecordRef"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="informationType" type="QName"
use="optional"/>
<attribute name="channelType" type="QName"
use="optional"/>
<attribute name="action" type="cdl:tAction2" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tExchange = {name: NCName,
informationType: QName option,
channelType: QName option,
action: tAction,
send: tVariableRecordRef,
receive: tVariableRecordRef}
(*
</complexType>
<complexType name="tParticipate">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="relationshipType" type="QName" use="required"/>
<attribute name="fromRole" type="QName" use="required"/>
<attribute name="toRole" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tParticipate = {relationshipType: QName,
fromRole: QName,
toRole: QName}
(*
<complexType name="tTimeout">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="time-to-complete" type="cdl:tXPath-expr" use="required"/>
<attribute name="fromRoleRecordReference" use="optional">
<simpleType>
<list itemType="NCName"/>
</simpleType>
</attribute>
<attribute name="toRoleRecordReference" use="optional">
<simpleType>
<list itemType="NCName"/>
</simpleType>
</attribute>
</extension>
</complexContent>
</complexType>
*)
type tTimeout = {time_to_complete: tXPath_expr,
fromRoleRecordReference: NCName list option, (* hmpf *)
toRoleRecordReference: NCName list option (* hmpf *)
}
(*
<complexType name="tBindVariable">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="variable" type="cdl:tXPath-expr"
use="required"/>
<attribute name="role" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tBindVariable = {variable: tXPath_expr,
role: QName}
(*
<complexType name="tBind">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="this" type="cdl:tBindVariable"/>
<element name="free" type="cdl:tBindVariable"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tBind = {name:NCName,
this: tBindVariable,
free: tBindVariable}
(*
<complexType name="tVariable">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="name" type="NCName" use="required"/>
<attribute name="informationType" type="QName"
use="optional"/>
<attribute name="channelType" type="QName" use="optional"/>
<attribute name="mutable" type="boolean" use="optional"
default="true"/>
<attribute name="free" type="boolean" use="optional"
default="false"/>
<attribute name="silent" type="boolean" use="optional"
default="false"/>
<attribute name="roleTypes" use="optional">
<simpleType>
<list itemType="QName"/>
</simpleType>
</attribute>
</extension>
</complexContent>
</complexType>
*)
type tVariable = {name: NCName,
informationType: QName option,
channelType: QName option,
mutable: bool option,
free: bool option,
silent: bool option,
roleTypes: QName option}
(*
<complexType name="tRelationshipRef">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="type" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tRelationshipRef = QName
(*
<complexType name="tVariableDefinitions">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="variable" type="cdl:tVariable"
maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
*)
type tVariableDefinitions = tVariable list
(*
<group name="activity">
<choice>
<element name="sequence" type="cdl:tSequence"/>
<element name="parallel" type="cdl:tParallel"/>
<element name="choice" type="cdl:tChoice"/>
<element name="workunit" type="cdl:tWorkunit"/>
<element name="interaction" type="cdl:tInteraction"/>
<element name="perform" type="cdl:tPerform"/>
<element name="assign" type="cdl:tAssign"/>
<element name="silentAction" type="cdl:tSilentAction"/>
<element name="noAction" type="cdl:tNoAction"/>
<element name="finalize" type="cdl:tFinalize"/>
</choice>
</group>
<complexType name="tSequence">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<group ref="cdl:activity" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="tParallel">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<group ref="cdl:activity" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="tChoice">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<group ref="cdl:activity" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="tWorkunit">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<group ref="cdl:activity"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="guard" type="cdl:tBoolean-expr"
use="optional"/>
<attribute name="repeat" type="cdl:tBoolean-expr"
use="optional"/>
<attribute name="block" type="boolean"
use="optional" default="false"/>
</extension>
</complexContent>
</complexType>
<complexType name="tPerform">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="bind" type="cdl:tBind"
minOccurs="0" maxOccurs="unbounded"/>
<element name="choreography" type="cdl:tChoreography"
minOccurs="0" maxOccurs="1"/>
</sequence>
<attribute name="choreographyName" type="QName" use="required"/>
<attribute name="choreographyInstanceId" type="cdl:tXPath-expr" use="optional"/>
</extension>
</complexContent>
</complexType>
<complexType name="tInteraction">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="participate" type="cdl:tParticipate"/>
<element name="exchange" type="cdl:tExchange" minOccurs="0"
maxOccurs="unbounded"/>
<element name="timeout" type="cdl:tTimeout" minOccurs="0"
maxOccurs="1"/>
<element name="record" type="cdl:tRecord" minOccurs="0"
maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="channelVariable" type="QName"
use="required"/>
<attribute name="operation" type="NCName" use="required"/>
<attribute name="align" type="boolean" use="optional"
default="false"/>
<attribute name="initiate" type="boolean"
use="optional" default="false"/>
</extension>
</complexContent>
</complexType>
<complexType name="tAssign">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="copy" type="cdl:tCopy"
maxOccurs="unbounded"/>
</sequence>
<attribute name="roleType" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
<complexType name="tSilentAction">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="roleType" type="QName" use="optional"/>
</extension>
</complexContent>
</complexType>
<complexType name="tNoAction">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="roleType" type="QName" use="optional"/>
</extension>
</complexContent>
</complexType>
<complexType name="tFinalize">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="finalizerReference" type="cdl:tFinalizerReference"
maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
(*
<complexType name="tChoreography">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="relationship" type="cdl:tRelationshipRef"
maxOccurs="unbounded"/>
<element name="variableDefinitions"
type="cdl:tVariableDefinitions" minOccurs="0"/>
<element name="choreography" type="cdl:tChoreography"
minOccurs="0" maxOccurs="unbounded"/>
<group ref="cdl:activity"/> (* what is this??? *)
<element name="exceptionBlock" type="cdl:tException"
minOccurs="0"/>
<element name="finalizerBlock" type="cdl:tFinalizer"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="complete" type="cdl:tBoolean-expr"
use="optional"/>
<attribute name="isolation" type="boolean"
use="optional" default="false"/>
<attribute name="root" type="boolean" use="optional"
default="false"/>
<attribute name="coordination" type="boolean" use="optional"
default="false"/>
</extension>
</complexContent>
</complexType>
*)
(*
<complexType name="tFinalizer">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="workunit" type="cdl:tWorkunit"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
(*
<complexType name="tException">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="workunit" type="cdl:tWorkunit"
maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
*)
(* mutually recursive datatypes are quite a hassle... *)
datatype tActivity = sequence of tActivity list
| parallel of tActivity list
| choice of tActivity list
| workunit of tWorkunit
| interaction of {name: NCName,
channelVariable: QName,
operation: NCName,
align: bool option,
initiate: bool option,
participate: tParticipate,
exchange: tExchange list,
timeout: tTimeout option,
record: tRecord list
}
| perform of {choreographyName: QName,
choreographyInstanceId: tXPath_expr option,
bind: tBind list,
choreography: tChoreography option}
| assign of {copy: tCopy list,
roleType: QName}
| silentAction of {roleType: QName option,
description: tDescription option}
| noAction of {roleType: QName option}
| finalize of {name: NCName,
finalizerReference: tFinalizerReference list}
and tChoreography = choreography of {name: NCName,
complete: tBoolean_expr option,
isolation: bool option,
root: bool option,
coordination: bool option,
relationship: tRelationshipRef list,
variableDefinitions: tVariableDefinitions,
choreography: tChoreography list,
activity: tActivity,
exceptionBlock: tException list,
finalizerBlock: tFinalizer list
}
and tFinalizer = tfinalizer of {name: NCName,
workunit: tWorkunit list
}
and tException = texception of {name: NCName,
workunit: tWorkunit list
}
withtype tWorkunit = {name: NCName,
guard: tBoolean_expr option,
repeat: tBoolean_expr option,
block: bool option,
activity: tActivity list}
(*
<complexType name="tTokenReference">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="name" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tTokenReference = QName (* this can probably be merged
with the type tReference... *)
(*
<complexType name="tIdentity">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="token" type="cdl:tTokenReference"
minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
*)
type tIdentity = {token: tTokenReference list}
(*
<complexType name="tReference">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="token" type="cdl:tTokenReference"
minOccurs="1" maxOccurs="1"/>
</sequence>
</extension>
</complexContent>
</complexType>
*)
type tReference = {token: tTokenReference}
(*
<complexType name="tPassing">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="channel" type="QName" use="required"/>
<attribute name="action" type="cdl:tAction" use="optional"
default="request"/>
<attribute name="new" type="boolean" use="optional"
default="false"/>
</extension>
</complexContent>
</complexType>
*)
type tPassing = {channel: QName,
action: tAction option,
new: bool option}
(*
<complexType name="tRoleRef3">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="type" type="QName" use="required"/>
<attribute name="behavior" type="NCName" use="optional"/>
</extension>
</complexContent>
</complexType>
*)
type tRoleRef3 = {ref_type: QName,
behavior: NCName option }
(*
<complexType name="tChannelType">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="passing" type="cdl:tPassing" minOccurs="0"
maxOccurs="unbounded"/>
<element name="role" type="cdl:tRoleRef3"/>
<element name="reference" type="cdl:tReference"/>
<element name="identity" type="cdl:tIdentity" minOccurs="0"
maxOccurs="1"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="usage" type="cdl:tUsage" use="optional"
default="unlimited"/>
<attribute name="action" type="cdl:tAction" use="optional"
default="request"/>
</extension>
</complexContent>
</complexType>
*)
type tChannelType = {name: NCName,
usage: tUsage option,
action: tAction option,
passing: tPassing list,
role: tRoleRef3,
reference: tReference,
identity: tIdentity option}
(*
<complexType name="tRoleRef2">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="type" type="QName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tRoleRef2 = {ref_type: QName}
(*
<complexType name="tParticipantType">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="role" type="cdl:tRoleRef2"
maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tParticipantType = {name: NCName,
role: tRoleRef2 list (* hmpf... *)}
(*
<complexType name="tRoleRef">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="type" type="QName" use="required"/>
<attribute name="behavior" use="optional">
<simpleType>
<list itemType="NCName"/>
</simpleType>
</attribute>
</extension>
</complexContent>
</complexType>
*)
type tRoleRef = {ref_type: QName,
behavior: NCName list option (* hmpf... *)
}
(*
<complexType name="tRelationshipType">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="role" type="cdl:tRoleRef" minOccurs="2"
maxOccurs="2"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tRelationshipType = {name: NCName,
role: tRoleRef * tRoleRef
}
(*
<complexType name="tBehavior">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="name" type="NCName" use="required"/>
<attribute name="interface" type="QName" use="optional"/>
</extension>
</complexContent>
</complexType>
*)
type tBehavior = {name: NCName,
interface: QName option
}
(*
<complexType name="tRoleType">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="behavior" type="cdl:tBehavior"
maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tRoleType = {name: NCName,
behavior: tBehavior list
}
(*
<complexType name="tTokenLocator">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="tokenName" type="QName" use="required"/>
<attribute name="informationType" type="QName"
use="required"/>
<attribute name="part" type="NCName" use="optional" />
<attribute name="query" type="cdl:tXPath-expr"
use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tTokenLocator = {tokenName: QName,
informationType: QName,
part: NCName option,
query: tXPath_expr
}
(*
<complexType name="tInformationType">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="name" type="NCName" use="required"/>
<attribute name="type" type="QName" use="optional"/>
<attribute name="element" type="QName" use="optional"/>
<attribute name="exceptionType" type="boolean" use="optional"
default="false" />
</extension>
</complexContent>
</complexType>
*)
type tInformationType = {name: NCName,
information_type: QName option,
element: QName option,
exceptionType: bool option
}
(*
<complexType name="tToken">
<complexContent>
<extension base="cdl:tExtensibleElements">
<attribute name="name" type="NCName" use="required"/>
<attribute name="informationType" type="QName"
use="required"/>
</extension>
</complexContent>
</complexType>
*)
type tToken = { name: NCName,
informationType: QName
}
(*
<complexType name="tPackage">
<complexContent>
<extension base="cdl:tExtensibleElements">
<sequence>
<element name="informationType" type="cdl:tInformationType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="token" type="cdl:tToken" minOccurs="0"
maxOccurs="unbounded"/>
<element name="tokenLocator" type="cdl:tTokenLocator"
minOccurs="0" maxOccurs="unbounded"/>
<element name="roleType" type="cdl:tRoleType" minOccurs="0"
maxOccurs="unbounded"/>
<element name="relationshipType" type="cdl:tRelationshipType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="participantType" type="cdl:tParticipantType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="channelType" type="cdl:tChannelType"
minOccurs="0" maxOccurs="unbounded"/>
<element name="choreography" type="cdl:tChoreography"
minOccurs="0" maxOccurs="unbounded"/>
</sequence>
<attribute name="name" type="NCName" use="required"/>
<attribute name="author" type="string" use="optional"/>
<attribute name="version" type="string" use="optional"/>
<attribute name="targetNamespace" type="anyURI"
use="required"/>
</extension>
</complexContent>
</complexType> *)
type tPackage = {name: NCName,
author: string,
version: string,
targetNamespace: anyURI,
schema: xsdSchema,
informationType: tInformationType list,
token: tToken list,
tokenLocator: tTokenLocator list,
roleType: tRoleType list,
relationshipType: tRelationshipType list,
participantType: tParticipantType list,
channelType: tChannelType list,
choreography: tChoreography list
}
end

View File

@ -0,0 +1,324 @@
(**
* functions for serializing cdl types to xml trees.
*)
structure Cdl2Xml =
struct
open CDL
fun filter_opt_args opt = map (fn (x,y) => (x,valOf y))
(List.filter (fn (x,y) => Option.isSome y) opt)
fun option_to_list (SOME s) = [s]
| option_to_list NONE = nil
(* FIX: empty for now *)
fun tTokenLocator2Xml it = XmlTree.Node (("tokenLocator",[]),[])
fun tPassing2Xml it = XmlTree.Node (("passing",[]),[])
fun tIdentity2Xml it = XmlTree.Node (("identity",[]),[])
fun tException2Xml it = XmlTree.Node (("exceptionBlock",[]),[])
fun tFinalizer2Xml it = XmlTree.Node (("finalizerBlock",[]),[])
fun tRecord2Xml it = XmlTree.Node (("record",[]),[])
fun tFinalizerReference2Xml it = XmlTree.Node (("finalizerReference",[]),[])
fun tTimeout2Xml it = XmlTree.Node (("timeout",[]),[])
fun tSourceVariableRef2Xml (it:tSourceVariableRef) = XmlTree.Node (("source",[("variable",#variable it)]),[])
fun tVariableRef2Xml s (it:tVariableRef) = XmlTree.Node ((s,[("variable",#variable it)]),[])
fun tCopy2Xml (it:tCopy) = XmlTree.Node (("copy",[("name",#name it)]),
[tSourceVariableRef2Xml (#source it),
tVariableRef2Xml "target" (#target it)])
fun tBind2Xml it = XmlTree.Node (("bind",[]),[])
fun tDescription2Xml (it:CDL.tDescription) =
XmlTree.Node (("description",[("type",CDL.tDescriptionType2String (#description_type it))]), [XmlTree.Text (#content it)])
fun tParticipate2Xml (it:CDL.tParticipate) =
XmlTree.Node (("participate",[("relationshipType",#relationshipType it),
("fromRoleTypeRef",#fromRole it),
("toRoleTypeRef",#toRole it)]),[])
fun tRelationshipRef2Xml it = XmlTree.Node (("relationship",[("type",it)]),[])
fun tVariableRecordRef2Xml s (it:CDL.tVariableRecordRef) =
let val opt_args = filter_opt_args [("variable",#variable it),
("causeException",Option.map Bool.toString (#causeException it))]
in XmlTree.Node ((s,opt_args),[])
end
fun tExchange2Xml (it:CDL.tExchange) =
let val opt_args = filter_opt_args [("informationType",#informationType it),
("channelType",#channelType it)]
in
XmlTree.Node (("exchange",[("name",#name it),
("action",CDL.tAction2String (#action it))]
@opt_args),
[tVariableRecordRef2Xml "send" (#send it),
tVariableRecordRef2Xml "receive" (#receive it)])
end
(* FIX: handle optional attribute roleTypes *)
fun tVariable2Xml (it:CDL.tVariable) =
let val opt_args = filter_opt_args [("informationType",#informationType it),
("channelType",#channelType it),
("mutable",Option.map Bool.toString (#mutable it)),
("free",Option.map Bool.toString (#free it)),
("silent",Option.map Bool.toString (#silent it)),
("roleTypes", #roleTypes it)]
in
XmlTree.Node (("variable",[("name",#name it)]@opt_args),[])
end
fun tVariableDefinitions2Xml it = XmlTree.Node (("variableDefinitions",[]),
map tVariable2Xml it)
fun tActivity2Xml (CDL.sequence it) = XmlTree.Node (("sequence",[]),
map tActivity2Xml it)
| tActivity2Xml (CDL.parallel it) = XmlTree.Node (("parallel",[]),
map tActivity2Xml it)
| tActivity2Xml (CDL.choice it) = XmlTree.Node (("choice",[]),
map tActivity2Xml it)
| tActivity2Xml (CDL.workunit it) = tWorkunit2Xml it
| tActivity2Xml (CDL.interaction it) =
let val opt_args = filter_opt_args
[("align",Option.map Bool.toString (#align it)),
("initiate",Option.map Bool.toString (#initiate it))]
in
XmlTree.Node (("interaction",[("name",#name it),
("channelVariable",#channelVariable it),
("operation",#operation it)]@opt_args),
List.concat [[tParticipate2Xml (#participate it)],
map tExchange2Xml (#exchange it),
map tTimeout2Xml (option_to_list (#timeout it)),
map tRecord2Xml (#record it)])
end
| tActivity2Xml (CDL.perform it) =
let val opt_args = filter_opt_args [("choreographyInstanceId",
#choreographyInstanceId it)]
in
XmlTree.Node (("perform",[("choreographyName",#choreographyName it)]@opt_args),
List.concat [map tBind2Xml (#bind it),
map tChoreography2Xml (option_to_list (#choreography it))])
end
| tActivity2Xml (CDL.assign it) =
XmlTree.Node (("assign",[("roleType",#roleType it)]),
map tCopy2Xml (#copy it))
| tActivity2Xml (CDL.silentAction it) =
let val opt_args = filter_opt_args [("roleType",#roleType it)]
in
XmlTree.Node (("silentAction",opt_args), map tDescription2Xml
(option_to_list (#description it)))
end
| tActivity2Xml (CDL.noAction it) =
let val opt_args = filter_opt_args [("roleType",#roleType it)]
in
XmlTree.Node (("noAction",opt_args),[])
end
| tActivity2Xml (CDL.finalize it) =
XmlTree.Node (("finalize",[("name",#name it)]),
map tFinalizerReference2Xml (#finalizerReference it))
and tWorkunit2Xml (it:CDL.tWorkunit) =
let val opt_args = filter_opt_args [("guard",#guard it),
("repeat", #repeat it),
("block", Option.map Bool.toString (#block it))]
in
XmlTree.Node (("workunit",[("name",#name it)]@opt_args),
map tActivity2Xml (#activity it))
end
and tChoreography2Xml ((CDL.choreography it):CDL.tChoreography) =
let val opt_args = filter_opt_args [("complete",#complete it),
("isolation",Option.map Bool.toString (#isolation it)),
("root",Option.map Bool.toString (#root it)),
("coordination",Option.map Bool.toString (#coordination it))]
in
XmlTree.Node (("choreography",[("name",#name it)]@opt_args),
List.concat [map tRelationshipRef2Xml (#relationship it),
[tVariableDefinitions2Xml (#variableDefinitions it)],
map tChoreography2Xml (#choreography it),
[tActivity2Xml (#activity it)],
map tException2Xml (#exceptionBlock it),
map tFinalizer2Xml (#finalizerBlock it)])
end
fun tTokenReference2Xml (it:CDL.tTokenReference) =
XmlTree.Node (("token",[("name",it)]),[])
fun tReference2Xml (it:CDL.tReference) =
XmlTree.Node (("reference",[]), [tTokenReference2Xml (#token it)])
fun tRoleRef32Xml (it:CDL.tRoleRef3) =
let val opt_args = filter_opt_args [("behavior",#behavior it)]
in
XmlTree.Node (("roleType",[("typeRef",#ref_type it)]@opt_args),[])
end
fun tChannelType2Xml (it:CDL.tChannelType) =
let val opt_args = filter_opt_args
[("usage",Option.map CDL.tUsage2String (#usage it)),
("action", Option.map CDL.tAction2String (#action it))]
in
XmlTree.Node (("channelType",[("name",#name it)]),
List.concat [map tPassing2Xml (#passing it),
[tRoleRef32Xml (#role it)],
[tReference2Xml (#reference it)],
map tIdentity2Xml (option_to_list (#identity it))])
end
fun tBehavior2Xml (it:CDL.tBehavior) =
let val opt_args = filter_opt_args [("interface",#interface it)]
in
XmlTree.Node (("behavior",[("name",#name it)]),[])
end
fun tRoleRef22Xml (it:CDL.tRoleRef2) =
XmlTree.Node (("roleType",[("typeRef",#ref_type it)]),[])
fun tParticipantType2Xml (it:CDL.tParticipantType) =
XmlTree.Node (("participantType",[("name",#name it)]),
map tRoleRef22Xml (#role it))
fun tRoleRef2Xml (it:CDL.tRoleRef) =
XmlTree.Node (("roleType",[("typeRef",#ref_type it)]),[])
fun tRelationshipType2Xml (it:CDL.tRelationshipType) =
XmlTree.Node (("relationshipType",[("name",#name it)]),
[tRoleRef2Xml (#1 (#role it)),
tRoleRef2Xml (#2 (#role it))])
fun tToken2Xml (it:CDL.tToken) =
XmlTree.Node (("token",[("name",#name it),
("informationType",#informationType it)]),
[])
fun tRoleType2XML (it:CDL.tRoleType) =
XmlTree.Node (("roleType",[("name",#name it)]),
map tBehavior2Xml (#behavior it))
fun tInformationType2Xml (it:CDL.tInformationType) =
let val opt_args = filter_opt_args [("type",#information_type it),
("element",#element it),
("exceptionType",Option.map Bool.toString (#exceptionType it))]
in
XmlTree.Node (("informationType",[("name",#name it)]@opt_args),
[])
end
fun tPackage2Xml (package:CDL.tPackage) =
XmlTree.Node (("package",[("name",#name package),
("author",#author package),
("version",#version package),
("targetNamespace",#targetNamespace package),
("xmlns","http://www.w3.org/2005/10/cdl"),
("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),
(* SAP seems to use these ones also: *)
("xmlns:cdl2bpelns","http://cdl2bpel.cecka.sap.com"),
("xmlns:choreons","http://unspecified.namespace"), (* ??? *)
("xmlns:xsd","http://www.w3.org/2001/XMLSchema")
]),
List.concat [[XML_Schema2Xml.xsdSchema2Xml (#schema package)],
map tInformationType2Xml (#informationType package),
map tToken2Xml (#token package),
map tTokenLocator2Xml (#tokenLocator package),
map tRoleType2XML (#roleType package),
map tRelationshipType2Xml (#relationshipType package),
map tParticipantType2Xml (#participantType package),
map tChannelType2Xml (#channelType package),
map tChoreography2Xml (#choreography package)])
(* just for testing purposes:
val exampleChoreography = ({name="WP35_CDL",author="Juergen Doser",version="0.01",
targetNamespace="http://eu.trustcom/...",
informationType=[{name="dummy",
information_type=SOME "dummyT",
element=NONE,
exceptionType=NONE}],
token=[{name="customerRef",informationType="xsi:uri"},
{name="designerRef",informationType="xsi:uri"},
{name="analysisRef",informationType="xsi:uri"},
{name="manufacturabilityRef",
informationType="xsi:uri"}],
tokenLocator=[],
roleType=[{name="BPEL_Engine",
behavior=[{name="BPEL_Engine",
interface=NONE}]},
{name="Customer_Negotiation",
behavior=[{name="Customer_Negotiation",
interface=NONE}]},
{name="Design",
behavior=[{name="Design",interface=NONE}]},
{name="Analysis",
behavior=[{name="Analysis",interface=NONE}]},
{name="Manufacturability_Evaluation",
behavior=[{name="Manufacturability_Evaluation",
interface=NONE}]}],
relationshipType=[{name="BPEL_Design",
role=({ref_type="BPEL_Engine",
behavior=NONE},
{ref_type="Design",
behavior=NONE})},
{name="BPEL_Customer",
role=({ref_type="BPEL_Engine",
behavior=NONE},
{ref_type="Customer_Negotiation",
behavior=NONE})},
{name="Design_Analysis",
role=({ref_type="Analysis",
behavior=NONE},
{ref_type="Design",
behavior=NONE})},
{name="Design_Manufacturability",
role=({ref_type="Design",
behavior=NONE},
{ref_type="Manufacturability_Evaluation",behavior=NONE})}],
participantType=[],
channelType=[{name="CustomerChannel",usage=NONE,
action=NONE,passing=[],
role=[{ref_type="Customer_Negotiation",
behavior=NONE}],
reference=[{token={name="customerRef"}}],
identity=nil},
{name="DesignChannel",usage=NONE,
action=NONE,passing=[],
role=[{ref_type="Design",
behavior=NONE}],
reference=[{token={name="designRef"}}],
identity=nil},
{name="AnalysisChannel",usage=NONE,
action=NONE,passing=[],
role=[{ref_type="Analysis",
behavior=NONE}],
reference=[{token={name="analysisRef"}}],
identity=nil},
{name="ManufacturabilityChannel",usage=NONE,
action=NONE,passing=[],
role=[{ref_type="Manufacturability_Evaluation",
behavior=NONE}],
reference=[{token={name="manufacturabilityRef"}}],
identity=nil}],
choreography=[CDL.choreography {name="Negotiation",
complete=NONE,isolation=NONE,
root=NONE,coordination=NONE,
relationship=[],
variableDefinitions=[],
choreography=[],
activity=[],
exceptionBlock=[],
finalizerBlock=[]
}]
})
val test = WriteXmlTree.writeFile "test.cdl" (tPackage2Xml exampleChoreography) *)
end

View File

@ -0,0 +1,16 @@
ann
"warnMatch false"
"allowFFI true"
"sequenceUnit false"
"allowExport true"
in
local
$(MLTON_ROOT)/basis/basis.mlb
../lib/su4sml/src/su4sml-cygwin.mlb
in
cdl.sml
xmi2cdl.sml
cdl2xml.sml
uml2cdl.sml
end
end

View File

@ -0,0 +1,12 @@
Group is
#if(defined(SMLNJ_VERSION))
$/basis.cm
$smlnj/compiler/compiler.cm
$/smlnj-lib.cm
#else
#endif
../lib/su4sml/src/su4sml.cm
xsd.sml
cdl.sml
xmi2cdl.sml
cdl2xml.sml

View File

@ -0,0 +1,17 @@
ann
"warnMatch false"
"sequenceUnit false"
"allowFFI true"
in
local
$(MLTON_ROOT)/basis/basis.mlb
$(MLTON_ROOT)/smlnj-lib/Util/smlnj-lib.mlb
../lib/su4sml/src/su4sml.mlb
in
xsd.sml
cdl.sml
xmi2cdl.sml
cdl2xml.sml
uml2cdl.sml
end
end

View File

@ -0,0 +1,29 @@
structure Uml2Cdl =
struct
fun uml2cdl input output = ((WriteXmlTree.writeFile output) o
Cdl2Xml.tPackage2Xml o
Xmi2Cdl.readXMI) input
val uml2cdl_stdout = (WriteXmlTree.writeStdOut o
Cdl2Xml.tPackage2Xml o
Xmi2Cdl.readXMI)
fun main (prog,[a,b]) = uml2cdl a b
| main (prog,[a]) = uml2cdl_stdout a
| main (prog,[]) = uml2cdl_stdout "-"
| main _ = TextIO.output (TextIO.stdOut, "Usage: uml2cdl [INPUT | -] [OUTPUT]\nRead XMI from INPUT (if given), or from stdin (if INPUT=\"-\").\nWrite CDL to OUTPUT (if given), or to stdout.")
(*
val f = _export "uml2cdl": string * string -> unit;
val _ = f (fn (x,y) => uml2cdl x y )
val g = _import "f": unit -> int;
val main = g
*)
end
val _ = Uml2Cdl.main(CommandLine.name (), CommandLine.arguments ())

View File

@ -0,0 +1,555 @@
(**
* functions for parsing xmi into cdl types.
*)
structure Xmi2Cdl :
sig
val transformXMI : XMI.XmiContent -> CDL.tPackage
val readXMI : string -> CDL.tPackage
(* generic exception if something is wrong *)
exception IllFormed of string
end =
struct
open Xmi_IDTable
fun filterClassifiersByStereotype t st list =
List.filter (fn XMI.Class x => List.exists (fn y => find_stereotype t y = st) (#stereotype x)
| XMI.AssociationClass x => List.exists (fn y => find_stereotype t y = st) (#stereotype x)
| _ => false ) list
fun filterInformationType t = filterClassifiersByStereotype t "CDL.InformationType"
fun filterRoleType t = filterClassifiersByStereotype t "CDL.RoleType"
fun filterRelationshipType t = filterClassifiersByStereotype t "CDL.RelationshipType"
fun filterParticipantType t = filterClassifiersByStereotype t "CDL.ParticipantType"
fun filterChannelType t = filterClassifiersByStereotype t "CDL.ChannelType"
fun filterChoreography t = filterClassifiersByStereotype t "CDL.Choreography"
fun filterToken t = filterClassifiersByStereotype t "CDL.Token"
fun mkBehavior (XMI.Interface c) = { name = #name c,
(* FIX: how to specify the WSDL interface? *)
interface = NONE }
handle IllFormed msg => raise IllFormed ("Error in mkBehavior: "^msg^"\n")
(**
* transform a class with stereotype <<CDL.Token>> into a CDL.tToken.
* The information type of the token is given by the attribute with
* the name information type
*)
fun mkToken t (XMI.Class c) =
{ name = #name c,
informationType = getOpt(Option.map (XMI.classifier_name_of o (find_classifier t) o #type_id)
(List.find (fn (x:XMI.Attribute) => #name x = "informationType")
(#attributes c)),"dummyType")}
handle IllFormed msg => raise IllFormed ("Error in mkToken: "^msg^"\n")
(**
* transform a class with Stereotype <<CDL.RoleType>> into a CDL.tRoleType.
* the list of behaviors of the roleType is given by the interfaces it
* realizes
*)
fun mkRoleType t (XMI.Class c) =
{ name= #name c,
behavior = map (mkBehavior o (find_classifier t) o
#supplier o (find_dependency t))
(#clientDependency c)
}
handle IllFormed msg => raise IllFormed ("Error in mkRoleType: "^msg^"\n")
(**
* transform an association class with stereotype <<CDL.RelationshipType>>
* into a CDL.tRelationshipType. The roles participating in this relationship
* are given by the classes participating in the association
*)
fun mkRelationshipType t (XMI.AssociationClass c) =
let val (fst_aend::snd_aend::aends) = #connection c
val fst_name = XMI.classifier_name_of (find_classifier t (#participant_id fst_aend))
val snd_name = XMI.classifier_name_of (find_classifier t (#participant_id snd_aend))
in
{name = #name c,
role = ({ref_type=fst_name,
behavior = NONE},
{ref_type=snd_name,
behavior = NONE})
}
end
handle IllFormed msg => raise IllFormed ("Error in mkRelationshipType: "^msg^"\n")
val mkRelationshipRef = XMI.classifier_name_of
(**
* transform a class with Stereotype <<CDL.ParticipantType>> into a
* CDL.tParticipantType. The roles that identify this participant
* type are given by composite aggregations
*)
fun mkParticipantType t (XMI.Class c) =
let val connected_ids = map #participant_id (find_aends t (#xmiid c))
val connected_names = map (XMI.classifier_name_of o (find_classifier t))
connected_ids
in
{ name = #name c,
role = map (fn x => {ref_type=x}) connected_names }
end
handle IllFormed msg => raise IllFormed ("Error in mkParticipantType: "^msg^"\n")
(**
* transform a class with stereotype <<CDL.ChannelType>> into a
* CDL.tChannelType. the role type is specified by an association,
* the attributes "usage" and "action" are specified by stereotypes
* <<CDL.action>> and <<CDL.usage>>. The reference token is given by
* the type of the attribute with name "reference"
*)
fun mkChannelType t (class as XMI.Class c) =
let val connected_ids = map #participant_id (find_aends t (#xmiid c))
val connected_names = map (XMI.classifier_name_of o (find_classifier t))
connected_ids
in
{name = #name c,
usage = (Option.map CDL.tUsageFromString
(class_taggedvalue_of t "CDL.usage" class)),
action = (Option.map CDL.tActionFromString
(class_taggedvalue_of t "CDL.action" class)),
passing = nil, (* FIX *)
role = {ref_type = hd connected_names,
behavior = NONE}, (* FIX *)
reference = {token = getOpt(Option.map (XMI.classifier_name_of o
(find_classifier t) o #type_id)
(List.find (fn (x:XMI.Attribute) =>
#name x = "reference")
(#attributes c)),
"dummyToken")},
identity = NONE (* FIX *)}
end
handle IllFormed msg => raise IllFormed ("Error in mkChannelType: "^msg^"\n")
(**
* transform an attribute of a classifier into a CDL.tVariable.
* the information type, resp. channel type, is given by the tagged
* value "CDL.InformationType", resp. "CDL.ChannelType". The role
* types are given by the tagged value "CDL.roleTypes". FIX: the
* attributes "mutable" and "silent" should be taken from the
* changeability resp. visibility of the attribute. FIX: the
* attribute "free" should be taken from the tagged value CDL.free
*)
fun mkVariable t (a:XMI.Attribute) =
let val cls = (find_classifier t) (#type_id a)
val st = map (find_stereotype t) (XMI.classifier_stereotype_of cls)
val type_name = XMI.classifier_name_of cls
val rt = attribute_taggedvalue_of t "CDL.roleTypes" a
in
{ name = #name a,
informationType = if List.exists (fn x => x="CDL.InformationType") st
then SOME type_name
else NONE,
channelType = if List.exists (fn x => x="CDL.ChannelType") st
then SOME type_name
else NONE, (* FIX: make informationType and channelType mutually exclusive *)
mutable = NONE, (* FIX: use Changeability *)
free = NONE, (* FIX: use tagged value CDL.free *)
silent = NONE, (* FIX: use VisibilityKind? *)
roleTypes = rt
}
end
handle IllFormed msg => raise IllFormed ("Error in mkVariable: "^msg^"\n")
(**
* transform the given action state with stereotype <<CDL.send>>,
* the subsequent objectflow state, and the subsubsequent action state
* with stereotype <<CDL.receive>> into an exchange
*)
fun mkExchange t ((send_state,objflow_state,receive_state):XMI.StateVertex*XMI.StateVertex*XMI.StateVertex) =
let val obj_name= XMI.state_name_of objflow_state
val obj_type= find_classifierInState_classifier t (XMI.state_type_of objflow_state)
val send_state_st = map (find_stereotype t)
(XMI.state_stereotype_of send_state)
in
{ name = "dummyExchange",
informationType = (Option.map XMI.classifier_name_of
(Option.filter (classifier_has_stereotype t "CDL.InformationType") obj_type)),
channelType = (Option.map XMI.classifier_name_of
(Option.filter (classifier_has_stereotype t "CDL.ChannelType") obj_type)),
action = if List.exists (fn x => x="CDL.request") send_state_st
then CDL.request
else if List.exists (fn x => x="CDL.respond") send_state_st
then CDL.respond
else getOpt(Option.map CDL.tActionFromString
(state_taggedvalue_of t "CDL.action"
send_state),
CDL.request),
send = {variable= SOME ("cdl:getVariable('"^obj_name^"','','')"),
(* state_taggedvalue_of t "CDL.variable" send_state, *)
recordReference = nil,
causeException = Option.mapPartial Bool.fromString (state_taggedvalue_of t "CDL.causeException" send_state)},
receive = {variable= SOME ("cdl:getVariable('"^obj_name^"','','')"),
(* state_taggedvalue_of t "CDL.variable" receive_state, *)
recordReference = nil,
causeException = Option.mapPartial Bool.fromString (state_taggedvalue_of t "CDL.causeException" send_state)}
}
end
handle IllFormed msg => raise IllFormed ("Error in mkExchange: "^msg^"\n")
fun entry_action_body (XMI.ActionState {entry,...}) =
case entry
of SOME (XMI.mk_Procedure {body,...}) => body
(* fun entry_action_body _ = "" *)
(**
* transform a sequence of object flows into a CDL.tInteraction.
* the participating roles are specified by the partition (swimlane)
* of the source and target of the object flow
* the channel variable used is specified by the tagged value
* "CDL.channelVariable" of the first object flow
* the operation is specified by the tagged value "CDL.operation"
*)
fun mkInteraction t (act:CDL.tActivity list) (st:XMI.StateVertex)=
let val stereo = map (find_stereotype t) (XMI.state_stereotype_of st)
val receive = (hd o (successor_states_of t) o
hd o (successor_states_of t)) st
val send_partition = getOpt(state_taggedvalue_of t "partition" st,
"unspecified")
val receive_partition = getOpt(state_taggedvalue_of t "partition" receive,
"unspecified")
val relationship = getOpt(state_taggedvalue_of t "CDL.relationshipType" st,
"unspecified")
val (from,to) = if List.exists (fn x => x = "CDL.respond") stereo
then (receive_partition,send_partition)
else (send_partition,receive_partition)
fun find_successive_exch_states rtype send =
let val objflow = hd (successor_states_of t send)
val receive = hd (successor_states_of t objflow)
val next = hd (successor_states_of t receive)
val stereo = map (find_stereotype t) (XMI.state_stereotype_of next)
in (* check whether there is another exchange following *)
(* this one as part of the same interaction. *)
(* FIX: also check whether the roletypes are the same. *)
(* * if not, we have to start a new interaction *)
if (List.exists (fn x => x = "CDL.send" orelse
x = "CDL.request" orelse
x = "CDL.respond") stereo)
andalso getOpt(state_taggedvalue_of t "CDL.relationshipType" next,
"unspecified") = rtype
then let val (sts,nxt) = find_successive_exch_states rtype next
in ((send,objflow,receive)::sts,nxt)
end
else ([(send,objflow,receive)],next)
end
val (exch_states,next) = find_successive_exch_states relationship st
val state_name = XMI.state_name_of st
val interaction_name = if state_name = "" then
entry_action_body st
else state_name
val operation = getOpt(state_taggedvalue_of t "CDL.operation" st,"")
val op_name = if operation = "" then interaction_name
else operation
in
((CDL.interaction {name = interaction_name,
channelVariable = getOpt(state_taggedvalue_of
t "CDL.channelVariable" st,
"unspecified"),
operation = op_name,
align = (Option.mapPartial
Bool.fromString
(state_taggedvalue_of t "CDL.align" st)),
initiate = (Option.mapPartial
Bool.fromString
(state_taggedvalue_of t "CDL.initiate"
st)),
participate = {relationshipType = relationship,
fromRole = from,
toRole = to},
exchange = map (mkExchange t) exch_states,
timeout = NONE, (* FIX *)
record = nil (* FIX *)
})::act,next)
end
handle IllFormed msg => raise IllFormed ("Error in mkInteraction: "^msg^"\n")
(**
* transform a procedure into an CDL.tDescription
* the description type is take from the language of the procedure,
* the content is taken from the body of the procedure.
*)
fun mkDescription (XMI.mk_Procedure p) =
{description_type = CDL.tDescriptionTypeFromString (#language p),
content = #body p}
handle IllFormed msg => raise IllFormed ("Error in mkDescription: "^msg^"\n")
(**
* transform an Action State with stereotype <<CDL.silent>> into a CDL silent
* action. if the entry action of the action state has language "documentation",
* "reference", or "semantics", the body of the expression will be translated
* into a corresponding description element
*)
fun mkSilentAction t (act:CDL.tActivity list) (st:XMI.StateVertex) =
let val next = hd (successor_states_of t st)
fun isDoc (XMI.mk_Procedure({language="documentation",...})) = true
| isDoc (XMI.mk_Procedure({language="reference",...})) = true
| isDoc (XMI.mk_Procedure({language="semantics",...})) = true
| isDoc _ = true
val doc = Option.mapPartial (Option.filter isDoc) (XMI.state_entry_of st)
in
((CDL.silentAction {roleType = state_taggedvalue_of t "partition" st,
description = Option.map mkDescription doc})::act,
next)
end
handle IllFormed msg => raise IllFormed ("Error in mkSilentAction: "^msg^"\n")
(**
* transform any other Action State into a CDL.noAction.
* FIX: only states withwith Stereotype <<CDL.noAction>> should be transformed.
* All other action states should raise an error.
*)
fun mkNoAction t (act:CDL.tActivity list) (st:XMI.StateVertex) =
let val next = hd (successor_states_of t st)
in
((CDL.noAction {roleType = state_taggedvalue_of t "partition" st })::act,
next)
end
handle IllFormed msg => raise IllFormed ("Error in mkNoAction: "^msg^"\n")
fun mkAssign t (act:CDL.tActivity list) (st:XMI.StateVertex) =
let val next = hd (successor_states_of t st)
in
((CDL.assign { copy = [{name = "undefined", (* FIX *)
causeException = SOME false, (* FIX *)
source = {variable = "cdl:getVariable('"^
(Option.valOf(state_taggedvalue_of t "CDL.source" st))^
"','','')",
expression = "" },
target = {variable = "cdl.getVariable('"^
(Option.valOf(state_taggedvalue_of t "CDL.target" st))^
"','','')"}
}],
roleType = Option.valOf(state_taggedvalue_of t "partition" st )})::act,
next)
end
handle IllFormed msg => raise IllFormed ("Error in mkAssign: "^msg^"\n")
(**
* transforms the activitygraph starting from the given state into a
* list of CDL.tActivity's. All functions called from here return a
* list of CDL.activitys and the next state in the activity graph
* if at the end (when the final state is reached), the activity list
* contains more than one element, the list is wrapped into a sequence
*)
fun mkActivity t (act:CDL.tActivity list) (st:XMI.StateVertex) =
let val stereo = map (find_stereotype t) (XMI.state_stereotype_of st)
fun wrap_up [x] = x
| wrap_up xs = CDL.sequence (rev xs)
val (acts,next) = if List.exists (fn x => x = "CDL.send" orelse
x = "CDL.request" orelse
x = "CDL.respond") stereo
then mkInteraction t act st
else if List.exists (fn x => x = "CDL.silent") stereo
then mkSilentAction t act st
else if List.exists (fn x => x = "CDL.assign") stereo
then mkAssign t act st
else if XMI.state_is_fork st
then mkParallel t act st
(* FIX: there are other types of course *)
else mkNoAction t act st
in
case next of XMI.FinalState _ => (wrap_up acts, next)
| XMI.PseudoState{kind=XMI.join,...} => (wrap_up acts, next)
| _ => mkActivity t acts next
end
handle IllFormed msg => raise IllFormed ("Error in mkActivity: "^msg^"\n")
(**
* transform the parallel action states following this fork state into
* a CDL.parallel activity
*)
and mkParallel t (act:CDL.tActivity list) (st:XMI.StateVertex) =
let val (acts,join::states) = ListPair.unzip (map (mkActivity t [])
(successor_states_of t st))
in
(((CDL.parallel acts)::act),hd (successor_states_of t join))
end
handle IllFormed msg => raise IllFormed ("Error in mkParallel: "^msg^"\n")
(** transforms a class with stereotype <<CDL.Choreography>> into a
* CDL.tchoreography. The attributes complete, isolation, root, and
* coordination are specified by the tagged values CDL.complete,
* CDL.isolation, CDL.root, and CDL.coordination. The relationships
* are specified by associations to classes with stereotype
* <<CDL.RelationshipType>>. VariableDefinitions are given by the
* attributes of the class. Enclosed choreographie definitions are
* specified by composite aggregations to classes with stereotype
* <<CDL.Choreography>>. The activity performed by this choreography
* is specified by the activity graph connected to this class. The
* ExceptionBlock and FinalizerBlocks are specified by assocations with
* stereotype <<CDL.exceptionBlock>> resp. <<CDL.finalizerBlock>> to
* classes with stereotype <<CDL.WorkUnit>> *)
fun mkChoreography t (class as XMI.Class c) =
let val activity_graph = hd (find_activity_graph_of t (#xmiid c))
handle Empty => raise IllFormed "Choreography does not have an activity diagram."
val initial_state = initial_state_of t activity_graph
val first_state = hd (successor_states_of t initial_state)
handle Empty => raise IllFormed "Choreography activity seems to be empty."
val connected_classifiers = map ((find_classifier t) o #participant_id)
(find_aends t (#xmiid c))
val connected_reltypes =
List.filter (fn x => classifier_has_stereotype
t "CDL.RelationshipType" x)
connected_classifiers
in
CDL.choreography {name = #name c,
complete = class_taggedvalue_of t "CDL.complete" class,
isolation = (Option.mapPartial
Bool.fromString
(class_taggedvalue_of t "CDL.isolation"
class)),
root = (Option.mapPartial
Bool.fromString
(class_taggedvalue_of t "CDL.root" class)),
coordination = Option.mapPartial
Bool.fromString
(class_taggedvalue_of
t "CDL.coordination" class),
relationship = map mkRelationshipRef connected_reltypes,
variableDefinitions = (map (mkVariable t)
(#attributes c)),
choreography = [], (* FIX: use composite aggregations *)
activity = #1 (mkActivity t nil first_state),
exceptionBlock = [], (* FIX: use association with stereotype exceptionBlock *)
finalizerBlock = [] (* FIX: use association with stereotype finalizerBlock *)}
end
handle IllFormed msg => raise IllFormed ("Error in mkChoreography: "^msg^"\n")
(* fill as needed... *)
val type_mapping = [("string", "xsd:string"),
("String", "xsd:string"),
("stringType","xsd:string"),
("bool", "xsd:boolean"),
("uri", "xsd:anyURI"),
("uriType", "xsd:anyURI"),
("byte", "xsd:byte")]
fun classifier_name (XMI.Class {name,...}) = name
| classifier_name (XMI.Primitive {name,...}) = name
fun is_predefined_type s = ListEq.includes (map #1 type_mapping) s
fun map_type s = foldl (fn ((from,to),b) => if b=from then to
else b) s type_mapping
fun class2typename s = if is_predefined_type s then map_type s
else s^"Type"
fun mkXsdTypeFromAtt t (att:XMI.Attribute) =
let val class_name = classifier_name (find_classifier t (#type_id att))
in
XML_Schema.SimpleType {name = #name att,
typ = class2typename class_name
}
end
fun mkXsdType t (XMI.Class c) =
XML_Schema.ComplexType {name = (#name c)^"Type",
sequence = map (mkXsdTypeFromAtt t) (#attributes c)
}
(**
* transform a class with stereotype <<CDL.informationType>> into a
* CDL information type. The type is given by the tagged value
* "CDL.type", the element type is given by the tagged value
* "CDL.element". The exception type may (optional) be given by the
* tagged value "CDL.exceptionType"
* FIX: use attributes of class to generate an XML Schema complex type and use that.
*)
fun mkInformationType t (XMI.Class c) =
{name = #name c,
(* was: class_taggedvalue_of t "CDL.type" (XMI.Class c) *)
information_type = SOME (class2typename (#name c)),
element = class_taggedvalue_of t "CDL.element" (XMI.Class c),
exceptionType = Option.mapPartial Bool.fromString (class_taggedvalue_of t "CDL.exceptionType" (XMI.Class c))}
| mkInformationType t (XMI.Primitive c) =
{name = #name c,
(* was: class_taggedvalue_of t "CDL.type" (XMI.Class c) *)
information_type = SOME (class2typename (#name c)),
element=class_taggedvalue_of t "CDL.element" (XMI.Primitive c),
exceptionType = Option.mapPartial Bool.fromString (class_taggedvalue_of t "CDL.exceptionType" (XMI.Primitive c))}
handle IllFormed msg => raise IllFormed ("Error in mkInformationType: "^msg^"\n")
(**
* transform a UML package (model) into a CDL package.
* author, version and targetNamespace of the package may be
* specififed by the tagged values "CDL.author", "CDL.version",
* and "CDL.targetNamespace"
*)
fun mkPackage t (XMI.Package p) =
{name = #name p,
author = getOpt(package_taggedvalue_of t "CDL.author" (XMI.Package p),
"unspecified author"),
version = getOpt(package_taggedvalue_of t "CDL.version" (XMI.Package p),
"unspecified version"),
targetNamespace = getOpt(package_taggedvalue_of
t "CDL.targetNamespace" (XMI.Package p),
"http://unspecified.namespace/"),
schema = { attributeFormDefault = "qualified",
elementFormDefault = "qualified",
targetNamespace = getOpt(package_taggedvalue_of
t "CDL.targetNamespace" (XMI.Package p),
"http://unspecified.namespace/"),
definitions = map (mkXsdType t)
(List.filter (not o is_predefined_type o classifier_name)
(filterInformationType t (#classifiers p)))
},
informationType = map (mkInformationType t)
(filterInformationType t (#classifiers p)),
token = map (mkToken t) (filterToken t (#classifiers p)),
tokenLocator = nil, (* FIX *)
roleType = map (mkRoleType t)
(filterRoleType t (#classifiers p)),
relationshipType = map (mkRelationshipType t)
(filterRelationshipType t (#classifiers p)),
participantType = map (mkParticipantType t)
(filterParticipantType t (#classifiers p)),
channelType = map (mkChannelType t)
(filterChannelType t (#classifiers p)),
choreography = map (mkChoreography t)
(filterChoreography t (#classifiers p))
}:CDL.tPackage
handle IllFormed msg => raise IllFormed ("Error in mkPackage: "^msg^"\n")
(**
* transform the first package (i.e., the top-level model) of an
* xmi-file into a CDL package.
*)
fun transformXMI ({classifiers,constraints,packages,
stereotypes,variable_declarations,state_machines, activity_graphs}) =
let val (xmiid_table: (string,HashTableEntry) HashTable.hash_table) =
HashTable.mkTable (HashString.hashString, (op =)) (101, Option)
(* for some reasons, there are model elements outside of the top-level *)
(* model the xmi-file. So we have to handle them here seperately: *)
val _ = map (insert_classifier xmiid_table nil) classifiers
val _ = map (insert_constraint xmiid_table) constraints
val _ = map (insert_stereotype xmiid_table) stereotypes
val _ = map (insert_variable_dec xmiid_table) variable_declarations
(* "hd packages" is supposed to be the first model in the xmi-file *)
val model = hd packages
handle Empty => raise IllFormed "no model found"
val _ = insert_model xmiid_table model
val _ = map (insert_activity_graph xmiid_table) activity_graphs
val _ = transform_associations xmiid_table model
in
mkPackage xmiid_table model (* FIX: use first package with *)
(* stereotype <<CDL.package>> *)
end
handle XmlTree.IllFormed msg => error ("Warning: "^msg^"\n")
| IllFormed msg => error ("Warning: "^msg^"\n")
(* | _ => error "" *)
(**
* read an xmi-file and transform to CDL.
*)
fun readXMI f = (transformXMI o XmiParser.readFile) f
end

View File

@ -0,0 +1,69 @@
(** very simple structure defining basix xml schema types. *)
structure XML_Schema =
struct
(* for simplicity: *)
(**
* XML namespace NCName.
* the basic grammar is:
* NCName ::= (Letter | '_') (Letter | Digit | '.' | '-' | '_')*
*)
type NCName = string
(**
* XML namespace QName, i.e., a NCName with optionally a namespace prefix.
* the basic grammar is: QName ::= (NCName ':')? NCName
*)
type QName = string
type anyURI = string (* a URI like "http://www.example.com/file.html#id5"*)
type xsdElement = { name : string,
typ : string }
type xsdSequence = xsdElement list
datatype xsdType = SimpleType of xsdElement
| ComplexType of xsdComplexType
withtype xsdComplexType = { name : string,
sequence : xsdType list
}
type xsdSchema = { attributeFormDefault: string,
elementFormDefault: string,
targetNamespace: string,
definitions: xsdType list
}
end
structure XML_Schema2Xml =
struct
open XML_Schema
fun xsdType2Xml (ComplexType ct) =
XmlTree.Node (("xsd:complexType",[("name", #name ct)
]),
[
XmlTree.Node (("xsd:sequence",[]),
map xsdType2Xml (#sequence ct)
)
]
)
| xsdType2Xml (SimpleType st) =
XmlTree.Node (("xsd:element",[("name",#name st),("type",#typ st)]),[])
fun xsdSchema2Xml (schema:xsdSchema) =
XmlTree.Node (("xsd:schema",[("attributeFormDefault",#attributeFormDefault schema),
("elementFormDefault", #elementFormDefault schema),
("targetNamespace", #targetNamespace schema)
]),
map xsdType2Xml (#definitions schema))
end