https://github.com/solidlabresearch/rspql-query-isomorphism
A library to determine isomorphism relation between two RSPQL queries.
https://github.com/solidlabresearch/rspql-query-isomorphism
Last synced: 8 months ago
JSON representation
A library to determine isomorphism relation between two RSPQL queries.
- Host: GitHub
- URL: https://github.com/solidlabresearch/rspql-query-isomorphism
- Owner: SolidLabResearch
- License: other
- Created: 2023-04-20T12:30:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T15:03:49.000Z (10 months ago)
- Last Synced: 2025-05-17T20:11:24.264Z (9 months ago)
- Language: TypeScript
- Homepage:
- Size: 284 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RSPQL Query Isomorphism
This is a library to determine isomorphism relation between two RSPQL queries.
## Coverage
[](coverage.html)
## Usage
Install the library using npm :
```
npm install rspql-query-isomorphism
```
Then, import the library in your code :
```
import { is_isomorphic } from 'rspql-query-isomorphism';
const query_one = `
PREFIX :
REGISTER RStream AS
SELECT (AVG(?v) as ?avgTemp)
FROM NAMED WINDOW :w1 ON STREAM :stream1 [RANGE 10 STEP 2]
WHERE{
WINDOW :w1 { ?sensor :value ?v ; :measurement: ?m }
}`;
const query_two = `
PREFIX :
REGISTER RStream AS
SELECT (AVG(?v) as ?avgTemp)
FROM NAMED WINDOW :w1 ON STREAM :stream2 [RANGE 10 STEP 2]
WHERE{
WINDOW :w1 { ?sensor :value ?v ; :measurement: ?m }
}`;
const result = is_isomorphic(query_one, query_two); // result = false
```
## License
This code is copyrighted by [Ghent University - imec](https://www.ugent.be/ea/idlab/en) and released under the [MIT Licence](./LICENCE)
## Contact
For any questions, please contact [Kush](mailto:kushbisen@proton.me).