Class SingleBlangModelInferrer

java.lang.Object
ca.ubc.stat.blang.jvmmodel.SingleBlangModelInferrer

public class SingleBlangModelInferrer
extends java.lang.Object
SingleBlangModelInferrer gets instantiated for each model being inferred.
  • Field Details

    • COMPONENTS_LIST_NAME

      public static final java.lang.String COMPONENTS_LIST_NAME
      See Also:
      Constant Field Values
    • BUILDER_NAME

      public static final java.lang.String BUILDER_NAME
      See Also:
      Constant Field Values
  • Constructor Details

    • SingleBlangModelInferrer

      public SingleBlangModelInferrer​(BlangModel model, org.eclipse.xtext.common.types.JvmDeclaredType output, org.eclipse.xtext.xbase.jvmmodel.JvmTypesBuilder _typeBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmAnnotationReferenceBuilder _annotationTypesBuilder, org.eclipse.xtext.xbase.jvmmodel.JvmTypeReferenceBuilder _typeReferenceBuilder)
  • Method Details

    • infer

      public void infer()
    • setupMain

      public boolean setupMain​(org.eclipse.xtext.common.types.JvmGenericType type)
    • optionalize

      public org.eclipse.xtext.common.types.JvmTypeReference optionalize​(org.eclipse.xtext.common.types.JvmTypeReference deboxedType, boolean makeOptional)
    • varName

      public java.lang.String varName​(VariableDeclarationComponent component)
    • varName

      public java.lang.String varName​(ForLoop component)
    • adaptorType

      public org.eclipse.xtext.common.types.JvmTypeReference adaptorType()
    • distributionType

      public org.eclipse.xtext.common.types.JvmTypeReference distributionType()
    • writableVariableImpl

      public org.eclipse.xtext.common.types.JvmTypeReference writableVariableImpl()
    • isRealOrIntDistributionType

      public boolean isRealOrIntDistributionType()
    • _constructorParameters

      protected java.util.List<SingleBlangModelInferrer.ConstructorArgument> _constructorParameters​(BlangDist distribution)
      For technical reasons, we need to look into other model's constructors to find out which variables are param and which are random. The following deal with this aspect.
    • blangConstructorParameters

      public static java.util.List<SingleBlangModelInferrer.ConstructorArgument> blangConstructorParameters​(BlangDist distribution)
    • _constructorParameters

      protected java.util.List<SingleBlangModelInferrer.ConstructorArgument> _constructorParameters​(JavaDist distribution)
    • extractSupplierType

      public org.eclipse.xtext.common.types.JvmTypeReference extractSupplierType​(java.lang.reflect.Parameter supplier)
    • constructorParameters

      public java.util.List<SingleBlangModelInferrer.ConstructorArgument> constructorParameters​(DistributionTypeSpecification distribution)