object Session
Implementation of proof sessions via the cats free monad. See http://typelevel.org/cats/datatypes/freemonad.html.
- Source
- Session.scala
- Alphabetic
- By Inheritance
- Session
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type Session[A] = Free[SessionCommand, A]
-
sealed
trait
SessionCommand
[A] extends AnyRef
Trait for individual session commands.
Trait for individual session commands.
- A
The return type of the command.
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
ask(input: SExpression): Free[SessionCommand, SExpression]
Submits an SExpression and receives one in return.
-
def
assert(formulas: List[Formula]): Session[Unit]
Asserts a list of formulas.
-
def
assert(f: Formula, label: String): Free[SessionCommand, Unit]
Asserts a formula with a label.
-
def
assert(f: Formula): Free[SessionCommand, Unit]
Asserts a formula.
-
def
checkSat: Session[Either[SExpression, Boolean]]
Checks whether the current set of declarations and assertions is satisfiable.
-
def
checkUnsat: Session[Either[SExpression, Boolean]]
Checks whether the current set of declarations and assertions is not satisfiable.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
declareFun(fun: Const): Free[SessionCommand, Unit]
Declares a function.
-
def
declareSort(sort: TBase): Free[SessionCommand, Unit]
Declares a sort.
-
def
declareSymbolsIn(expressions: Expr*)(implicit d: DummyImplicit): Session[Unit]
Declares all symbols (sorts and functions) in a list of Exprs.
-
def
declareSymbolsIn(expressions: TraversableOnce[Expr]): Session[Unit]
Declares all symbols (sorts and functions) in a list of Exprs.
-
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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
pop: Free[SessionCommand, Unit]
Pops the stack, eliminating all assertions and declarations since the last push.
-
def
push: Free[SessionCommand, Unit]
Pushes the current assertions and declarations on the stack.
-
def
setLogic(logic: String): Free[SessionCommand, Unit]
Sets the logic to be used for the session.
-
def
setOption(option: String, args: String*): Free[SessionCommand, Unit]
Sets an option to a value.
- def skip: Session[Unit]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
tell(input: SExpression): Free[SessionCommand, Unit]
Submits an SExpression without a return.
-
def
toString(): String
- Definition Classes
- 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( ... )
- def when(p: Boolean)(s: Session[Unit]): Session[Unit]
-
def
withScope[A](f: Session[A]): Session[A]
Pushes the stack, then runs f, then pops the stack.
-
def
wrap[A](before: Session[Unit], f: Session[A], after: Session[Unit]): Session[A]
Encloses the session
f
betweenbefore
andafter
. -
object
Runners
Contains various functions for interpreting a value of type Session.
Contains various functions for interpreting a value of type Session.
A "runner" contains a natural transformation from SessionCommand to Id; i.e. a function that can transform any SessionCommand[A] to an Id[A] (= A).
Given such a transformation comp: SessionCommand ~> Id, you can use it to interpret a session program p via p.foldMap(comp).