pub struct Tla;
Expand description

modelator’s TLA module.

Implementations

Convert a TlaTrace into a JsonTrace.

Examples
use modelator::artifact::TlaFileSuite;
use modelator::model::{language::Tla, checker::Tlc};
use modelator::ModelatorRuntime;
use std::convert::TryFrom;

let tla_tests_file = "tests/integration/resource/NumbersAMaxBMinTest.tla";
let tla_config_file = "tests/integration/resource/Numbers.cfg";
let tla_suite = TlaFileSuite::from_tla_and_config_paths(tla_tests_file, tla_config_file).unwrap();

let mut tests = Tla::generate_tests(&tla_suite).unwrap();
let test_tla_suite = tests.pop().unwrap();
let runtime = ModelatorRuntime::default();
let (tla_trace, _) = Tlc::test(&test_tla_suite, &runtime).unwrap();
let json_trace = Tla::tla_trace_to_json_trace(tla_trace).unwrap();
println!("{:?}", json_trace);

Generate TLA+ test and config files given a TlaFile containing TLA+ test assertions and a TlaConfigFile.

Examples
use modelator::artifact::TlaFileSuite;
use modelator::model::language::Tla;
use std::convert::TryFrom;

let tla_tests_file = "tests/integration/resource/NumbersAMaxBMinTest.tla";
let tla_config_file = "tests/integration/resource/Numbers.cfg";
let tla_suite = TlaFileSuite::from_tla_and_config_paths(tla_tests_file, tla_config_file).unwrap();
let mut tests = Tla::generate_tests(&tla_suite).unwrap();
println!("{:?}", tests);

Generate test names from a tla file

Generate test tla file and config for a testname

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more