petrinet
Petrinet
places
transitions
arcs
name
Place
getTokenNumber
isAPart
name
tokens
out
in
Token
Transition
isEnabled
name
in
out
Arc
weight
PTArc
src
trg
TPArc
src
trg
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="petrinet" nsURI="http://org.example.petrinet" nsPrefix="petrinet">
  <eAnnotations source="http://www.eclipse.org/OCL/Import">
    <details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/>
  </eAnnotations>
  <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
    <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="Petrinet">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="correctPetrinet"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="correctPetrinet" value="places->select(p | p.isAPart())->size() = places->size()"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="places" upperBound="-1"
        eType="#//Place" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="transitions" upperBound="-1"
        eType="#//Transition" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="arcs" upperBound="-1" eType="#//Arc"
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Place">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="correctTokenNumber isAPart"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="correctTokenNumber" value="getTokenNumber() = self.tokens->size()"/>
      <details key="isAPart" value="isAPart()->forAll(b | b = out->size() > 0 or _'in'->size() > 0)"/>
    </eAnnotations>
    <eOperations name="getTokenNumber" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eOperations name="isAPart" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="tokens" upperBound="-1"
        eType="#//Token" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="out" upperBound="-1" eType="#//PTArc"
        eOpposite="#//PTArc/src"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="in" upperBound="-1" eType="#//TPArc"
        eOpposite="#//TPArc/trg"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Token"/>
  <eClassifiers xsi:type="ecore:EClass" name="Transition">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="correctIsEnabeld"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="correctIsEnabeld" value="isEnabled()->forAll(b | b = _'in'->forAll(p |&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;p.src.getTokenNumber()->first() >= p.weight))"/>
    </eAnnotations>
    <eOperations name="isEnabled" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="in" upperBound="-1" eType="#//PTArc"
        eOpposite="#//PTArc/trg"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="out" upperBound="-1" eType="#//TPArc"
        eOpposite="#//TPArc/src"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Arc">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="weight" lowerBound="1"
        eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="PTArc" eSuperTypes="#//Arc">
    <eStructuralFeatures xsi:type="ecore:EReference" name="src" upperBound="-1" eType="#//Place"
        eOpposite="#//Place/out"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="trg" upperBound="-1" eType="#//Transition"
        eOpposite="#//Transition/in"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="TPArc" eSuperTypes="#//Arc">
    <eStructuralFeatures xsi:type="ecore:EReference" name="src" upperBound="-1" eType="#//Transition"
        eOpposite="#//Transition/out"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="trg" upperBound="-1" eType="#//Place"
        eOpposite="#//Place/in"/>
  </eClassifiers>
</ecore:EPackage>

{"directed":true,"nodes":[{"nsPrefix":"petrinet","nsURI":"http://org.example.petrinet","name":"petrinet","id":0,"eClass":"EPackage"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Petrinet","instanceClass":null,"abstract":false,"id":1,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Place","instanceClass":null,"abstract":false,"id":2,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Token","instanceClass":null,"abstract":false,"id":3,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Transition","instanceClass":null,"abstract":false,"id":4,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"Arc","instanceClass":null,"abstract":false,"id":5,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"PTArc","instanceClass":null,"abstract":false,"id":6,"interface":false,"eClass":"EClass"},{"instanceTypeName":null,"defaultValue":null,"instanceClassName":null,"name":"TPArc","instanceClass":null,"abstract":false,"id":7,"interface":false,"eClass":"EClass"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"places","changeable":true,"resolveProxies":true,"lowerBound":0,"id":8,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"transitions","changeable":true,"resolveProxies":true,"lowerBound":0,"id":9,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"arcs","changeable":true,"resolveProxies":true,"lowerBound":0,"id":10,"derived":false},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":0,"iD":false,"id":11,"derived":false},{"id":12,"eClass":"EGenericType"},{"id":13,"eClass":"EGenericType"},{"id":14,"eClass":"EGenericType"},{"id":15,"eClass":"EGenericType"},{"ordered":true,"upperBound":1,"unique":true,"name":"getTokenNumber","lowerBound":1,"id":16,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"unique":true,"name":"isAPart","lowerBound":1,"id":17,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":0,"iD":false,"id":18,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":true,"unsettable":false,"transient":false,"unique":true,"name":"tokens","changeable":true,"resolveProxies":true,"lowerBound":0,"id":19,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"out","changeable":true,"resolveProxies":true,"lowerBound":0,"id":20,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"in","changeable":true,"resolveProxies":true,"lowerBound":0,"id":21,"derived":false},{"id":22,"eClass":"EGenericType"},{"id":23,"eClass":"EGenericType"},{"id":24,"eClass":"EGenericType"},{"id":25,"eClass":"EGenericType"},{"id":26,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"src","changeable":true,"resolveProxies":true,"lowerBound":0,"id":27,"derived":false},{"id":28,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"trg","changeable":true,"resolveProxies":true,"lowerBound":0,"id":29,"derived":false},{"ordered":true,"upperBound":1,"unique":true,"name":"isEnabled","lowerBound":1,"id":30,"many":false,"required":true,"eClass":"EOperation"},{"ordered":true,"upperBound":1,"defaultValue":null,"volatile":false,"many":false,"required":false,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"name","changeable":true,"lowerBound":0,"iD":false,"id":31,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"in","changeable":true,"resolveProxies":true,"lowerBound":0,"id":32,"derived":false},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"out","changeable":true,"resolveProxies":true,"lowerBound":0,"id":33,"derived":false},{"id":34,"eClass":"EGenericType"},{"id":35,"eClass":"EGenericType"},{"id":36,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"trg","changeable":true,"resolveProxies":true,"lowerBound":0,"id":37,"derived":false},{"id":38,"eClass":"EGenericType"},{"container":false,"ordered":true,"upperBound":-1,"defaultValue":null,"volatile":false,"many":true,"required":false,"eClass":"EReference","defaultValueLiteral":null,"containment":false,"unsettable":false,"transient":false,"unique":true,"name":"src","changeable":true,"resolveProxies":true,"lowerBound":0,"id":39,"derived":false},{"ordered":true,"upperBound":1,"defaultValue":0,"volatile":false,"many":false,"required":true,"eClass":"EAttribute","defaultValueLiteral":null,"unsettable":false,"transient":false,"unique":true,"name":"weight","changeable":true,"lowerBound":1,"iD":false,"id":40,"derived":false},{"id":41,"eClass":"EGenericType"},{"id":42,"eClass":"EGenericType"},{"id":43,"eClass":"EGenericType"},{"id":44,"eClass":"EGenericType"},{"id":45,"eClass":"EGenericType"},{"id":46,"eClass":"EGenericType"},{"id":47,"eClass":"EGenericType"}],"links":[{"source":0,"target":1},{"source":0,"target":2},{"source":0,"target":3},{"source":0,"target":4},{"source":0,"target":5},{"source":0,"target":6},{"source":0,"target":7},{"source":1,"target":0},{"source":1,"target":8},{"source":1,"target":9},{"source":1,"target":10},{"source":1,"target":11},{"source":8,"target":2},{"source":8,"target":12},{"source":8,"target":1},{"source":12,"target":2},{"source":9,"target":4},{"source":9,"target":13},{"source":9,"target":1},{"source":13,"target":4},{"source":10,"target":5},{"source":10,"target":14},{"source":10,"target":1},{"source":14,"target":5},{"source":11,"target":15},{"source":11,"target":1},{"source":2,"target":0},{"source":2,"target":16},{"source":2,"target":17},{"source":2,"target":18},{"source":2,"target":19},{"source":2,"target":20},{"source":2,"target":21},{"source":16,"target":22},{"source":16,"target":2},{"source":17,"target":23},{"source":17,"target":2},{"source":18,"target":24},{"source":18,"target":2},{"source":19,"target":3},{"source":19,"target":25},{"source":19,"target":2},{"source":25,"target":3},{"source":20,"target":6},{"source":20,"target":26},{"source":20,"target":2},{"source":20,"target":27},{"source":26,"target":6},{"source":21,"target":7},{"source":21,"target":28},{"source":21,"target":2},{"source":21,"target":29},{"source":28,"target":7},{"source":3,"target":0},{"source":4,"target":0},{"source":4,"target":30},{"source":4,"target":31},{"source":4,"target":32},{"source":4,"target":33},{"source":30,"target":34},{"source":30,"target":4},{"source":31,"target":35},{"source":31,"target":4},{"source":32,"target":6},{"source":32,"target":36},{"source":32,"target":4},{"source":32,"target":37},{"source":36,"target":6},{"source":33,"target":7},{"source":33,"target":38},{"source":33,"target":4},{"source":33,"target":39},{"source":38,"target":7},{"source":5,"target":0},{"source":5,"target":40},{"source":40,"target":41},{"source":40,"target":5},{"source":6,"target":0},{"source":6,"target":5},{"source":6,"target":27},{"source":6,"target":37},{"source":6,"target":42},{"source":27,"target":2},{"source":27,"target":43},{"source":27,"target":6},{"source":27,"target":20},{"source":43,"target":2},{"source":37,"target":4},{"source":37,"target":44},{"source":37,"target":6},{"source":37,"target":32},{"source":44,"target":4},{"source":42,"target":5},{"source":7,"target":0},{"source":7,"target":5},{"source":7,"target":39},{"source":7,"target":29},{"source":7,"target":45},{"source":39,"target":4},{"source":39,"target":46},{"source":39,"target":7},{"source":39,"target":33},{"source":46,"target":4},{"source":29,"target":2},{"source":29,"target":47},{"source":29,"target":7},{"source":29,"target":21},{"source":47,"target":2},{"source":45,"target":5}],"multigraph":true}