modelator 0.4.2

A framework and tools for model-based testing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Parser for TLA+ state.
mod parser;

use crate::Error;
use serde_json::Value as JsonValue;

pub(crate) fn state_to_json(state: &str) -> Result<JsonValue, Error> {
    parser::parse_state(state)
        .map(|(input, value)| {
            assert!(
                input.is_empty(),
                "[modelator] full TLA state should have been parsed"
            );
            value
        })
        .map_err(Into::into)
}