Trait/Object

org.combinators.cls.interpreter

ReflectedRepository

Related Docs: object ReflectedRepository | package interpreter

Permalink

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

    Permalink

    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

    Permalink

    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

    Permalink

    The algorithm to use.

  2. abstract val classLoader: ClassLoader

    Permalink

    The class loader used for interpreting inhabitation results.

  3. abstract val instance: R

    Permalink

    Instance of the Scala repository.

  4. abstract val semanticTaxonomy: Taxonomy

    Permalink

    Taxonomy for semantic type information.

  5. abstract val substitutionSpace: FiniteSubstitutionSpace

    Permalink

    Finite restriction on well-formed substitutions.

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

    Permalink

    Reflection information for the Scala repository.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object InhabitationBatchJob

    Permalink

    Helper object to create new batch jobs of inhabitation requests.

  5. def addCombinator[C](combinator: C, position: Array[StackTraceElement] = ...)(implicit combinatorTag: scala.reflect.api.JavaUniverse.WeakTypeTag[C]): ReflectedRepository[R]

    Permalink

    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.

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

    Permalink

    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).

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. lazy val combinatorComponents: Map[String, CombinatorInfo]

    Permalink

    A map from combinator names to reflected combinator information.

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

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

    Permalink

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

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

    Permalink

    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.

  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def evalInhabitant[T](inhabitant: Tree): T

    Permalink

    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.

  15. def findCombinatorComponents: Map[String, CombinatorInfo]

    Permalink

    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[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  18. def inhabit[T](semanticTypes: Type*)(implicit targetTag: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): InhabitationResult[T]

    Permalink

    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

    Permalink
    Definition Classes
    Any
  20. lazy val nativeTypeTaxonomy: NativeTaxonomyBuilder

    Permalink

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

  21. lazy val nativeTypes: Set[Constructor]

    Permalink

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

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  25. lazy val scalaTypes: Set[scala.reflect.api.JavaUniverse.Type]

    Permalink

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

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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  28. def tb: ToolBox[universe.type]

    Permalink

    The compiler toolbox used to runtime compile interpreted results.

    The compiler toolbox used to runtime compile interpreted results.

    Attributes
    protected
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped