package smt
- Alphabetic
- Public
- All
Type Members
- case class ArrayConstant(e: BVExpr, indexWidth: Int) extends ArrayExpr with Product with Serializable
- case class ArrayEqual(a: ArrayExpr, b: ArrayExpr) extends BVExpr with Product with Serializable
- sealed trait ArrayExpr extends SMTExpr
-
case class
ArrayFunctionCall(name: String, args: List[SMTFunctionArg], indexWidth: Int, dataWidth: Int) extends ArrayExpr with Product with Serializable
apply arguments to a function which returns a result of array type
- case class ArrayIte(cond: BVExpr, tru: ArrayExpr, fals: ArrayExpr) extends ArrayExpr with Product with Serializable
- case class ArrayRead(array: ArrayExpr, index: BVExpr) extends BVExpr with Product with Serializable
- case class ArrayStore(array: ArrayExpr, index: BVExpr, data: BVExpr) extends ArrayExpr with Product with Serializable
- case class ArraySymbol(name: String, indexWidth: Int, dataWidth: Int) extends ArrayExpr with SMTSymbol with Product with Serializable
- case class ArrayType(indexWidth: Int, dataWidth: Int) extends SMTType with Product with Serializable
- case class BVAnd(terms: List[BVExpr]) extends BVExpr with Product with Serializable
- sealed trait BVBinaryExpr extends BVExpr
- case class BVComparison(op: Compare.Value, a: BVExpr, b: BVExpr, signed: Boolean) extends BVBinaryExpr with Product with Serializable
- case class BVConcat(a: BVExpr, b: BVExpr) extends BVBinaryExpr with Product with Serializable
- case class BVEqual(a: BVExpr, b: BVExpr) extends BVBinaryExpr with Product with Serializable
-
sealed
trait
BVExpr extends SMTExpr
a SMT bit vector expression: https://smtlib.cs.uiowa.edu/theories-FixedSizeBitVectors.shtml
- case class BVExtend(e: BVExpr, by: Int, signed: Boolean) extends BVUnaryExpr with Product with Serializable
- case class BVForall(variable: BVSymbol, e: BVExpr) extends BVUnaryExpr with Product with Serializable
-
case class
BVFunctionCall(name: String, args: List[SMTFunctionArg], width: Int) extends BVExpr with Product with Serializable
apply arguments to a function which returns a result of bit vector type
- class BVImplies extends BVBinaryExpr
- case class BVIte(cond: BVExpr, tru: BVExpr, fals: BVExpr) extends BVExpr with Product with Serializable
- case class BVLiteral(value: BigInt, width: Int) extends BVExpr with SMTNullaryExpr with Product with Serializable
- case class BVNegate(e: BVExpr) extends BVUnaryExpr with Product with Serializable
- case class BVNot(e: BVExpr) extends BVUnaryExpr with Product with Serializable
- case class BVOp(op: Op.Value, a: BVExpr, b: BVExpr) extends BVBinaryExpr with Product with Serializable
- case class BVOr(terms: List[BVExpr]) extends BVExpr with Product with Serializable
- case class BVReduceAnd(e: BVExpr) extends BVUnaryExpr with Product with Serializable
- case class BVReduceOr(e: BVExpr) extends BVUnaryExpr with Product with Serializable
- case class BVReduceXor(e: BVExpr) extends BVUnaryExpr with Product with Serializable
- case class BVSlice(e: BVExpr, hi: Int, lo: Int) extends BVUnaryExpr with Product with Serializable
- case class BVSymbol(name: String, width: Int) extends BVExpr with SMTSymbol with Product with Serializable
- case class BVType(width: Int) extends SMTType with Product with Serializable
- sealed trait BVUnaryExpr extends BVExpr
- case class Comment(msg: String) extends SMTCommand with Product with Serializable
- case class DeclareFunction(sym: SMTSymbol, args: Seq[SMTFunctionArg]) extends SMTCommand with Product with Serializable
- case class DeclareUninterpretedSort(name: String) extends SMTCommand with Product with Serializable
- case class DeclareUninterpretedSymbol(name: String, tpe: String) extends SMTCommand with Product with Serializable
- case class DefineFunction(name: String, args: Seq[SMTFunctionArg], e: SMTExpr) extends SMTCommand with Product with Serializable
- case class EmittedSMTModelAnnotation(name: String, src: String, outputSuffix: String) extends NoTargetAnnotation with CustomFileEmission with Product with Serializable
- case class GlobalClockAnnotation(target: ReferenceTarget) extends SingleTargetAnnotation[ReferenceTarget] with Product with Serializable
- sealed trait SMTCommand extends AnyRef
-
sealed
trait
SMTExpr extends SMTFunctionArg
base trait for all SMT expressions
- sealed trait SMTFunctionArg extends AnyRef
- sealed trait SMTNullaryExpr extends SMTExpr
- sealed trait SMTSymbol extends SMTExpr with SMTNullaryExpr
- sealed trait SMTType extends AnyRef
- case class SetLogic(logic: String) extends SMTCommand with Product with Serializable
- case class Signal(name: String, e: SMTExpr, lbl: SignalLabel = IsNode) extends Product with Serializable
- sealed trait SignalLabel extends AnyRef
- case class State(sym: SMTSymbol, init: Option[SMTExpr], next: Option[SMTExpr]) extends Product with Serializable
-
class
StutteringClockTransform extends Transform with DependencyAPIMigration
Converts every input clock into a clock enable input and adds a single global clock.
Converts every input clock into a clock enable input and adds a single global clock. - all registers and memory ports will be connected to the new global clock - all registers and memory ports will be guarded by the enable signal of their original clock - the clock enabled signal can be understood as a clock tick or posedge - this transform can be used in order to (formally) verify designs with multiple clocks or asynchronous resets
- case class TransitionSystem(name: String, inputs: List[BVSymbol], states: List[State], signals: List[Signal], comments: Map[String, String] = Map(), header: String = "") extends Product with Serializable
- case class TransitionSystemAnnotation(sys: TransitionSystem) extends NoTargetAnnotation with Product with Serializable
- case class UTSymbol(name: String, tpe: String) extends SMTFunctionArg with Product with Serializable
-
case class
UninterpretedModuleAnnotation(target: ModuleTarget, prefix: String, stateBits: Int = 0) extends SingleTargetAnnotation[ModuleTarget] with Product with Serializable
ExtModules annotated as UninterpretedModule will be modelled as UninterpretedFunction (SMTLib) or constant arrays (btor2).
ExtModules annotated as UninterpretedModule will be modelled as UninterpretedFunction (SMTLib) or constant arrays (btor2). This can be useful when trying to abstract over a function that the SMT solver or model checker is struggling with.
E.g., one could declare an abstract 64bit multiplier like this:
, then the
Mul64extmodule Mul64 : input a : UInt<64> input b : UInt<64> output r : UInt<64>
are the same on both instances of
b
andNow instead of using Chisel to actually implement a multiplication circuit we can instantiate this Mul64 module twice: Once in our implementation and once for our correctness property that might specify how the multiply instruction is supposed to be executed on our CPU. Now instead of having to prove equivalence of multiplication circuits, the solver only has to make sure that the connections to the multiplier are correct, since if
ar
output will also be the same. This is a much easier problem and will result in much faster solving due to manual abstraction.When stateBits is 0, we model the module as purely combinatorial circuit and thus expect there to be no clock wire going into the module. Every output is thus a function of all inputs of the module.
When stateBits is an N greater than zero, we will model the module as having an abstract state of width N. Thus on every clock transition the abstract state is updated and all outputs will take the state as well as the current inputs as arguments. TODO: Support for stateful circuits is work in progress.
All output functions well be prefixed with prefix and end in the name of the output pin. It is the users responsibility to ensure that all function names will be unique by choosing apropriate prefixes.
The annotation is consumed by the FirrtlToTransitionSystem pass.
Value Members
- object BVAnd extends Serializable
- object BVImplies
- object BVLiteral extends Serializable
- object BVNot extends Serializable
- object BVOr extends Serializable
-
object
Btor2Emitter extends SMTEmitter
Turns the transition system generated by FirrtlToTransitionSystem into a btor2 file.
- object Btor2Serializer
- object Compare extends Enumeration
- object False
-
object
FirrtlToTransitionSystem extends Transform with DependencyAPIMigration
Contains code to convert a flat firrtl module into a functional transition system which can then be exported as SMTLib or Btor2 file.
- object IsBad extends SignalLabel with Product with Serializable
- object IsConstraint extends SignalLabel with Product with Serializable
- object IsFair extends SignalLabel with Product with Serializable
- object IsInit extends SignalLabel with Product with Serializable
- object IsNext extends SignalLabel with Product with Serializable
- object IsNode extends SignalLabel with Product with Serializable
- object IsOutput extends SignalLabel with Product with Serializable
- object Op extends Enumeration
- object SMTEqual
- object SMTExpr
- object SMTExprMap
- object SMTIte
-
object
SMTLibEmitter extends SMTEmitter
Turns the transition system generated by FirrtlToTransitionSystem into an SMTLib file.
-
object
SMTLibSerializer
Converts STM Expressions to a SMTLib compatible string representation.
Converts STM Expressions to a SMTLib compatible string representation. See http://smtlib.cs.uiowa.edu/ Assumes well typed expression, so it is advisable to run the TypeChecker before serializing! Automatically converts 1-bit vectors to bool.
- object SMTSymbol
-
object
SMTTransitionSystemEncoder
This Transition System encoding is directly inspired by yosys' SMT backend: https://github.com/YosysHQ/yosys/blob/master/backends/smt2/smt2.cc It if fairly compact, but unfortunately, the use of an uninterpreted sort for the state prevents this encoding from working with boolector.
This Transition System encoding is directly inspired by yosys' SMT backend: https://github.com/YosysHQ/yosys/blob/master/backends/smt2/smt2.cc It if fairly compact, but unfortunately, the use of an uninterpreted sort for the state prevents this encoding from working with boolector. For simplicity reasons, we do not support hierarchical designs (no
_h
function). - object SignalLabel
- object TransitionSystem extends Serializable
- object True
- object UninterpretedModuleAnnotation extends Serializable
This is the documentation for Firrtl.