Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fly/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ fn left_associative(_op: &BinOp) -> bool {
false
}

fn binder(b: &Binder) -> String {
/// Pretty-print a binder
pub fn binder(b: &Binder) -> String {
format!("{}:{}", b.name, sort(&b.sort))
}

Expand Down
4 changes: 4 additions & 0 deletions fly/src/semantics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ mod tests {
#[test]
#[allow(clippy::redundant_clone)]
fn test_eval() {
// TODO(oded): we should also test evaluation in the presence of
// quantifiers that shadow each other, e.g. evaluate:
// forall x. exists x. p(x).

let sort = |n: usize| Sort::Uninterpreted(format!("T{n}"));

let sig = Signature {
Expand Down
10 changes: 9 additions & 1 deletion fly/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ impl Sort {

impl From<&str> for Sort {
/// This is mostly for the Binder smart constructor, making it possible to
/// pass either Sort, &Sort, or &str
/// pass either Sort, &Sort, &str, or &String
fn from(value: &str) -> Self {
Self::uninterpreted(value)
}
}

impl From<&String> for Sort {
/// This is mostly for the Binder smart constructor, making it possible to
/// pass either Sort, &Sort, &str, or &String
fn from(value: &String) -> Self {
Self::uninterpreted(value)
}
}

impl From<&Sort> for Sort {
/// This is mostly for the Binder smart constructor, making it possible to
/// pass either Sort, &Sort, or &str
Expand Down
1 change: 1 addition & 0 deletions verify/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
pub mod error;
pub mod module;
pub mod safety;
pub mod temporal;
3 changes: 2 additions & 1 deletion verify/src/safety.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ use fly::transitions::{MaybeSpannedTerm, Proof};
/// A temporal property expressed as an invariant problem.
#[derive(Debug, Clone)]
pub struct InvariantAssertion {
sig: Signature,
/// The signature
pub sig: Signature,
/// The initial states
pub init: Term,
/// The states reachable in one step
Expand Down
Loading