TLX.Spec
(TLX v0.5.2)
Copy Markdown
Use this module to define a TLA+ specification.
defmodule MySpec do
use TLX.Spec
variable :x, 0
action :increment do
guard(e(x < 5))
next :x, e(x + 1)
end
invariant :bounded, e(x >= 0 and x <= 5)
endOr use the shorthand defspec:
import TLX
defspec MySpec do
variable :x, 0
action :increment do
guard(e(x < 5))
next :x, e(x + 1)
end
invariant :bounded, e(x >= 0 and x <= 5)
endOptions
:extensions(list of module that adoptsSpark.Dsl.Extension) - A list of DSL extensions to add to theSpark.Dsl:otp_app(atom/0) - The otp_app to use for any application configurable options:fragments(list ofmodule/0) - Fragments to include in theSpark.Dsl. See the fragments guide for more.