feat(argus-semantics): finish quantitative semantics
The Boolean semantics are still incomplete. The decision to keep the computations separate stays, as using the quantitative semantics for Boolean values (while sound) interpolates in weird places. May revisit this decision in the future
This commit is contained in:
parent
28a79cb88c
commit
ad9afb4eba
7 changed files with 858 additions and 337 deletions
|
|
@ -1,6 +1,5 @@
|
|||
//! Traits to define semantics for temporal logic specifications
|
||||
|
||||
use argus_core::expr::{IsBoolExpr, IsNumExpr};
|
||||
use argus_core::prelude::*;
|
||||
|
||||
/// A trace is a collection of signals
|
||||
|
|
@ -50,13 +49,3 @@ pub trait Trace {
|
|||
/// Query a signal using its name
|
||||
fn get<T: 'static>(&self, name: &str) -> Option<&Signal<T>>;
|
||||
}
|
||||
|
||||
/// Boolean semantics for a [`BoolExpr`] or type that is
|
||||
/// convertable to a [`BoolExpr`]
|
||||
pub trait BooleanSemantics: IsBoolExpr {
|
||||
fn eval(&self, trace: &impl Trace) -> ArgusResult<Signal<bool>>;
|
||||
}
|
||||
|
||||
pub trait QuantitativeSemantics: IsNumExpr {
|
||||
fn eval(&self, trace: &impl Trace) -> ArgusResult<Signal<bool>>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue