Skip to content

Commit be22eeb

Browse files
committed
add readme
1 parent a5ba515 commit be22eeb

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SOVS
2+
SOVS is the Simple Ontology Visualization Specification language.
3+
4+
This crate consists of three components: The SOVS language itself, the verifier, and a test suite.
5+
6+
## Getting started
7+
Using SOVS to verify a visualization requires the following steps:
8+
- Define a conversion from your visualization format to a SOVS graph (i.e. implementing `From/TryFrom<T> for Specification`).
9+
- For each test case in the suite:
10+
- Turn the ontology into your visualization format.
11+
- Turn that into a SOVS graph using the previously defined conversion.
12+
- Compare the two using `Specification::is_isomorphic_to`.
13+
14+
In Rust, this would be something like:
15+
```rust
16+
#[test]
17+
fn sovs_suite() {
18+
for test_case in sovs_parser::test_cases() {
19+
let visualization = Visualization::new(test_case.text);
20+
let sovs = Specification::from(visualization);
21+
assert!(sovs.is_isomorphic_to(test_case.specification));
22+
}
23+
}
24+
```
25+
26+
## Syntax
27+
The syntax of SOVS is as follows:
28+
```math
29+
\begin{align}
30+
\mathbf{Spec} &::= (\mathbf{NodeDef} \mid \mathbf{EdgeDef})^* \\
31+
\mathbf{NodeDef} &::= \texttt{node} \ \mathbf{Id} \ \texttt{\{} \ \mathbf{Props} \ \texttt{\}} \\
32+
\mathbf{EdgeDef} &::= \texttt{edge} \ \mathbf{Id} \ \texttt{from} \ \mathbf{Id} \ \texttt{to} \ \mathbf{Id} \ \texttt{\{} \ \mathbf{Props} \ \texttt{\}} \\
33+
\mathbf{Props} &::= (\mathbf{PropertyName} \texttt{:} \mathbf{Value} \texttt{;})^* \\
34+
\mathbf{Id} &::= [\texttt{a-zA-Z\_}][\texttt{a-zA-Z0-9\_}]^* \\
35+
\mathbf{PropertyName} &::= [\texttt{a-zA-Z\_}][\texttt{a-zA-Z0-9\_:}]^* \\
36+
\mathbf{Value} &::= \texttt{"} \mathbf{String} \texttt{"}
37+
\end{align}
38+
```
39+
40+
For examples, see the [test suite](test-suite/sovs).

0 commit comments

Comments
 (0)