Object

cafesat.api

FormulaBuilder

Related Doc: package api

Permalink

object FormulaBuilder

Contains helper functions for building Formula.

The basic building blocks of formulas are true/false literals and propositional variables. You get a PropVar with propVar and bool2formula provides an implicit conversion from Boolean to True/False.

Once you have a Formula instance, you can combine it using its methods matching regular boolean operators. You can also use n-ary combinators or and and.

import Formulas._
import FormulaBuilder._

val a: PropVar = propVar("a")
val b: PropVar = propVar("b")
val f: Formula = and(a, (!a || b), (!b || false))
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FormulaBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

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. def and(fs: Formula*): Formula

    Permalink

    Builds a conjunction of formulas.

    Builds a conjunction of formulas.

    fs

    sequence of formulas to be combined

    returns

    a new Formula instance that represents the conjunction of the input formulas

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. implicit def bool2formula(b: Boolean): Formula

    Permalink

    Returns the formula representation of a Boolean.

    Returns the formula representation of a Boolean.

    b

    a Boolean literal to wrap into a formula

    returns

    Formulas.True if input is true and Formulas.False if input is false

  7. implicit def boolList2formulaList(bs: List[Boolean]): List[Formula]

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def or(fs: Formula*): Formula

    Permalink

    Builds a disjunction of formulas.

    Builds a disjunction of formulas.

    fs

    sequence of formulas to be combined

    returns

    a new Formula instance that represents the disjunction of the input formulas

  19. def propVar(prefix: String = "P"): PropVar

    Permalink

    Returns the formula representation of a propositional variable.

    Returns the formula representation of a propositional variable.

    The propositional variable is always fresh and unique, there is no need to use a different name for different invocations. You need to maintain a pointer to the returned instance if you want to refer to it later in your code.

    prefix

    a String prefix to the name of that variable

    returns

    A fresh and unique propositional variable with a name starting with prefix

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped