class PlusStrategy extends Strategy
Helper class to contain commonality of choice in non-deterministic
choice operator and then-else part of a conditional choice. Only
returned by the non-deterministic choice operator. The first argument
specifies a name for the constructed strategy. p and q are
evaluated at most once.
- Source
- PlusStrategy.scala
- Alphabetic
- By Inheritance
- PlusStrategy
- Strategy
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
+(name: String, q: ⇒ Strategy): PlusStrategy
As for the other
+with the first argument specifying a name for the constructed strategy.As for the other
+with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
+(q: Strategy): PlusStrategy
Non-deterministic choice.
Non-deterministic choice. Normally, construct a strategy that first applies either this strategy or the given strategy. If it succeeds, succeed with the resulting term. Otherwise, apply
q. Currently implemented as deterministic choice, but this behaviour should not be relied upon. When used as the argument to the<conditional choice combinator,+just serves to hold the two strategies that are chosen between by the conditional choice.qis evaluated at most once.- Definition Classes
- Strategy
-
def
<(name: String, lr: ⇒ PlusStrategy): Strategy
As for the other
<with the first argument specifying a name for the constructed strategy.As for the other
<with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<(lr: PlusStrategy): Strategy
Conditional choice:
c < l + r.Conditional choice:
c < l + r. Construct a strategy that first applies this strategy (c). Ifcsucceeds, the strategy applieslto the resulting term, otherwise it appliesrto the original subject term.lris evaluated at most once.- Definition Classes
- Strategy
-
def
<*(name: String, q: ⇒ Strategy): Strategy
As for the other
<*with the first argument specifying a name for the constructed strategy.As for the other
<*with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<*(q: Strategy): Strategy
Sequential composition.
Sequential composition. Construct a strategy that first applies this strategy. If it succeeds, then apply
qto the new subject term. Otherwise fail.qis evaluated at most once.- Definition Classes
- Strategy
-
def
<+(name: String, q: ⇒ Strategy): Strategy
As for the other
<+with the first argument specifying a name for the constructed strategy.As for the other
<+with the first argument specifying a name for the constructed strategy.- Definition Classes
- Strategy
-
macro
def
<+(q: Strategy): Strategy
Deterministic choice.
Deterministic choice. Construct a strategy that first applies this strategy. If it succeeds, succeed with the resulting term. Otherwise, apply
qto the original subject term.qis evaluated at most once.- Definition Classes
- Strategy
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
andThen[A](g: (Option[Any]) ⇒ A): (Any) ⇒ A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
def
apply(r: Any): Option[Any]
Apply this strategy to a term.
Apply this strategy to a term. By default, just run the implementation body wrapped in profiling.
- Definition Classes
- Strategy → Function1
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
val
body: (Any) ⇒ Option[Any]
Implementation of this strategy.
Implementation of this strategy. Just apply
s.- Definition Classes
- PlusStrategy → Strategy
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
compose[A](g: (A) ⇒ Any): (A) ⇒ Option[Any]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
lazy val
left: Strategy
The left alternative of the choice.
-
def
mkStrategy(name: String, f: (Any) ⇒ Option[Any]): Strategy
Make one of these strategies with the given name and body
f.Make one of these strategies with the given name and body
f.- Definition Classes
- Strategy
-
val
name: String
- Definition Classes
- Strategy
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
lazy val
right: Strategy
The right alternative of the choice.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
Identify this strategy by its name.
Identify this strategy by its name.
- Definition Classes
- Strategy → Function1 → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )