Różnice

Różnice między wybraną wersją a wersją aktualną.

Odnośnik do tego porównania

Both sides previous revision Poprzednia wersja
Nowa wersja
Poprzednia wersja
pl:miw:miw08_xtt_r2ml [2008/05/30 09:43]
miw
pl:miw:miw08_xtt_r2ml [2019/06/27 15:50] (aktualna)
Linia 1: Linia 1:
 ====== Opis ====== ====== Opis ======
 +__**Projekt zakończony**__
 +
 Tomasz Pałosz - <​tomekpalosz@o2.pl>​ Tomasz Pałosz - <​tomekpalosz@o2.pl>​
  
Linia 12: Linia 14:
  
 ====== Spotkania ====== ====== Spotkania ======
-===== 08.03.04 ===== +[[https://ai.ia.agh.edu.pl/wiki/pl:miw:miw08_xtt_r2ml:spotkania|Spotkania]]
-TODO: +
-  * format reguł r2ml (Lukichev), prr (omg) +
- +
- +
-===== 080318 ===== +
-  * opis [[hekate:​hekate_case_thermostat|thermostatu]] w R2ML +
- +
- +
-===== 080408 ===== +
-  * zgodność zrobionego r2ml z XSD ([[http://oxygen.informatik.tu-cottbus.de/R2ML/0.5/R2ML.xsd.txt|r2ml xmlschema]]!) xmlstarlet, inne +
-  * wizualizacja,​ werbalizacja +
-  * translacja do rif? +
-  * mozliwość uruchomienia na drools? See a //VERY NICE// [[http://​hydrogen.informatik.tu-cottbus.de/​moodle/​course/​enrol.php?​id=24|tutorial]] on the group technologies. Login as //guest//, with key //​RMAI2007//​ +
-  * jak atrybuty które są w r2ml mogą uprościć projekt therm, jak one się maja do atrybutów w [[pl:miw:miw08_xtt_rif|rif]] +
- +
- +
-===== 080422 ===== +
-  * therm osobna strona +
-  * [[hekatedev:xtt_minicases|minicases]] w r2ml +
-  * upload therm do drools + uruchom +
- +
- +
- +
-===== 080429 ===== +
-  * komplet plikow do R2ML w wiki,  w tym xsd i translator -> napisać do Giurca, Werner, cc: gjn +
-  * zestaw uwag po ang. co nie dziala w w.w., email jak wyzej +
-  * jak/czy można dostać urml z r2ml? patrz xmi! +
-  * jak zaimportować słownik do drools? +
- +
- +
- +
- +
-===== 080520 ===== +
-  * translator (uakt. minicases GJN) +
-  * poczytać [[hekate:​xtt]] +
-  * przemyśleć kwestię odwzorowania połączenia?​ [[http://​oxygen.informatik.tu-cottbus.de/​R2ML/​0.5/​metamodel/​R2MLv0.5_files/​png_31.htm|mapowanie do invokeactionexpr?​]] +
-  * mozliwość przejścia z r2ml prodrule do urml? +
- +
-===== 080603 ===== +
-  * sprawozd:  +
-  * ?przejście xttml->​xmi(urml) (prod rules) +
-  * ?przejście r2ml->​xmi(urml) (prod rules)+
  
  
Linia 61: Linia 21:
 ====== Projekt ====== ====== Projekt ======
  
-  * {{:​hekate:​2005_product_derby.pdf|wersja lokalna}} 
-Translacja do RIF: W planach jest taki translator, ale w tej chwili nie ma go jeszcze zaimplementowanego. Atrybuty, z których korzystają oba formaty (RIF i R2ML) w podstawowej wersji są takie same tj. zgodne z rdf oraz xsd. 
  
  
Linia 68: Linia 26:
  
  
-===== URML ===== 
  
 +====== Sprawozdanie ======
  
-URML dziedziczy z R2ML. Oba formaty są w sporej części zgodne (nie w pełni - prace nad pełną zgodnością trwają). Za pomocą programu **Strelka** można uzyskać kod R2ML'a z URML. 
- 
-W związku z dziedziczeniem URML z R2ML mogą wystąpić problemy z przejściem w drugą stronę tj. z R2ML do URML. 
- 
-W szczególnym przypadku reguły ProductionRule da się przekonwertować do URML. 
- 
-  * [[http://​oxygen.informatik.tu-cottbus.de/​rewerse-i1/?​q=URML | URML]] 
-  * [[http://​oxygen.informatik.tu-cottbus.de/​strelka/​URML-Metamodel.htm | Metamodel URML]] 
- 
-Nie znalazłem informacji odnośnie konwertowanych wersji. URML wersja 0.2. R2ML wersja 0.5. 
- 
- 
-==== XTTML -> URML (XMI) ==== 
- 
-To rozwiązanie byłoby wygodne, bo XTTML->​URML->​R2ML. 
- 
-Takie rozwiązanie nie jest możliwe. Sprawdzałem jak Strelka radzi sobie z wykorzystaniem InvokeActionExpression i nie da się tam zrobić wpisania w InvokeActionExpression takich formuł jak ja zaproponowałem. Invoke musi odnosić się do metody klasy. 
- 
-Można ominąć ten problem robiąc metodę o takiej samej nazwie jak klasa (czyli konstruktor domyślny) i odnosić się do niego w InvokeActionExpression. ​ 
- 
- 
- 
- 
- 
- 
- 
-==== R2ML -> URML (XMI) ==== 
- 
-Jest wykonalne. Niestety nie znalazłem żadnego translatora. Nawet zespół, który pracuje nad regułami R2ML nie pisał ich ręcznie tylko generował za pomocą Strelki. Opisują to w swoim postępowaniu przy tworzeniu reguł dla projektu Derby2005. 
- 
-Możliwe jest jednak stworzenie takiego translatora. Sądzę, że byłoby wygodniejsze konwertowanie do URML (XMI dla Strelki) niż konwertowanie do R2ML, gdyż ze Strelki można potem wygenerować R2ML. Reguły nie są skomplikowane. Poniżej zamieszczam najbardziej okrojone reguły jakie udało mi się uzyskać dla prostego przykładu. 
- 
-<code xml> 
-<?xml version="​1.0"​ encoding="​UTF-8"?>​ 
-<xmi:XMI xmi:​version="​2.0"​ xmlns:​xmi="​http://​www.omg.org/​XMI"​ xmlns:​URML="​http:///​URML.ecore"​ xmlns:​notation="​http://​www.eclipse.org/​gmf/​runtime/​1.0.1/​notation"​ xmlns:​uml="​http://​www.eclipse.org/​uml2/​2.1.0/​UML">​ 
-  <​notation:​Diagram xmi:​id="​nD1"​ type="​URML"​ element="​element1"​ measurementUnit="​Pixel">​ 
-    <styles xmi:​type="​notation:​DiagramStyle"​ xmi:​id="​id1"/>​ 
-  </​notation:​Diagram>​ 
-  <​uml:​Package xmi:​id="​element1">​ 
-    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idString"​ name="​String"/>​ 
-    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idBoolean"​ name="​Boolean"/>​ 
-    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idInteger"​ name="​Integer"/>​ 
-    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idFloat"​ name="​Float"/>​ 
-    <​packagedElement xmi:​type="​URML:​ProductionRule"​ xmi:​id="​idPR"​ name="​myPR1">​ 
-      <​conditions xmi:​type="​URML:​ClassificationAtom"​ xmi:​id="​idCA"​ condRule="​idPR"​ filter="​startDate-reservationDate>​=5"​ clazz="​idmyRental"​ classVariable="​myRental"/>​ 
-      <​producedActionExpr xmi:​type="​URML:​AssignVariableActionExpr"​ xmi:​id="​idAE"​ rule="​idPR"​ clazz="​idmyRental"​ actionType="​A"​ classVariable="​myRental"​ statement="​discount=10"/>​ 
-    </​packagedElement>​ 
-    <​packagedElement xmi:​type="​uml:​Class"​ xmi:​id="​idmyRental"​ name="​myRental">​ 
-      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​iddiscount"​ name="​discount"​ type="​idInteger"​ aggregation="​composite"/>​ 
-      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​id_reservationDate"​ name="​reservationDate"​ type="​idInteger"​ aggregation="​composite"/>​ 
-      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​id_startDate"​ name="​startDate"​ type="​idInteger"​ aggregation="​composite"/>​ 
-    </​packagedElement>​ 
-  </​uml:​Package>​ 
-</​xmi:​XMI>​ 
-</​code>​ 
- 
-Przy tak upakowanym kodzie istnieje problem odczytu takiego schematu w programie Strelka. Problem leży w zredukowanym fragmencie "​notation:​Diagram"​. Efekt widoczny poniżej. 
- 
-{{:​pl:​miw:​miw08_xtt_r2ml:​myrental_bad.jpg|Problem interpretacji schematu}} 
-{{:​pl:​miw:​miw08_xtt_r2ml:​myrental_good.jpg|Schemat URML}} 
- 
-Tutaj kod R2ML wygenerowany na za pomocą Strelki z powyższego diagramu. Oczywiście kod w obu przypadkach jest identyczny. 
- 
-<code xml> 
-<?xml version="​1.0"​ encoding="​UTF-8"​ standalone="​yes"?>​ 
-<​r2ml:​RuleBase xsi:​schemaLocation="​http://​oxygen.informatik.tu-cottbus.de/​R2ML/​0.4/​R2ML.xsd"​ xmlns:​dc="​http://​purl.org/​dc/​elements/​1.1/"​ xmlns:​r2mlv="​http://​www.rewerse.net/​I1/​2006/​R2ML/​R2MLV"​ xmlns:​xs="​http://​www.w3.org/​2001/​XMLSchema"​ xmlns:​r2ml="​http://​www.rewerse.net/​I1/​2006/​R2ML"​ xmlns:​soap="​http://​www.w3.org/​2001/​12/​soap-envelope"​ xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance">​ 
-    <​r2mlv:​Vocabulary>​ 
-        <​r2mlv:​Class r2mlv:​ID="​myRental">​ 
-            <​r2mlv:​Attribute r2mlv:​ID="​discount">​ 
-                <​r2mlv:​range>​ 
-                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​ 
-                </​r2mlv:​range>​ 
-            </​r2mlv:​Attribute>​ 
-            <​r2mlv:​Attribute r2mlv:​ID="​reservationDate">​ 
-                <​r2mlv:​range>​ 
-                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​ 
-                </​r2mlv:​range>​ 
-            </​r2mlv:​Attribute>​ 
-            <​r2mlv:​Attribute r2mlv:​ID="​startDate">​ 
-                <​r2mlv:​range>​ 
-                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​ 
-                </​r2mlv:​range>​ 
-            </​r2mlv:​Attribute>​ 
-        </​r2mlv:​Class>​ 
-    </​r2mlv:​Vocabulary>​ 
-    <​r2ml:​ProductionRuleSet>​ 
-        <​r2ml:​ProductionRule r2ml:​ruleID="​myPR1">​ 
-            <​r2ml:​conditions>​ 
-                <​r2ml:​ObjectClassificationAtom r2ml:​classID="​myRental"​ r2ml:​isNegated="​false">​ 
-                    <​r2ml:​ObjectVariable r2ml:​name="​myRental"/>​ 
-                </​r2ml:​ObjectClassificationAtom>​ 
-                <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​greaterThanOrEqual"​ r2ml:​isNegated="​false"​ xmlns:​swrlb="​http://​www.w3.org/​2003/​11/​swrlb">​ 
-                    <​r2ml:​dataArguments>​ 
-                        <​r2ml:​TypedLiteral r2ml:​datatypeID="​xs:​integer"​ r2ml:​lexicalValue="​5"/>​ 
-                        <​r2ml:​DatatypeFunctionTerm r2ml:​datatypeFunctionID="​numeric-substract">​ 
-                            <​r2ml:​dataArguments>​ 
-                                <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​reservationDate">​ 
-                                    <​r2ml:​contextArgument>​ 
-                                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"​ r2ml:​classID="​myRental"/>​ 
-                                    </​r2ml:​contextArgument>​ 
-                                </​r2ml:​AttributeFunctionTerm>​ 
-                                <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​startDate">​ 
-                                    <​r2ml:​contextArgument>​ 
-                                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"​ r2ml:​classID="​myRental"/>​ 
-                                    </​r2ml:​contextArgument>​ 
-                                </​r2ml:​AttributeFunctionTerm>​ 
-                            </​r2ml:​dataArguments>​ 
-                        </​r2ml:​DatatypeFunctionTerm>​ 
-                    </​r2ml:​dataArguments>​ 
-                </​r2ml:​DatatypePredicateAtom>​ 
-            </​r2ml:​conditions>​ 
-            <​r2ml:​producedAction>​ 
-                <​r2ml:​AssignActionExpression r2ml:​propertyID="​discount">​ 
-                    <​r2ml:​contextArgument>​ 
-                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"/>​ 
-                    </​r2ml:​contextArgument>​ 
-                    <​r2ml:​TypedLiteral r2ml:​datatypeID="​xs:​integer"​ r2ml:​lexicalValue="​10"/>​ 
-                </​r2ml:​AssignActionExpression>​ 
-            </​r2ml:​producedAction>​ 
-        </​r2ml:​ProductionRule>​ 
-    </​r2ml:​ProductionRuleSet>​ 
-</​r2ml:​RuleBase>​ 
-</​code>​ 
- 
- 
-===== Odwzorowanie połączeń ===== 
- 
-Moja propozycja to dopisanie na końcu reguły, z której przechodzimy InvokeActionExpression. 
- 
-Przykład 1: "Go to today of date": 
- 
-<code xml> 
- 
-<​r2ml:​InvokeActionExpression r2ml:​operationID="​today">​ 
-  <​r2ml:​contextArgument>​ 
-    <​r2ml:​ObjectVariable r2ml:​name="​date"​ r2ml:​classID="​Date"/>​ 
-  </​r2ml:​contextArgument>​ 
-</​r2ml:​InvokeActionExpression>​ 
- 
-</​code>​ 
- 
- 
-Przykład 2: "​Calculate the total payment of the purchase order":​ 
- 
-<code xml> 
- 
-<​r2ml:​InvokeActionExpression r2ml:​operationID="​totalPayment">​ 
-  <​r2ml:​contextArgument>​ 
-    <​r2ml:​ObjectVariable r2ml:​name="​purchaseOrder"​ r2ml:​classID="​Order"/>​ 
-  </​r2ml:​contextArgument>​ 
-</​r2ml:​InvokeActionExpression>​ 
- 
-</​code>​ 
- 
- 
-====== Sprawozdanie ====== 
  
 XTTML - format, który ma powstać na bazie XTT.  XTT jest tabelarycznym sposobem reprezentacji wiedzy. XTTML - format, który ma powstać na bazie XTT.  XTT jest tabelarycznym sposobem reprezentacji wiedzy.
Linia 332: Linia 134:
  
  
-===== Translacje =====+===== Translacje ​do innych formatów ​=====
 Dostępne są następujące translacje z użyciem języka R2ML: [[http://​oxygen.informatik.tu-cottbus.de/​rewerse-i1/?​q=node/​15]] Dostępne są następujące translacje z użyciem języka R2ML: [[http://​oxygen.informatik.tu-cottbus.de/​rewerse-i1/?​q=node/​15]]
  
Linia 348: Linia 150:
   * R2ML to OCL   * R2ML to OCL
   * OCL to R2ML    * OCL to R2ML 
 +
 +Translacja do RIF: W planach jest taki translator, ale w tej chwili nie ma go jeszcze zaimplementowanego. Atrybuty, z których korzystają oba formaty (RIF i R2ML) w podstawowej wersji są takie same tj. zgodne z rdf oraz xsd.
  
  
Linia 355: Linia 159:
  
 Każdą z poniższych reguł można sprawdzić za pomocą: Każdą z poniższych reguł można sprawdzić za pomocą:
-  * [[http://​oxygen.informatik.tu-cottbus.de/​verbalization/​index.jsp]] +  * [[http://​oxygen.informatik.tu-cottbus.de/​verbalization/​index.jsp ​| werbalizera]] 
-  * [[http://​oxygen.informatik.tu-cottbus.de/​visualization/​v3/​]]+  * [[http://​oxygen.informatik.tu-cottbus.de/​visualization/​v3/ ​| wizualizera]]
  
  
Linia 407: Linia 211:
       </​r2ml:​DatatypePredicateAtom>​       </​r2ml:​DatatypePredicateAtom>​
 </​code>​ </​code>​
 +
 +
  
  
Linia 413: Linia 219:
 ===== Drools ===== ===== Drools =====
  
 +  * {{:​hekate:​2005_product_derby.pdf|wersja lokalna}}
   * [[http://​labs.jboss.com/​drools/​documentation.html]]   * [[http://​labs.jboss.com/​drools/​documentation.html]]
   * [[http://​docs.codehaus.org/​display/​DROOLS/​Home]]   * [[http://​docs.codehaus.org/​display/​DROOLS/​Home]]
Linia 426: Linia 233:
 Przeglądnąłem przykład z biletami, zamiast Vocabulary klasy napisane są w JAVIE pod Eclipsem. Spróbuję na podstawie projektu example stworzyć podobny z klasą Date mającą początkowo atrybuty: day, today, później dodam: time, month, season. Przeglądnąłem przykład z biletami, zamiast Vocabulary klasy napisane są w JAVIE pod Eclipsem. Spróbuję na podstawie projektu example stworzyć podobny z klasą Date mającą początkowo atrybuty: day, today, później dodam: time, month, season.
  
-Umieściłem regułę na drools. Umieściłem także na moim koncie skompilowane klasy wypisane poniżej. Nadal drools wyrzuca błąd. Przeszukałem definicji klas w tym przykładzie z biletami i nie znalazłem nigdzie.+Umieściłem regułę na drools. Umieściłem także na moim koncie skompilowane klasy wypisane poniżej. Nadal drools wyrzuca błąd. Przeszukałem definicji klas w tym przykładzie z biletami i nie znalazłem nigdzie ​problemu.
  
  
Linia 535: Linia 342:
  
 Dodałem te importy, które są w tym przykładzie i spróbowałem skompilować na borgu. Okazuje się, że borg nie posiada tych plików. Można stwierdzić na tej podstawie, że brakuje ich na serwerze. Dodałem te importy, które są w tym przykładzie i spróbowałem skompilować na borgu. Okazuje się, że borg nie posiada tych plików. Można stwierdzić na tej podstawie, że brakuje ich na serwerze.
- 
  
  
Linia 623: Linia 429:
  
 Tej reguły najprawdopodobniej nie da się przedstawić za pomocą języka R2ML. Próbowałem wykorzystać globalną zmienną, która liczyłaby atomy/​termy/​obiekty,​ ale nie za bardzo jest możliwość iteracji po tych elementach. Tej reguły najprawdopodobniej nie da się przedstawić za pomocą języka R2ML. Próbowałem wykorzystać globalną zmienną, która liczyłaby atomy/​termy/​obiekty,​ ale nie za bardzo jest możliwość iteracji po tych elementach.
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
  
  
Linia 707: Linia 501:
  
 </​code>​ </​code>​
- 
- 
- 
- 
- 
  
  
Linia 913: Linia 702:
  
 </​code>​ </​code>​
- 
  
  
Linia 1043: Linia 831:
  
 </​code>​ </​code>​
- 
- 
- 
- 
- 
- 
  
  
Linia 1314: Linia 1096:
 </​r2ml:​RuleBase>​ </​r2ml:​RuleBase>​
 </​code>​ </​code>​
- 
- 
- 
  
  
Linia 1496: Linia 1275:
 </​r2ml:​RuleBase>​ </​r2ml:​RuleBase>​
 </​code>​ </​code>​
- 
  
  
Linia 1503: Linia 1281:
 [[https://​ai.ia.agh.edu.pl/​wiki/​pl:​miw:​miw08_ardcase_cs:​biletomat#​directed_conceptual_design | opis]] [[https://​ai.ia.agh.edu.pl/​wiki/​pl:​miw:​miw08_ardcase_cs:​biletomat#​directed_conceptual_design | opis]]
  
-<code xml> +[[https://ai.ia.agh.edu.pl/wiki/pl:miw:miw08_xtt_r2ml:a2a | zapis za pomocą ​R2ML]]
-<​r2ml:​RuleBase xmlns:​r2ml="​http://www.rewerse.net/​I1/​2006/​R2ML"​ +
-          xmlns:​r2mlv="​http://​www.rewerse.net/I1/2006/​R2ML/​R2MLV"​ +
-          xmlns:xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ +
-          xmlns:xs="​http://​www.w3.org/​2001/​XMLSchema"​  +
-          xmlns:​userv="​http://​www.businessrulesforum.com/​2005/​userv#"​  +
-          xmlns:​swrlb="​http://​www.w3.org/​2003/​11/​swrlb"​ +
-          xsi:​schemaLocation="​http://​oxygen.informatik.tu-cottbus.de/​R2ML/​0.5/​R2ML.xsd">​ +
-  +
- <​r2mlv:​Vocabulary>​  +
-   <​r2mlv:​Class r2mlv:​ID="​Actions">​  +
-    <​r2mlv:​Attribute r2mlv:​ID="​remittance">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-    <​r2mlv:​Attribute r2mlv:​ID="​pricelist">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​string"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-    <​r2mlv:​Attribute r2mlv:​ID="​chosenProduct">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​string"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-   </​r2mlv:​Class>​ +
-  +
-   <​r2mlv:​Class r2mlv:​ID="​Time">​  +
-    <​r2mlv:​Attribute r2mlv:​ID="​startTime">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-    <​r2mlv:​Attribute r2mlv:​ID="​currentTime">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-    <​r2mlv:​Attribute r2mlv:​ID="​outTime">​ +
-      <​r2mlv:​range>​ +
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ +
-      </​r2mlv:​range>​ +
-    </​r2mlv:​Attribute>​ +
-   </​r2mlv:​Class>​+
  
-   <​r2mlv:​Class r2mlv:​ID="​Machine"> ​ 
-    <​r2mlv:​Attribute r2mlv:​ID="​fundsInMachine">​ 
-      <​r2mlv:​range>​ 
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ 
-      </​r2mlv:​range>​ 
-    </​r2mlv:​Attribute>​ 
-    <​r2mlv:​Attribute r2mlv:​ID="​change">​ 
-      <​r2mlv:​range>​ 
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​positiveInteger"></​r2mlv:​Datatype>​ 
-      </​r2mlv:​range>​ 
-    </​r2mlv:​Attribute>​ 
-    <​r2mlv:​Attribute r2mlv:​ID="​enoughCashToChange">​ 
-      <​r2mlv:​range>​ 
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​boolean"></​r2mlv:​Datatype>​ 
-      </​r2mlv:​range>​ 
-    </​r2mlv:​Attribute>​ 
-    <​r2mlv:​Attribute r2mlv:​ID="​activity">​ 
-      <​r2mlv:​range>​ 
-       <​r2mlv:​Datatype r2mlv:​ID="​xs:​boolean"></​r2mlv:​Datatype>​ 
-      </​r2mlv:​range>​ 
-    </​r2mlv:​Attribute>​ 
-   </​r2mlv:​Class>​ 
- </​r2mlv:​Vocabulary>​ 
-  
  
-  <​r2ml:​ProductionRule r2ml:​ruleID="​cash">​ 
-   <​r2ml:​Documentation>​ 
-       <​r2ml:​RuleText r2ml:​textFormat="​plain">​ 
-            Cash 
-       </​r2ml:​RuleText>​ 
-   </​r2ml:​Documentation>​ 
-    <​r2ml:​conditions>​ 
-  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​equal">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​chosenProduct">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​action"​ r2ml:​classID="​Action"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​pricelist"​ r2ml:​datatypeID="​xs:​string"/>​ 
-                <​r2ml:​contextArgument>​ 
-                  <​r2ml:​ObjectVariable r2ml:​name="​action"​ r2ml:​classID="​Action"/>​ 
-                </​r2ml:​contextArgument>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​greaterThan">​ +===== URML ====
-          <​r2ml:​dataArguments>​ + 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​remittance">​ + 
-              <​r2ml:​contextArgument>​ +URML dziedziczy z R2ML. Oba formaty są w sporej części zgodne (nie w pełni - prace nad pełną zgodnością trwają). Za pomocą programu **Strelka** można uzyskać kod R2ML'a z URML. 
-                <​r2ml:​ObjectVariable r2ml:name="​action"​ r2ml:​classID="​Action"/>​ + 
-              </​r2ml:​contextArgument>​ +W związku z dziedziczeniem URML z R2ML mogą wystąpić problemy z przejściem w drugą stronę tj. z R2ML do URML. 
-            </​r2ml:​AttributeFunctionTerm>​ + 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​0"​ r2ml:​datatypeID="​xs:​positiveInteger"/>​ +W szczególnym przypadku reguły ProductionRule da się przekonwertować do URML. 
-          </​r2ml:​dataArguments>​ + 
-        </​r2ml:​DatatypePredicateAtom>​ +  * [[http://oxygen.informatik.tu-cottbus.de/rewerse-i1/?q=URML | URML]] 
-  +  * [[http://oxygen.informatik.tu-cottbus.de/strelka/URML-Metamodel.htm | Metamodel URML]] 
-    </​r2ml:​conditions>​ + 
-  +Nie znalazłem informacji odnośnie konwertowanych wersji. URML wersja 0.2. R2ML wersja 0.5.
-    <​r2ml:​producedAction>​ +
-  +
-      <​r2ml:​AssignActionExpression r2ml:​propertyID="​change">​ +
-       <r2ml:contextArgument>​ +
-        <​r2ml:​ObjectVariable r2ml:​classID="​Machine"​ r2ml:​name="​machine" ​/+
-       </r2ml:​contextArgument> ​         +
-       <​r2ml:​value>​ +
-        <​r2ml:​TypedLiteral r2ml:​lexicalValue="​remittance-pricelist"​ r2ml:​datatypeID="​xs:​positiveInteger">​ +
-          <​r2ml:​contextArgument>​ +
-            <​r2ml:​ObjectVariable r2ml:​classID="​Action"​ r2ml:​name="​action" ​/+
-          </r2ml:​contextArgument> ​ +
-        </​r2ml:TypedLiteral>​ +
-       </r2ml:​value>​ +
-      </r2ml:​AssignActionExpression>​ +
-  +
-      <​r2ml:​InvokeActionExpression r2ml:​propertyID="​enoughFoundsInMachine" ​/+
-      <​r2ml:​InvokeActionExpression r2ml:​propertyID="​activityAll" ​/> +
-  +
-    </​r2ml:​producedAction>​ +
-  </​r2ml:​ProductionRule>​+
  
  
  
-  <​r2ml:​ProductionRule r2ml:​ruleID="​countTime">​ 
-   <​r2ml:​Documentation>​ 
-       <​r2ml:​RuleText r2ml:​textFormat="​plain">​ 
-            countTime 
-       </​r2ml:​RuleText>​ 
-   </​r2ml:​Documentation>​ 
-    <​r2ml:​conditions>​ 
-  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​lessThan">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​startTime">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​time"​ r2ml:​classID="​Time"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​currentTime"​ r2ml:​datatypeID="​xs:​positiveInteger"/>​ 
-                <​r2ml:​contextArgument>​ 
-                  <​r2ml:​ObjectVariable r2ml:​name="​time"​ r2ml:​classID="​Time"/>​ 
-                </​r2ml:​contextArgument>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
-  
-    </​r2ml:​conditions>​ 
-  
-    <​r2ml:​producedAction>​ 
-  
-      <​r2ml:​AssignActionExpression r2ml:​propertyID="​outTime">​ 
-       <​r2ml:​contextArgument>​ 
-        <​r2ml:​ObjectVariable r2ml:​classID="​Time"​ r2ml:​name="​time"​ /> 
-       </​r2ml:​contextArgument> ​         
-       <​r2ml:​value>​ 
-        <​r2ml:​TypedLiteral r2ml:​lexicalValue="​currnetTime-startTime"​ r2ml:​datatypeID="​xs:​positiveInteger">​ 
-          <​r2ml:​contextArgument>​ 
-            <​r2ml:​ObjectVariable r2ml:​classID="​Time"​ r2ml:​name="​time"​ /> 
-          </​r2ml:​contextArgument> ​ 
-        </​r2ml:​TypedLiteral>​ 
-       </​r2ml:​value>​ 
-      </​r2ml:​AssignActionExpression>​ 
-  
-      <​r2ml:​InvokeActionExpression r2ml:​propertyID="​activityAll"​ /> 
-  
-    </​r2ml:​producedAction>​ 
-  </​r2ml:​ProductionRule>​ 
  
  
  
-  <​r2ml:​ProductionRule r2ml:​ruleID="​enoughFoundsInMachine">​ 
-   <​r2ml:​Documentation>​ 
-       <​r2ml:​RuleText r2ml:​textFormat="​plain">​ 
-            enoughFoundsInMachine 
-       </​r2ml:​RuleText>​ 
-   </​r2ml:​Documentation>​ 
-    <​r2ml:​conditions>​ 
-  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​lessThan">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​change">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​machine"​ r2ml:​classID="​Machine"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​fundsInMachine"​ r2ml:​datatypeID="​xs:​positiveInteger"/>​ 
-                <​r2ml:​contextArgument>​ 
-                  <​r2ml:​ObjectVariable r2ml:​name="​machine"​ r2ml:​classID="​Machine"/>​ 
-                </​r2ml:​contextArgument>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
-  
-    </​r2ml:​conditions>​ 
-  
-    <​r2ml:​producedAction>​ 
-  
-      <​r2ml:​AssignActionExpression r2ml:​propertyID="​enoughCashToChange">​ 
-       <​r2ml:​contextArgument>​ 
-        <​r2ml:​ObjectVariable r2ml:​classID="​Machine"​ r2ml:​name="​machine"​ /> 
-       </​r2ml:​contextArgument> ​         
-       <​r2ml:​value>​ 
-        <​r2ml:​TypedLiteral r2ml:​lexicalValue="​true"​ r2ml:​datatypeID="​xs:​boolean"​ /> 
-       </​r2ml:​value>​ 
-      </​r2ml:​AssignActionExpression>​ 
-  
-      <​r2ml:​InvokeActionExpression r2ml:​propertyID="​activityAll"​ /> 
-  
-    </​r2ml:​producedAction>​ 
-  </​r2ml:​ProductionRule>​ 
  
  
  
-  <​r2ml:​ProductionRule r2ml:​ruleID="​activityAll">​ 
-   <​r2ml:​Documentation>​ 
-       <​r2ml:​RuleText r2ml:​textFormat="​plain">​ 
-            activityAll 
-       </​r2ml:​RuleText>​ 
-   </​r2ml:​Documentation>​ 
-    <​r2ml:​conditions>​ 
-  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​greaterThan">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​timeOut">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​time"​ r2ml:​classID="​Time"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​0"​ r2ml:​datatypeID="​xs:​positiveInteger"/>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​equal">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​enoughCachToChange">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​machine"​ r2ml:​classID="​Machine"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​true"​ r2ml:​datatypeID="​xs:​boolean"/>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
-  
-        <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​greaterThanOrEqual">​ 
-          <​r2ml:​dataArguments>​ 
-            <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​change">​ 
-              <​r2ml:​contextArgument>​ 
-                <​r2ml:​ObjectVariable r2ml:​name="​machine"​ r2ml:​classID="​Machine"/>​ 
-              </​r2ml:​contextArgument>​ 
-            </​r2ml:​AttributeFunctionTerm>​ 
-              <​r2ml:​TypedLiteral r2ml:​lexicalValue="​0"​ r2ml:​datatypeID="​xs:​positiveInteger"/>​ 
-          </​r2ml:​dataArguments>​ 
-        </​r2ml:​DatatypePredicateAtom>​ 
  
-        ​<r2ml:DatatypePredicateAtom ​r2ml:datatypePredicateID="swrlb:greaterThanOrEqual">​ +==== XTTML do URML (XMI) ==== 
-          <r2ml:dataArguments+ 
-            <r2ml:AttributeFunctionTerm ​r2ml:attributeID="foundInMachine">​ +To rozwiązanie byłoby wygodne, bo XTTML do URML do R2ML. 
-              <r2ml:contextArgument+ 
-                <r2ml:ObjectVariable ​r2ml:name="machine" r2ml:classID="Machine"/>​ +Sprawdzałem jak Strelka radzi sobie z wykorzystaniem InvokeActionExpression i nie da się tam zrobić wpisania w InvokeActionExpression takich formuł jak ja zaproponowałem. Invoke musi odnosić się do metody klasy. 
-              </r2ml:contextArgument+ 
-            </r2ml:AttributeFunctionTerm+Można ominąć ten problem robiąc metodę o takiej samej nazwie jak klasa (czyli konstruktor domyślny) i odnosić się do niego w InvokeActionExpression.  
-              <r2ml:TypedLiteral ​r2ml:lexicalValue="0" r2ml:datatypeID="xs:positiveInteger"/>​ + 
-          </r2ml:​dataArguments>​ +Znalazłem inne błędy w programie Strelka. Błędy w generowaniu kodu R2ML. Dlatego sądzę, że to przejście przez URML było błędnym pomysłem. 
-        </​r2ml:​DatatypePredicateAtom>​ + 
-    </r2ml:conditions+Poniższy przykład prezentuje błąd: 
-  + 
-    <r2ml:producedAction+{{:​pl:​miw:​miw08_xtt_r2ml:​image_przykl.jpg|Przykład z błędem}} 
-  + 
-      <r2ml:AssignActionExpression ​r2ml:propertyID="activity">​ +Ze schematu został wygenerowany kod. Brak wszystkich danych ze schematu. Program zgubił wartość 1, brak wniosku (producedAction). 
-       ​<r2ml:contextArgument+ 
-        <r2ml:ObjectVariable ​r2ml:classID="Machine" r2ml:name="machine" /> +<code xml> 
-       ​</r2ml:contextArgument        ​ +<?xml version="​1.0"​ encoding="​UTF-8"​ standalone="​yes"?>​ 
-       ​<r2ml:value+<r2ml:RuleBase xsi:​schemaLocation="​http://​oxygen.informatik.tu-cottbus.de/​R2ML/​0.4/​R2ML.xsd"​ xmlns:​dc="​http://​purl.org/​dc/​elements/​1.1/"​ xmlns:​r2mlv="​http://​www.rewerse.net/​I1/​2006/​R2ML/​R2MLV"​ xmlns:​xs="​http://​www.w3.org/​2001/​XMLSchema"​ xmlns:r2ml="http://​www.rewerse.net/​I1/​2006/​R2ML"​ xmlns:soap="http://​www.w3.org/​2001/​12/​soap-envelope"​ xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance">​ 
-        <r2ml:TypedLiteral ​r2ml:lexicalValue="​true" ​r2ml:datatypeID="xs:​positiveInteger" /> +    <r2mlv:Vocabulary>​ 
-       ​</r2ml:value+        <​r2mlv:​Class r2mlv:​ID="​xtt_1"​
-      </​r2ml:​AssignActionExpression>​ +            ​<​r2mlv:​Attribute r2mlv:​ID="​att_0">​ 
-  +                <​r2mlv:​range>​ 
-    ​</​r2ml:​producedAction>​ +                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​ 
-  </​r2ml:​ProductionRule>​+                </​r2mlv:​range>​ 
 +            </​r2mlv:​Attribute>​ 
 +            <​r2mlv:​Attribute r2mlv:​ID="​att_1">​ 
 +                <​r2mlv:​range>​ 
 +                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​ 
 +                </​r2mlv:​range>​ 
 +            </​r2mlv:​Attribute>​ 
 +        </​r2mlv:​Class>​ 
 +    </​r2mlv:​Vocabulary>​ 
 +    ​<r2ml:ProductionRuleSet>​ 
 +        <​r2ml:​ProductionRule ​r2ml:ruleID="rul_1">​ 
 +            <r2ml:conditions
 +                <r2ml:ObjectClassificationAtom ​r2ml:classID="xtt_1" r2ml:isNegated="​false">​ 
 +                    <​r2ml:​ObjectVariable r2ml:name="xtt_1"/>​ 
 +                </r2ml:ObjectClassificationAtom
 +                <r2ml:qf.Disjunction
 +                    <r2ml:DatatypePredicateAtom ​r2ml:datatypePredicateID="swrlb:​greaterThanOrEqual" r2ml:isNegated="false" xmlns:swrlb="http://​www.w3.org/​2003/​11/​swrlb"​
 +                        <​r2ml:​dataArguments/
 +                    </​r2ml:​DatatypePredicateAtom>​ 
 +                    <r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​lessThanOrEqual"​ r2ml:​isNegated="​false"​ xmlns:​swrlb="​http:​//​www.w3.org/​2003/​11/​swrlb">​ 
 +                        <r2ml:dataArguments
 +                            <​r2ml:​TypedLiteral r2ml:​datatypeID="​xs:​integer"​ r2ml:​lexicalValue="​5"/>​ 
 +                        </r2ml:dataArguments
 +                    </​r2ml:​DatatypePredicateAtom>​ 
 +                    <r2ml:DatatypePredicateAtom ​r2ml:datatypePredicateID="swrlb:​equal"​ r2ml:​isNegated="​false"​ xmlns:​swrlb="​http://​www.w3.org/​2003/​11/​swrlb">​ 
 +                        <r2ml:dataArguments
 +                            <r2ml:TypedLiteral ​r2ml:datatypeID="xs:integer" r2ml:lexicalValue="8"/>​ 
 +                        </r2ml:dataArguments
 +                    </r2ml:DatatypePredicateAtom
 +                </r2ml:qf.Disjunction>​ 
 +            </r2ml:conditions>​ 
 +            <r2ml:producedAction>​ 
 +                <​r2ml:​AssignActionExpression>​ 
 +                    <​r2ml:​contextArgument>​ 
 +                        <​r2ml:​ObjectVariable r2ml:name="xtt_1"/>​ 
 +                    </r2ml:contextArgument
 +                </​r2ml:​AssignActionExpression>​ 
 +            </​r2ml:​producedAction>​ 
 +        </​r2ml:​ProductionRule
 +    </​r2ml:​ProductionRuleSet>
 </​r2ml:​RuleBase>​ </​r2ml:​RuleBase>​
 +
 </​code>​ </​code>​
 +
 +
 +==== R2ML do URML (XMI) ====
 +
 +Jest wykonalne. Niestety nie znalazłem żadnego translatora. Nawet zespół, który pracuje nad regułami R2ML nie pisał ich ręcznie tylko generował za pomocą Strelki. Opisują to w swoim postępowaniu przy tworzeniu reguł dla projektu Derby2005.
 +
 +Możliwe jest jednak stworzenie takiego translatora. Sądzę, że byłoby wygodniejsze konwertowanie do URML (XMI dla Strelki) niż konwertowanie do R2ML, gdyż ze Strelki można potem wygenerować R2ML. Reguły nie są skomplikowane. Poniżej zamieszczam najbardziej okrojone reguły jakie udało mi się uzyskać dla prostego przykładu.
 +
 +<code xml>
 +<xmi:XMI xmi:​version="​2.0"​ xmlns:​xmi="​http://​www.omg.org/​XMI"​ xmlns:​URML="​http:///​URML.ecore"​ xmlns:​notation="​http://​www.eclipse.org/​gmf/​runtime/​1.0.1/​notation"​ xmlns:​uml="​http://​www.eclipse.org/​uml2/​2.1.0/​UML">​
 +  <​notation:​Diagram xmi:​id="​nD1"​ type="​URML"​ element="​element1"​ measurementUnit="​Pixel">​
 +    <styles xmi:​type="​notation:​DiagramStyle"​ xmi:​id="​id1"/>​
 +  </​notation:​Diagram>​
 +  <​uml:​Package xmi:​id="​element1">​
 +    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idString"​ name="​String"/>​
 +    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idBoolean"​ name="​Boolean"/>​
 +    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idInteger"​ name="​Integer"/>​
 +    <​packagedElement xmi:​type="​uml:​PrimitiveType"​ xmi:​id="​idFloat"​ name="​Float"/>​
 +    <​packagedElement xmi:​type="​URML:​ProductionRule"​ xmi:​id="​idPR"​ name="​myPR1">​
 +      <​conditions xmi:​type="​URML:​ClassificationAtom"​ xmi:​id="​idCA"​ condRule="​idPR"​ filter="​startDate-reservationDate>​=5"​ clazz="​idmyRental"​ classVariable="​myRental"/>​
 +      <​producedActionExpr xmi:​type="​URML:​AssignVariableActionExpr"​ xmi:​id="​idAE"​ rule="​idPR"​ clazz="​idmyRental"​ actionType="​A"​ classVariable="​myRental"​ statement="​discount=10"/>​
 +    </​packagedElement>​
 +    <​packagedElement xmi:​type="​uml:​Class"​ xmi:​id="​idmyRental"​ name="​myRental">​
 +      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​iddiscount"​ name="​discount"​ type="​idInteger"​ aggregation="​composite"/>​
 +      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​id_reservationDate"​ name="​reservationDate"​ type="​idInteger"​ aggregation="​composite"/>​
 +      <​ownedAttribute xmi:​type="​uml:​Property"​ xmi:​id="​id_startDate"​ name="​startDate"​ type="​idInteger"​ aggregation="​composite"/>​
 +    </​packagedElement>​
 +  </​uml:​Package>​
 +</​xmi:​XMI>​
 +</​code>​
 +
 +Przy tak upakowanym kodzie istnieje problem odczytu takiego schematu w programie Strelka. Problem leży w zredukowanym fragmencie "​notation:​Diagram"​. Efekt widoczny poniżej.
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​myrental_good.jpg|przykład poprawny}}
 +{{:​pl:​miw:​miw08_xtt_r2ml:​myrental_bad.jpg|przykład bez rozmieszczeń}}
 +
 +Tutaj kod R2ML wygenerowany na za pomocą Strelki z powyższego diagramu. Oczywiście kod w obu przypadkach jest identyczny.
 +
 +<code xml>
 +<​r2ml:​RuleBase xsi:​schemaLocation="​http://​oxygen.informatik.tu-cottbus.de/​R2ML/​0.4/​R2ML.xsd"​ xmlns:​dc="​http://​purl.org/​dc/​elements/​1.1/"​ xmlns:​r2mlv="​http://​www.rewerse.net/​I1/​2006/​R2ML/​R2MLV"​ xmlns:​xs="​http://​www.w3.org/​2001/​XMLSchema"​ xmlns:​r2ml="​http://​www.rewerse.net/​I1/​2006/​R2ML"​ xmlns:​soap="​http://​www.w3.org/​2001/​12/​soap-envelope"​ xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance">​
 +    <​r2mlv:​Vocabulary>​
 +        <​r2mlv:​Class r2mlv:​ID="​myRental">​
 +            <​r2mlv:​Attribute r2mlv:​ID="​discount">​
 +                <​r2mlv:​range>​
 +                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​
 +                </​r2mlv:​range>​
 +            </​r2mlv:​Attribute>​
 +            <​r2mlv:​Attribute r2mlv:​ID="​reservationDate">​
 +                <​r2mlv:​range>​
 +                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​
 +                </​r2mlv:​range>​
 +            </​r2mlv:​Attribute>​
 +            <​r2mlv:​Attribute r2mlv:​ID="​startDate">​
 +                <​r2mlv:​range>​
 +                    <​r2mlv:​Datatype r2mlv:​ID="​xs:​integer"/>​
 +                </​r2mlv:​range>​
 +            </​r2mlv:​Attribute>​
 +        </​r2mlv:​Class>​
 +    </​r2mlv:​Vocabulary>​
 +    <​r2ml:​ProductionRuleSet>​
 +        <​r2ml:​ProductionRule r2ml:​ruleID="​myPR1">​
 +            <​r2ml:​conditions>​
 +                <​r2ml:​ObjectClassificationAtom r2ml:​classID="​myRental"​ r2ml:​isNegated="​false">​
 +                    <​r2ml:​ObjectVariable r2ml:​name="​myRental"/>​
 +                </​r2ml:​ObjectClassificationAtom>​
 +                <​r2ml:​DatatypePredicateAtom r2ml:​datatypePredicateID="​swrlb:​greaterThanOrEqual"​ r2ml:​isNegated="​false"​ xmlns:​swrlb="​http://​www.w3.org/​2003/​11/​swrlb">​
 +                    <​r2ml:​dataArguments>​
 +                        <​r2ml:​TypedLiteral r2ml:​datatypeID="​xs:​integer"​ r2ml:​lexicalValue="​5"/>​
 +                        <​r2ml:​DatatypeFunctionTerm r2ml:​datatypeFunctionID="​numeric-substract">​
 +                            <​r2ml:​dataArguments>​
 +                                <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​reservationDate">​
 +                                    <​r2ml:​contextArgument>​
 +                                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"​ r2ml:​classID="​myRental"/>​
 +                                    </​r2ml:​contextArgument>​
 +                                </​r2ml:​AttributeFunctionTerm>​
 +                                <​r2ml:​AttributeFunctionTerm r2ml:​attributeID="​startDate">​
 +                                    <​r2ml:​contextArgument>​
 +                                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"​ r2ml:​classID="​myRental"/>​
 +                                    </​r2ml:​contextArgument>​
 +                                </​r2ml:​AttributeFunctionTerm>​
 +                            </​r2ml:​dataArguments>​
 +                        </​r2ml:​DatatypeFunctionTerm>​
 +                    </​r2ml:​dataArguments>​
 +                </​r2ml:​DatatypePredicateAtom>​
 +            </​r2ml:​conditions>​
 +            <​r2ml:​producedAction>​
 +                <​r2ml:​AssignActionExpression r2ml:​propertyID="​discount">​
 +                    <​r2ml:​contextArgument>​
 +                        <​r2ml:​ObjectVariable r2ml:​name="​myRental"/>​
 +                    </​r2ml:​contextArgument>​
 +                    <​r2ml:​TypedLiteral r2ml:​datatypeID="​xs:​integer"​ r2ml:​lexicalValue="​10"/>​
 +                </​r2ml:​AssignActionExpression>​
 +            </​r2ml:​producedAction>​
 +        </​r2ml:​ProductionRule>​
 +    </​r2ml:​ProductionRuleSet>​
 +</​r2ml:​RuleBase>​
 +</​code>​
 +
 +
 +
 +===== Odwzorowanie połączeń =====
 +
 +Moja propozycja to dopisanie na końcu reguły, z której przechodzimy InvokeActionExpression.
 +
 +Przykład 1: "Go to today of date":
 +
 +<code xml>
 +
 +<​r2ml:​InvokeActionExpression r2ml:​operationID="​today">​
 +  <​r2ml:​contextArgument>​
 +    <​r2ml:​ObjectVariable r2ml:​name="​date"​ r2ml:​classID="​Date"/>​
 +  </​r2ml:​contextArgument>​
 +</​r2ml:​InvokeActionExpression>​
 +
 +</​code>​
 +
 +
 +Przykład 2: "​Calculate the total payment of the purchase order":​
 +
 +<code xml>
 +<​r2ml:​InvokeActionExpression r2ml:​operationID="​totalPayment">​
 +  <​r2ml:​contextArgument>​
 +    <​r2ml:​ObjectVariable r2ml:​name="​purchaseOrder"​ r2ml:​classID="​Order"/>​
 +  </​r2ml:​contextArgument>​
 +</​r2ml:​InvokeActionExpression>​
 +</​code>​
 +
 +
 +
 +===== Translator =====
 +
 +Efektem powyższych etapów prac oraz rozważań jest translator.
 +
 +[[https://​ai.ia.agh.edu.pl/​wiki/​pl:​miw:​miw08_xtt_r2ml:​translator | translator]]
 +
 +
 +
 +
 +
 +===== REWERSE I1 issues =====
 +
 +  * R2ML->​JBOSS
 +  - Translator is XSLT based on and uses R2ML version 0.4.
 +  - The Drools vocabulary is not generated.
 +  - Only Production Rules are translated to Drools.
 +  - "some other errors"​ (dr A. Giurca)
 +  * Translator R2ML to RIF doesn'​t exist.
 +  * Strelka
 +  - [[https://​ai.ia.agh.edu.pl/​wiki/​pl:​miw:​miw08_xtt_r2ml#​xttml_do_urml_xmi|loosing conditions and bad production rules]]
 +  - Button "Save R2ML" doesn'​t work. Button "​Preview R2ML" works.
 +  - Group of buttons "​Translate to..." doesn'​t work.
 +  - Generating R2ML doesn'​t work with advanced logical expressions.
 +
 +
 +
 +===== Pliki z regułami =====
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​thermostat.txt|thermostat.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_01.txt|minicases_01.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_02.txt|minicases_02.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_03.txt|minicases_03.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_04.txt|minicases_04.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_05.txt|minicases_05.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_06.txt|minicases_06.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_07.txt|minicases_07.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_08.txt|minicases_08.txt}}
 +
 +{{:​pl:​miw:​miw08_xtt_r2ml:​minicases_09.txt|minicases_09.txt}}
 +
 +====== Materiały ======
 +  - Linki
 +  * [[http://​oxygen.informatik.tu-cottbus.de/​rewerse-i1/?​q=R2ML | Główna strona projektu R2ML]]
 +  * [[http://​oxygen.informatik.tu-cottbus.de/​rewerse-i1/?​q=node/​15 | Translatory R2ML->​...]]
 +  * [[http://​www.w3.org/​Style/​XSL/​ | Style XSL]]
 +  * [[http://​zvon.org/​xxl/​XSLTutorial/​Output/​index.html | Tutorial XSLT]]
 +  * [[http://​oxygen.informatik.tu-cottbus.de/​publications/​giurca/​ | Publikacje Lukichev oraz Giurca]]
 +  * [[http://​en.wikipedia.org/​wiki/​Production_Rule_Representation | Production Rule Representation (PRR) - en.wikipedia]]
 +  * [[http://​www.edmblog.com/​weblog/​2007/​06/​production_rule.html | Trochę więcej o PRR]]
 +  * [[http://​oxygen.informatik.tu-cottbus.de/​userv/​ | USserv Product Derby]]
 +
 +  - Typy zmiennych
 +  * [[http://​www.w3.org/​Submission/​2004/​SUBM-SWRL-20040521/#​8 | SWRL]]
 +  ​
 +  - pdfy dostępne pod [[http://​oxygen.informatik.tu-cottbus.de/​publications/​giurca/​ | Publikacje Lukichev oraz Giurca]]
 +  * "A General Markup Framework for Integrity and Derivation Rules" - G.Wagner, A.Giurca, S. Lukichev
 +  * "​Verification and Validation of R2ML Rule Bases" - S. Lukichev
 +  * "​Submission to Production Rule Representation"​ : PRR-Core
  
pl/miw/miw08_xtt_r2ml.1212133422.txt.gz · ostatnio zmienione: 2019/06/27 15:58 (edycja zewnętrzna)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0