<?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="functionmodel"
    nsURI="http://www.eclipselabs.org/mscript/FunctionModel/1.0.0" nsPrefix="functionmodel">
  <eClassifiers xsi:type="ecore:EClass" name="FunctionDescriptor">
    <eOperations name="getVariableDescriptor" eType="#//VariableDescriptor">
      <eParameters name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eOperations>
    <eOperations name="hasNoDuplicateEquations" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eOperations name="hasNoCyclicEquations" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eOperations name="hasEquationsForEachOutput" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eOperations name="hasEquationsForEachVariableStep" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="definition" lowerBound="1"
        eType="ecore:EClass Mscript.ecore#//FunctionDefinition"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="equationDescriptors" upperBound="-1"
        eType="#//EquationDescriptor" containment="true" eOpposite="#//EquationDescriptor/functionDescriptor"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="variableDescriptors" upperBound="-1"
        eType="#//VariableDescriptor" containment="true" eOpposite="#//VariableDescriptor/functionDescriptor"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EquationDescriptor">
    <eOperations name="isLeftHandSideValid" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eOperations name="isRightHandSideValid" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eParameters name="diagnostics" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDiagnosticChain"/>
      <eParameters name="context">
        <eGenericType eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EMap">
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
          <eTypeArguments eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="functionDescriptor" lowerBound="1"
        eType="#//FunctionDescriptor" eOpposite="#//FunctionDescriptor/equationDescriptors"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="equation" lowerBound="1"
        eType="ecore:EClass Mscript.ecore#//Equation"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="sides" lowerBound="2" upperBound="2"
        eType="#//EquationSide" containment="true" eOpposite="#//EquationSide/descriptor"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="leftHandSide" lowerBound="1"
        eType="#//EquationSide" changeable="false" volatile="true" transient="true"
        derived="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="rightHandSide" lowerBound="1"
        eType="#//EquationSide" changeable="false" volatile="true" transient="true"
        derived="true"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EquationSide">
    <eOperations name="getOtherSide" lowerBound="1" eType="#//EquationSide"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="descriptor" lowerBound="1"
        eType="#//EquationDescriptor" eOpposite="#//EquationDescriptor/sides"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="expression" lowerBound="1"
        eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//Expression"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="parts" upperBound="-1"
        eType="#//EquationPart" containment="true" eOpposite="#//EquationPart/side"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EquationPart">
    <eStructuralFeatures xsi:type="ecore:EReference" name="side" eType="#//EquationSide"
        eOpposite="#//EquationSide/parts"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="variableAccess" lowerBound="1"
        eType="ecore:EClass ../../org.eclipselabs.mscript.typesystem/model/TypeSystem.ecore#//Expression"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="variableStep" lowerBound="1"
        eType="#//VariableStep" eOpposite="#//VariableStep/usingEquationParts"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="VariableDescriptor">
    <eOperations name="getStep" eType="#//VariableStep">
      <eParameters name="index" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
      <eParameters name="initial" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
      <eParameters name="derivative" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    </eOperations>
    <eOperations name="getMinimumStep" lowerBound="1" eType="#//VariableStep"/>
    <eOperations name="getMaximumStep" lowerBound="1" eType="#//VariableStep"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="functionDescriptor" lowerBound="1"
        eType="#//FunctionDescriptor" eOpposite="#//FunctionDescriptor/variableDescriptors"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" eType="#//VariableKind"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="steps" upperBound="-1"
        eType="#//VariableStep" containment="true" eOpposite="#//VariableStep/descriptor"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="VariableStep">
    <eStructuralFeatures xsi:type="ecore:EReference" name="descriptor" eType="#//VariableDescriptor"
        eOpposite="#//VariableDescriptor/steps"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="index" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="initial" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="derivative" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="usingEquationParts" upperBound="-1"
        eType="#//EquationPart" eOpposite="#//EquationPart/variableStep"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EEnum" name="VariableKind">
    <eLiterals name="Unknown" value="-1"/>
    <eLiterals name="TemplateParameter"/>
    <eLiterals name="InputParameter" value="1"/>
    <eLiterals name="OutputParameter" value="2"/>
    <eLiterals name="StateVariable" value="3"/>
    <eLiterals name="Constant" value="4"/>
    <eLiterals name="FunctionObject" value="5"/>
  </eClassifiers>
</ecore:EPackage>
