<?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="computationmodel"
    nsURI="http://www.eclipselabs.org/mscript/ComputationModel/1.0.0" nsPrefix="computationmodel">
  <eClassifiers xsi:type="ecore:EClass" name="FloatingPointFormat" eSuperTypes="#//NumberFormat">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false" lowerBound="1"
        eType="#//FloatingPointFormatKind"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="NumberFormat" abstract="true"/>
  <eClassifiers xsi:type="ecore:EEnum" name="FloatingPointFormatKind">
    <eLiterals name="Binary16"/>
    <eLiterals name="Binary32" value="1"/>
    <eLiterals name="Binary64" value="2"/>
    <eLiterals name="Binary128" value="3"/>
    <eLiterals name="Decimal32" value="4"/>
    <eLiterals name="Decimal64" value="5"/>
    <eLiterals name="Decimal128" value="6"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="FixedPointFormat" eSuperTypes="#//NumberFormat">
    <eOperations name="getOperation" ordered="false" eType="#//FixedPointOperation">
      <eParameters name="kind" ordered="false" lowerBound="1" eType="#//FixedPointOperationKind"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="integerLength" ordered="false"
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="fractionLength" ordered="false"
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="wordSize" ordered="false"
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
        changeable="false" volatile="true" transient="true" derived="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="operations" ordered="false"
        upperBound="-1" eType="#//FixedPointOperation" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="FixedPointOperation">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" ordered="false" lowerBound="1"
        eType="#//FixedPointOperationKind"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="intermediateWordSize" ordered="false"
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="saturate" ordered="false"
        lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="FixedPointOperationKind">
    <eLiterals name="Construct"/>
    <eLiterals name="Cast" value="1"/>
    <eLiterals name="Add" value="2"/>
    <eLiterals name="Subtract" value="3"/>
    <eLiterals name="Multiply" value="4"/>
    <eLiterals name="Divide" value="5"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ComputationModel">
    <eOperations name="getNumberFormat" ordered="false" eType="#//NumberFormat">
      <eParameters name="dataType" ordered="false" lowerBound="1" eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//DataType"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="numberFormats" ordered="false"
        upperBound="-1" eType="#//NumberFormat" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="numberFormatMappings" ordered="false"
        upperBound="-1" eType="#//NumberFormatMapping" containment="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="NumberFormatMapping">
    <eStructuralFeatures xsi:type="ecore:EReference" name="ownedDataType" ordered="false"
        eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//DataType"
        containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="dataType" ordered="false"
        lowerBound="1" eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//DataType"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="numberFormat" ordered="false"
        lowerBound="1" eType="#//NumberFormat"/>
  </eClassifiers>
</ecore:EPackage>
