Packages

trait ReflectedRepository[R] extends AnyRef

A Bounded Combinatory Logic repository constructed from Scala code via reflection.

Use [ReflectedRepository.apply] of the companion object to obtain a new instance.

R

the Scala type of the repository.

Self Type
ReflectedRepository[R]
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReflectedRepository
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait HasPriorJob[P] extends InhabitationBatchJob

    An InhabitationBatchJob with more than one recorded job.

    An InhabitationBatchJob with more than one recorded job.

    P

    the combined native Scala type of prior requests.

  2. sealed trait InhabitationBatchJob extends AnyRef

    Combines multiple inhabitation requests into one more efficient batch job.

    Combines multiple inhabitation requests into one more efficient batch job. Reuses shared intermediate results. Create new batch jobs using [InhabitationBatchJob.apply[R](Type*)] and [InhabitationBatchJob.addJob[R](Type*)].

Abstract Value Members

  1. abstract val algorithm: InhabitationAlgorithm

    The algorithm to use.

  2. abstract val classLoader: ClassLoader

    The class loader used for interpreting inhabitation results.

  3. abstract val instance: R

    Instance of the Scala repository.

  4. abstract val semanticTaxonomy: Taxonomy

    Taxonomy for semantic type information.

  5. abstract val substitutionSpace: FiniteSubstitutionSpace

    Finite restriction on well-formed substitutions.

  6. abstract val typeTag: scala.reflect.api.JavaUniverse.WeakTypeTag[R]

    Reflection information for the Scala repository.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addCombinator[C](combinator: C, position: Array[StackTraceElement] = ...)(implicit combinatorTag: scala.reflect.api.JavaUniverse.WeakTypeTag[C]): ReflectedRepository[R]

    Build a new reflected repository, which additionaly includes combinator.

    Build a new reflected repository, which additionaly includes combinator. The combinator to add must have a single monomorphic apply method and can additionally include a field val semanticType: Type. Its name will be based on the class name of C.

    C

    the type of the combinator object to add.

    combinator

    the new combinator to include.

    position

    the stack trace of the position where this method was called -- used to provide debugging information.

    combinatorTag

    reflection information for combinator.

    returns

    a new reflected repository augmented by combinator.

  5. def applyMethodInfoFor(combinatorName: String, typeSignature: scala.reflect.api.JavaUniverse.Type): (Option[Seq[scala.reflect.api.JavaUniverse.Type]], scala.reflect.api.JavaUniverse.Type)

    Extracts the type information of an apply method inside of the type described by typeSignature.

    Extracts the type information of an apply method inside of the type described by typeSignature. The apply method must be unique, declared via def, and cannot have type parameters.

    returns

    a pair of the parameter types and the result type, where the first component is None if there are no parameters (def apply: A), or Some(Seq.empty), if there are empty parameters (def apply(): A).

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. lazy val combinatorComponents: Map[String, CombinatorInfo]

    A map from combinator names to reflected combinator information.

    A map from combinator names to reflected combinator information. Obtained by findCombinatorComponents.

  9. lazy val combinators: Map[String, Type]

    Maps all combinator names in this repository to their full (native Scala and semantic) intersection type.

  10. def dynamicCombinatorInfoFor[C](combinatorName: String, combinatorInstance: C, position: Array[StackTraceElement])(implicit combinatorTypeTag: scala.reflect.api.JavaUniverse.WeakTypeTag[C]): DynamicCombinatorInfo[C]

    Obtains the DynamicCombinatorInfo for a single object programmatically added to the repository.

    Obtains the DynamicCombinatorInfo for a single object programmatically added to the repository. The object must have an apply-Method found by applyMethodInfoFor. It can include a field val semanticType: Type, which will be interpreted as the semantic type of the combinator. The latter interpretation internally performs locking, because the Scala runtime compiler used to dynamically obtain the field content is not thread safe.

    combinatorName

    the name of the combinator to add; it will be augmented by a random generated UUID avoiding name clashes.

    combinatorInstance

    the object to obtain information for.

    position

    a stack trace of the code position where the combinator is added -- required for debugging.

    returns

    the DynamicCombinatorInfo for combinatorInstance.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def evalInhabitant[T](inhabitant: Tree): T

    Inteprets inhabitant as an instance of type T.

    Inteprets inhabitant as an instance of type T. Performs runtime compilation and maps each combinator application to a call to the apply method of the combinator's scala object. The caller is responsible for proving a correct type T, otherwise runtime errors will occur. Reconstructs the shape (empty of no argument list) of the apply method from combinatorComponents. Example:

    evalInhabitant[Int](Tree("Foo", List(Tree("Bar"), Tree("Baz"))) = Foo.apply(Bar.apply, Baz.apply())

    Uses the scala runtime compiler toolbox, which is not threadsafe.

    inhabitant

    the inhabitant to interpret.

    returns

    the interpreted inhabitant.

  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def findCombinatorComponents: Map[String, CombinatorInfo]

    Performs reflection to find all objects in the Scala repository, which are annotated by combinator.

    Performs reflection to find all objects in the Scala repository, which are annotated by combinator. Overload this to add additional combinators.

    returns

    A map from combinator names to their reflected information.

    Attributes
    protected
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def inhabit[T](semanticTypes: Type*)(implicit targetTag: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): InhabitationResult[T]

    Uses type inhabitation relative to this reflected repository to obtain a result of Scala type T and the intersection of all semanticTypes.

    Uses type inhabitation relative to this reflected repository to obtain a result of Scala type T and the intersection of all semanticTypes.

    T

    the native Scala type to inhabit.

    semanticTypes

    the semantic types to inhabit.

    targetTag

    reflection information for the target type.

  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. lazy val nativeTypeTaxonomy: NativeTaxonomyBuilder

    A taxonomy representing the subtype relationship of all Scala types in this repository.

  21. lazy val nativeTypes: Set[Constructor]

    The set of all intersection types representing Scala types present in this reflected repository.

  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. lazy val scalaTypes: Set[scala.reflect.api.JavaUniverse.Type]

    The set of all scala types present in this reflected repository.

  26. def staticCombinatorInfoFor(combinatorName: String, typeSignature: scala.reflect.api.JavaUniverse.Type): StaticCombinatorInfo

    Obtains the StaticCombinatorInfo for a single combinator-annotated object inside of the repository.

    Obtains the StaticCombinatorInfo for a single combinator-annotated object inside of the repository. The object must have an apply-Method found by applyMethodInfoFor. It can include a field val semanticType: Type, which will be interpreted as the semantic type of the combinator. The latter interpretation internally performs locking, because the Scala runtime compiler used to dynamically obtain the field content is not thread safe.

    combinatorName

    the name of the combinator to add.

    typeSignature

    reflected type information of the combinator object.

    returns

    the StaticCombinatorInfo for typeSignature.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def tb: ToolBox[universe.type]

    The compiler toolbox used to runtime compile interpreted results.

    The compiler toolbox used to runtime compile interpreted results.

    Attributes
    protected
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  33. object InhabitationBatchJob

    Helper object to create new batch jobs of inhabitation requests.

Inherited from AnyRef

Inherited from Any

Ungrouped