org.combinators.cls.interpreter
An InhabitationBatchJob with more than one recorded job.
An InhabitationBatchJob with more than one recorded job.
the combined native Scala type of prior requests.
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*)].
The algorithm to use.
The class loader used for interpreting inhabitation results.
Instance of the Scala repository.
Taxonomy for semantic type information.
Finite restriction on well-formed substitutions.
Reflection information for the Scala repository.
Helper object to create new batch jobs of inhabitation requests.
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
.
the type of the combinator object to add.
the new combinator to include.
the stack trace of the position where this method was called -- used to provide debugging information.
reflection information for combinator
.
a new reflected repository augmented by combinator
.
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.
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
).
A map from combinator names to reflected combinator information.
A map from combinator names to reflected combinator information. Obtained by findCombinatorComponents.
Maps all combinator names in this repository to their full (native Scala and semantic) intersection type.
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.
the name of the combinator to add; it will be augmented by a random generated UUID avoiding name clashes.
the object to obtain information for.
a stack trace of the code position where the combinator is added -- required for debugging.
the DynamicCombinatorInfo for combinatorInstance
.
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.
the inhabitant to interpret.
the interpreted inhabitant.
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.
A map from combinator names to their reflected information.
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
.
the native Scala type to inhabit.
the semantic types to inhabit.
reflection information for the target type.
A taxonomy representing the subtype relationship of all Scala types in this repository.
The set of all intersection types representing Scala types present in this reflected repository.
The set of all scala types present in this reflected repository.
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.
the name of the combinator to add.
reflected type information of the combinator object.
the StaticCombinatorInfo for typeSignature
.
The compiler toolbox used to runtime compile interpreted results.
The compiler toolbox used to runtime compile interpreted results.
A Bounded Combinatory Logic repository constructed from Scala code via reflection.
Use [ReflectedRepository.apply] of the companion object to obtain a new instance.
the Scala type of the repository.