Object

smtlib.theories

Constructors

Related Doc: package theories

Permalink

object Constructors

Provide builders functions for all theories, which perform simplifications.

We use the convention that capital letter operations (apply) do not perform any syntactic simplification and build exactly the tree corresponding to its definition, while corresponding functions with lower case letter can potentially return a different representation than what it is called with.

An example is the And vs and operation. The And needs a minimum of two arguments, and will always produce a function application (and e1 e2 ...) with the exact same element as provided. But the and constructor is more flexible and will accept 0, 1 or more arguments, and will perform many simplifications. If called with 0 argument, it would return true, while if called with 1 it would return the element itself. Notice how in both case, even though you call the and constructor you don't get an and in the resulting expression. Similarly, an and with many arguments might simplify away true literals, or reduce the whole expression to false if one element is false. The And apply method will always keep literals without simplifying them away.

So why not always use simplifying methods? First, they are slightly more expensive than the corresponding capital letter constructors, as they will inspect the expressions and do some processing on them. Second, there are times where you might want precise control over the syntax, and having syntax-only methods as primitive is very useful. One main difference is that those constructors perform some semantics transformations, while capital letter constructors are purely syntactic.

Finally note that one cannot assume anything more than semantics equivalence for the returned term. The constructor is free to perform any sort of rewriting, so even if you expect that calling and(true, false, x) should return false, it might still return something like and(false, x). However, it will only return syntactically correct term, so you would not get And(false). Usually, the above expression will correctly get simplified to false, but the general way of thinking about these constructors is as a best-effort simplification: it will do some relatively easy and cheap simplification, but the exact contract does not specify the level of simplification. This limitation is there as, in general, it is impossible to properly specify the "correct" simplified form for a given formula.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Constructors
  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(ts: Seq[Term]): Term

    Permalink
  5. def and(t1: Term, t2: Term, ts: Term*): Term

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  15. def not(t: Term): Term

    Permalink
  16. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. def or(ts: Seq[Term]): Term

    Permalink
  19. def or(t1: Term, t2: Term, ts: Term*): Term

    Permalink
  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