Bounded past metric temporal logic over timestamped Boolean observations
send -> once[1,12] handshake
working -> (allowed since[0,8] renew)
recovered -> historically[0,4] healthymoon check --deny-warn
moon test --deny-warn
moon test --target wasm-gc --deny-warn
moon test --target js --deny-warn
moon run --target js cmd/main scenario handshake 240
moon run --target js cmd/main scenario lease 240
moon run --target js cmd/main scenario recovery 240moon build --target js --release --deny-warn
node _build/js/release/build/cmd/main/main.js --help
node _build/js/release/build/cmd/main/main.js replay examples/rules.json examples/events.jsonl
python scripts/verify_cli.py
python scripts/benchmark.py
python scripts/count_source.pylet plan = @mtl.Plan::from_strings([
("send_checked", "send -> once[1,12] handshake"),
]).unwrap()
let monitor = @mtl.Monitor::new(plan)
let observation = @mtl.Observation::new(
0L,
Map([("send", false), ("handshake", true)]),
).unwrap()
let decision = monitor.push(observation).unwrap()
let verdict = decision.value("send_checked"){"time":"9007199254740993","values":{"send":false,"handshake":true}}pub struct Audit {
// private fields
}pub struct Decision {
// private fields
}pub struct Interval {
// private fields
}pub struct JsonlSession {
// private fields
}fn JsonlSession::explain(self : JsonlSession, name : String) -> Result[Array[Evidence], MonitorError]fn JsonlSession::feed_each(self : JsonlSession, chunk : String, emit : (Decision) -> Unit) -> Result[Unit, MonitorError]pub struct Limits {
// private fields
}fn Limits::new(nodes? : Int, depth? : Int, candidates? : Int, events? : Int) -> Result[Limits, MonitorError]pub struct Monitor {
// private fields
}pub(all) enum MonitorError {
InvalidInterval
InvalidTimestamp(Int)
MissingAtom(String, Int)
InvalidPosition(Int)
ResourceLimit(String)
SyntaxError(Int, String)
InvalidData(String)
}pub(all) struct MonitorStats {
processed : Int
graph_nodes : Int
retained_candidates : Int
peak_candidates : Int
node_updates : Int64
}pub struct Observation {
// private fields
}pub struct Plan {
// private fields
}fn Plan::verify_decision(self : Plan, trace : Array[Observation], decision : Decision) -> Result[Bool, MonitorError]fn Plan::verify_evidence(self : Plan, trace : Array[Observation], evidence : Array[Evidence]) -> Result[Bool, MonitorError]pub struct Reference {
// private fields
}fn Reference::new(plan : Plan, trace : Array[Observation], steps? : Int) -> Result[Reference, MonitorError]fn evaluate_reference(formula : Formula, trace : Array[Observation], position : Int, steps? : Int) -> Result[Bool, MonitorError]Install
Download zipBounded past metric temporal logic over timestamped Boolean observations