Skip to main content

Formula

Struct Formula 

Source
pub struct Formula(/* private fields */);
Expand description

A formula: an immutable value, cheap to clone and share.

Implementations§

Source§

impl Formula

Source

pub fn constant(value: bool) -> Formula

true or false.

Source

pub fn truth() -> Formula

true

Source

pub fn falsity() -> Formula

false

Source

pub fn is_well_formed(&self) -> bool

Whether this formula and all its parts are well formed.

Source

pub fn kind(&self) -> &FormulaKind

What the formula is made of.

Source

pub fn place(&self) -> &Place

Where it was built.

Source

pub fn own_errors(&self) -> &[Error]

The errors recorded when this node was built, not its parts’.

Source

pub fn placed(&self, place: Place) -> Formula

The same node, at another place, as Expr::placed.

Source

pub fn same_node(&self, other: &Formula) -> bool

Whether two handles are the same node.

Source

pub fn not(&self) -> Formula

not self

Source

pub fn and(&self, other: &Formula) -> Formula

self and other

Source

pub fn or(&self, other: &Formula) -> Formula

self or other

Source

pub fn and_all(formulas: impl IntoIterator<Item = Formula>) -> Formula

The conjunction of any number of formulas; true when there are none.

Source

pub fn or_all(formulas: impl IntoIterator<Item = Formula>) -> Formula

The disjunction of any number of formulas; false when there are none.

Source

pub fn implies(&self, other: &Formula) -> Formula

self implies other

Source

pub fn iff(&self, other: &Formula) -> Formula

self iff other

Source

pub fn quantified(q: Quantifier, decls: Vec<Decl>, body: &Formula) -> Formula

q x1: e1, ..., xm: em | body

Source

pub fn temporal(&self, op: TemporalOp) -> Formula

op self, for a unary temporal operator.

Source

pub fn temporal_binary(&self, op: TemporalBinaryOp, other: &Formula) -> Formula

self op other, for a binary temporal operator.

Source

pub fn after(&self) -> Formula

after self

Source

pub fn always(&self) -> Formula

always self

Source

pub fn eventually(&self) -> Formula

eventually self

Source

pub fn before(&self) -> Formula

before self

Source

pub fn historically(&self) -> Formula

historically self

Source

pub fn once(&self) -> Formula

once self

Source

pub fn until(&self, other: &Formula) -> Formula

self until other

Source

pub fn releases(&self, other: &Formula) -> Formula

self releases other

Source

pub fn since(&self, other: &Formula) -> Formula

self since other

Source

pub fn triggered(&self, other: &Formula) -> Formula

self triggered other

Source

pub fn past_depth(&self) -> usize

The greatest number of past operators nested in one another (LOGIC.md 13.3).

Source

pub fn is_temporal(&self) -> bool

Whether the formula has a temporal operator or a prime.

Source

pub fn all(decls: Vec<Decl>, body: &Formula) -> Formula

all x1: e1, ..., xm: em | body

Source

pub fn some(decls: Vec<Decl>, body: &Formula) -> Formula

some x1: e1, ..., xm: em | body

Source

pub fn no(decls: Vec<Decl>, body: &Formula) -> Formula

no x1: e1, ..., xm: em | body

Source

pub fn one(decls: Vec<Decl>, body: &Formula) -> Formula

one x1: e1, ..., xm: em | body

Source

pub fn lone(decls: Vec<Decl>, body: &Formula) -> Formula

lone x1: e1, ..., xm: em | body

Trait Implementations§

Source§

impl Clone for Formula

Source§

fn clone(&self) -> Formula

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Formula

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Formula

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Formula

§

impl Freeze for Formula
where *const ArcInner<FormulaNode> is !null: Freeze, PhantomData<ArcInner<FormulaNode>>: Freeze,

§

impl Move for Formula

§

impl RefUnwindSafe for Formula

§

impl Send for Formula
where Arc<FormulaNode>: Send,

§

impl Sync for Formula
where Arc<FormulaNode>: Sync,

§

impl Unpin for Formula
where Arc<FormulaNode>: Unpin,

§

impl UnsafeUnpin for Formula
where *const ArcInner<FormulaNode> is !null: UnsafeUnpin, PhantomData<ArcInner<FormulaNode>>: UnsafeUnpin,

§

impl UnwindSafe for Formula
where Arc<FormulaNode>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.