Skip to content

Commit e49acf2

Browse files
authored
Extending HCTL syntax (#19)
* Add option to use hybrid operator names in formulas. * Update CI. * Update syntax details in readme.
1 parent f47e8de commit e49acf2

File tree

4 files changed

+222
-178
lines changed

4 files changed

+222
-178
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: build
2+
23
# This should ensure that the workflow won't run on `dev-*` branches, but will
3-
# otherwise execute on any other branch and any pull request (including dev
4-
# branches).
4+
# otherwise execute on any other branch and any pull request (including PRs
5+
# from dev branches).
56
on:
67
push:
78
branches-ignore:
@@ -16,86 +17,85 @@ env:
1617
# Make sure to update this from time to time.
1718
RUST_VERSION: "1.77.0"
1819
jobs:
19-
# Check formatting
20+
# Checks syntax formatting.
2021
fmt:
2122
name: Rustfmt
2223
runs-on: ubuntu-latest
2324
env:
2425
RUSTFLAGS: "-D warnings"
2526
steps:
26-
- name: Checkout.
27-
uses: actions/checkout@v3
28-
- name: Install Rust toolchain.
29-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }}
30-
- name: Rust format check.
31-
run: cargo fmt --all -- --check
27+
- uses: actions/checkout@v4
28+
- uses: dtolnay/rust-toolchain@stable
29+
with:
30+
toolchain: ${{ env.RUST_VERSION }}
31+
components: rustfmt
32+
- run: cargo fmt --all -- --check
3233

33-
# Run basic code validity check
34+
# Run basic code validity check.
3435
check:
3536
needs: fmt
3637
name: Check
3738
runs-on: ubuntu-latest
3839
env:
3940
RUSTFLAGS: "-D warnings"
4041
steps:
41-
- name: Checkout.
42-
uses: actions/checkout@v3
43-
- name: Install Rust toolchain.
44-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }}
45-
- name: Rust code validity check.
46-
run: cargo check
42+
- uses: actions/checkout@v4
43+
- uses: dtolnay/rust-toolchain@stable
44+
with:
45+
toolchain: ${{ env.RUST_VERSION }}
46+
- run: cargo check --all-features
4747

48-
# Run all tests
48+
# Run tests.
4949
test:
5050
needs: check
51-
name: Test Suite
51+
name: Test Suite (linux)
5252
runs-on: ubuntu-latest
5353
env:
5454
RUSTFLAGS: "-D warnings"
5555
steps:
56-
- uses: actions/checkout@v3
57-
- name: Checkout.
58-
uses: actions/checkout@v3
59-
- name: Install Rust toolchain.
60-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }}
61-
- name: Run tests.
62-
run: cargo test --all-features
56+
- uses: actions/checkout@v4
57+
- uses: dtolnay/rust-toolchain@stable
58+
with:
59+
toolchain: ${{ env.RUST_VERSION }}
60+
components: rustfmt
61+
- run: cargo test --all-features
6362

64-
# Check code style
63+
# Checks code style.
6564
clippy:
6665
needs: check
6766
name: Clippy
6867
runs-on: ubuntu-latest
6968
env:
7069
RUSTFLAGS: "-D warnings"
7170
steps:
72-
- name: Checkout.
73-
uses: actions/checkout@v3
74-
- name: Install Rust toolchain.
75-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }}
76-
- name: Run clippy.
77-
run: cargo clippy
71+
- uses: actions/checkout@v4
72+
- uses: dtolnay/rust-toolchain@stable
73+
with:
74+
toolchain: ${{ env.RUST_VERSION }}
75+
components: clippy
76+
- run: cargo clippy --all-features
7877

7978
# Compute code coverage
8079
codecov:
8180
needs: test
8281
name: Code coverage
8382
runs-on: ubuntu-latest
8483
steps:
85-
- name: Checkout.
86-
uses: actions/checkout@v3
87-
- name: Install Rust toolchain.
88-
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${{ env.RUST_VERSION }}
89-
- name: Setup cargo-tarpaulin.
90-
run: cargo install cargo-tarpaulin
91-
- name: Run tarpaulin to compute coverage.
92-
run: cargo tarpaulin --verbose --lib --examples --all-features --out xml
84+
- uses: actions/checkout@v4
85+
- uses: dtolnay/rust-toolchain@stable
86+
with:
87+
toolchain: ${{ env.RUST_VERSION }}
88+
# Install action using cargo-binstall, which is faster because we don't have to compile tarpaulin every time.
89+
- uses: taiki-e/install-action@v2
90+
with:
91+
tool: cargo-tarpaulin
92+
- run: cargo tarpaulin --verbose --lib --examples --all-features --out xml
9393
- name: Upload to codecov.io
94-
uses: codecov/codecov-action@v1.0.2
94+
uses: codecov/codecov-action@v4
9595
with:
9696
token: ${{ secrets.CODECOV_TOKEN }}
9797
- name: Archive code coverage results
98-
uses: actions/upload-artifact@v1
98+
uses: actions/upload-artifact@v4
9999
with:
100100
name: code-coverage-report
101101
path: cobertura.xml

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "biodivine-hctl-model-checker"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
authors = ["Ondřej Huvar <xhuvar@fi.muni.cz>", "Samuel Pastva <sam.pastva@gmail.com>"]
55
edition = "2021"
66
description = "Library for symbolic HCTL model checking on partially defined Boolean networks."
@@ -25,8 +25,8 @@ name = "convert-aeon-to-bnet"
2525
path = "src/bin/convert_aeon_to_bnet.rs"
2626

2727
[dependencies]
28-
biodivine-lib-bdd = ">=0.5.7, <1.0.0"
29-
biodivine-lib-param-bn = ">=0.5.1, <1.0.0"
28+
biodivine-lib-bdd = ">=0.5.22, <1.0.0"
29+
biodivine-lib-param-bn = ">=0.5.13, <1.0.0"
3030
clap = { version = "4.1.4", features = ["derive"] }
3131
rand = "0.8.5"
3232
termcolor = "1.1.2"

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ We use the following syntax:
8383
* forall x: `V{x}:`
8484
* parentheses: `(`, `)`
8585

86+
We also allow to specify the hybrid operators using their names (prefixed by backslash): `\bind`, `\jump`, `\exists`, `\forall`.
87+
You can use this syntax to write a formula like `\bind {x}: AG EF {x}`.
88+
Note that the default for serialization is the short format above.
89+
8690
The operator precedence is following (the lower, the stronger):
8791
* unary operators (negation + temporal): 1
8892
* binary temporal operators: 2

0 commit comments

Comments
 (0)