class MLFunction3[D1, D2, D3, R] extends MLFunction[(D1, D2, D3), R]
Analogue to MLFunction2 but for three arguments. See MLFunction2.
- Alphabetic
- By Inheritance
- MLFunction3
- MLFunction
- MLValue
- FutureValue
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(arg1: MLValue[D1], arg2: MLValue[D2], arg3: MLValue[D3])(implicit isabelle: Isabelle, ec: ExecutionContext): MLValue[R]
- def apply(arg1: D1, arg2: D2, arg3: D3)(implicit isabelle: Isabelle, ec: ExecutionContext, converter1: Converter[D1], converter2: Converter[D2], converter3: Converter[D3]): MLValue[R]
- def apply(arg: (D1, D2, D3))(implicit isabelle: Isabelle, ec: ExecutionContext, converter: Converter[(D1, D2, D3)]): MLValue[R]
Same as apply(MLValue[D]) but first converts
arg
into an MLValue (i.e., transfers it to the Isabelle process).Same as apply(MLValue[D]) but first converts
arg
into an MLValue (i.e., transfers it to the Isabelle process).- Definition Classes
- MLFunction
- def apply(arg: MLValue[(D1, D2, D3)])(implicit isabelle: Isabelle, ec: ExecutionContext): MLValue[R]
Invokes the function on a value
arg
stored in the Isabelle process.Invokes the function on a value
arg
stored in the Isabelle process.Note that the result
r
of the computation happens in a future (inside an MLValue), so exceptions in the ML code are not immediately thrown. To force exceptions, use, e.g.,r.retrieveNow
orr.force
.- returns
the function result inside an MLValue
- Definition Classes
- MLFunction
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def await: Unit
- Definition Classes
- MLValue → FutureValue
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def debugInfo(implicit isabelle: Isabelle, ec: ExecutionContext): String
Returns a textual representation of the value in the ML process as it is stored in the object store (i.e., encoded as an exception).
Returns a textual representation of the value in the ML process as it is stored in the object store (i.e., encoded as an exception). E.g., an integer 3 would be represented as "E_Int 3".
- Definition Classes
- MLValue
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def force: MLFunction3.this.type
Waits till the computation of this value (in the Isabelle process) has finished.
Waits till the computation of this value (in the Isabelle process) has finished. (Or until an exception is thrown.)
- returns
this value, but it is guaranteed to have completed the computation
- Definition Classes
- FutureValue
- def forceFuture(implicit ec: ExecutionContext): Future[MLFunction3.this.type]
A future containing this value with the computation completed.
A future containing this value with the computation completed. In particular, if this value throws an exception upon computation, the future holds that exception.
- Definition Classes
- FutureValue
- def function[D, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[(D) => R]]): MLFunction[D, R]
Returns this MLValue as an MLFunction, assuming this MLValue has a type of the form
MLValue[D => R]
.Returns this MLValue as an MLFunction, assuming this MLValue has a type of the form
MLValue[D => R]
. If this MLValue isMLValue[D => R]
, it means it references a function value in the ML process. Converting it to anMLFunction <: MLValue
gives us access to additional methods for applying this function.- Definition Classes
- MLValue
- See also
- def function2[D1, D2, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2)) => R]]): MLFunction2[D1, D2, R]
Analogous to function but for functions that take a pair as argument, i.e.,
this : MLValue[((D1, D2)) => R]
. - def function3[D1, D2, D3, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2, D3)) => R]]): MLFunction3[D1, D2, D3, R]
Analogous to function but for functions that take a 3-tuple as argument, i.e.,
this : MLValue[((D1, D2, D3)) => R]
. - def function4[D1, D2, D3, D4, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2, D3, D4)) => R]]): MLFunction4[D1, D2, D3, D4, R]
Analogous to function but for functions that take a 4-tuple as argument, i.e.,
this : MLValue[((D1, D2, D3, D4)) => R]
. - def function5[D1, D2, D3, D4, D5, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2, D3, D4, D5)) => R]]): MLFunction5[D1, D2, D3, D4, D5, R]
Analogous to function but for functions that take a 5-tuple as argument, i.e.,
this : MLValue[((D1, D2, D3, D4, D5)) => R]
. - def function6[D1, D2, D3, D4, D5, D6, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2, D3, D4, D5, D6)) => R]]): MLFunction6[D1, D2, D3, D4, D5, D6, R]
Analogous to function but for functions that take a 6-tuple as argument, i.e.,
this : MLValue[((D1, D2, D3, D4, D5, D6)) => R]
. - def function7[D1, D2, D3, D4, D5, D6, D7, R](implicit ev: =:=[MLValue[((D1, D2, D3)) => R], MLValue[((D1, D2, D3, D4, D5, D6, D7)) => R]]): MLFunction7[D1, D2, D3, D4, D5, D6, D7, R]
Analogous to function but for functions that take a 7-tuple as argument, i.e.,
this : MLValue[((D1, D2, D3, D4, D5, D6, D7)) => R]
. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val id: Future[ID]
- Definition Classes
- MLValue
- def insertMLValue[C[_], B](implicit ev: =:=[((D1, D2, D3)) => R, C[B]]): MLValue[C[MLValue[B]]]
Specialized type cast that inserts
MLValue[]
in arbitrary positions in the type parameter of this MLValue.Specialized type cast that inserts
MLValue[]
in arbitrary positions in the type parameter of this MLValue. E.g., we can type castthis : MLValue[List[X]]
toMLValue[List[MLValue[X]]]
by invokingthis.insertMLValue[List,X]
Such type casts are safe because the the wayMLValue[...]
is interpreted in the type parameter toMLValue
(see MLValueConverter (TODO: document that one)). The same type cast could be achieved using.asInstanceOf
, butinsertMLValue
guarantees that no unsafe cast is accidentally performed.- Definition Classes
- MLValue
- Annotations
- @inline()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def logError(message: => String)(implicit executionContext: ExecutionContext): MLFunction3.this.type
- Definition Classes
- MLValue
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def removeMLValue[C[_], B](implicit ev: =:=[((D1, D2, D3)) => R, C[MLValue[B]]]): MLValue[C[B]]
Specialized type cast that removes
MLValue[]
in arbitrary positions in the type parameter of this MLValue.Specialized type cast that removes
MLValue[]
in arbitrary positions in the type parameter of this MLValue. E.g., we can type castthis : MLValue[List[MLValue[X]]]
toMLValue[List[X]]
by invokingthis.removeMLValue[List,X]
Such type casts are safe because the the wayMLValue[...]
is interpreted in the type parameter toMLValue
(see MLValueConverter (TODO: document that one)). The same type cast could be achieved using.asInstanceOf
, butinsertMLValue
guarantees that no unsafe cast is accidentally performed.- Definition Classes
- MLValue
- Annotations
- @inline()
- def retrieve(implicit converter: Converter[((D1, D2, D3)) => R], isabelle: Isabelle, ec: ExecutionContext): Future[((D1, D2, D3)) => R]
Retrieves the value referenced by this MLValue from the Isabelle process.
Retrieves the value referenced by this MLValue from the Isabelle process.
In particular, the value in the Isabelle process (a value in ML) is translated to a Scala value.
- converter
This converter specifies how the value is to be retrieved from the Isabelle process and translated into a Scala value of type
A
- isabelle
The Isabelle instance holding the value. This must be the same
Isabelle
instance relative to which theMLValue
was created. (Otherwise unspecified data is returned or an exception thrown.) In an application with only a singleIsabelle
instance that instance can safely be declared as an implicit.- returns
Future holding the value (as a Scala value) or an IsabelleException if the computation of that value or the transfer to Scala failed.
- Definition Classes
- MLValue
- Annotations
- @inline()
- def retrieveNow(implicit converter: Converter[((D1, D2, D3)) => R], isabelle: Isabelle, ec: ExecutionContext): ((D1, D2, D3)) => R
Like retrieve but returns the Scala value directly instread of a future (blocks till the computation and transfer finish.
Like retrieve but returns the Scala value directly instread of a future (blocks till the computation and transfer finish.
- Definition Classes
- MLValue
- Annotations
- @inline()
- def someFuture: Future[Any]
- Definition Classes
- MLValue → FutureValue
- def stateString: String
A utility method that returns "" if this value was successfully computed, " (computing)" if it still computes, and " (failed)" if it finished with an exception.
A utility method that returns "" if this value was successfully computed, " (computing)" if it still computes, and " (failed)" if it finished with an exception.
This can be useful to constructing human readable messages about this value.
- Definition Classes
- FutureValue
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])