Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
Found CITATION.cff file -
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
Found .zenodo.json file -
βDOI references
Found 6 DOI reference(s) in README -
βAcademic publication links
Links to: wiley.com -
βAcademic email domains
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Keywords
Repository
π An interactive semantics explorer
Basic Info
- Host: GitHub
- Owner: TOPLLab
- License: mit
- Language: TypeScript
- Default Branch: master
- Homepage: https://doi.org/10.1002/spe.2959
- Size: 6.39 MB
Statistics
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
Readme.md
GraphRedex
GraphRedex an open-source tool that empowers language designers to interactively explore their reduction graphs. From a PLT Redex language definition and a program in the language, our tool creates an interactive reduction graph. Using GraphRedex for visualizing reduction graphs has three main benefits. First, a global exploration mode allows users to obtain a bird's-eye overview of the reduction graph and learn its high level workings. Second, a local exploration mode lets the programmer closely interact with the reduction rules. Third, a query interface allows the programmer to filter out or highlight specific features of the reduction graph.
Running the server
Clone the repository and run the following in the root dir.
bash
./run -c -b
Try ./run -h to see more options.
A web server will be live at http://localhost:3000. The default login is
demo:demo. The default password for the demo user can be set in
~/graphredex-login.json (as a hashed password). The contents of this file can
be generated be executing the following in the root of this repo:
bash
node <<<'require("./APIServer/dist/password.js").hashPassword("PASSWORD").then(x=>console.log(JSON.stringify(x)))'
Known issues when uploading a new language
racket
(require redex)
Should be replaced by
racket
(require redex/reduction-semantics)
All other GUI requires should be removed or replaced with a variant that does
not require a display.
This step is not needed when using docker.
Installation
Dependencies
- node
- OSX:
brew install node - Arch:
pacman -S nodejs(community/nodejs)
- OSX:
- yarn
- OSX
brew install yarn - Arch:
pacman -S yarn(community/yarn)
- OSX
- coreutils
- OSX:
brew install coreutils - Arch:
pacman -S coreutils(core/coreutils)
- OSX:
- ArangoDB (see below for setting it up)
- OSX:
brew install arangodb - Arch: install
aur/arangodbfrom the AUR
- OSX:
AragnoDB setup (database)
GraphRedex uses a graph database called ArangoDB.
We use version 3.5.2 but any version above 3.5 should be ok.
OSX users can install it with brew:
brew install arangodb
/usr/local/opt/arangodb/sbin/arangod &
Arch Linux users can install the arangodb3 package form the AUR and start
or enable the service using systemctl start arangodb3.service.
Configuration of ArangoDB
Once the database is installed it needs to be initialized with an initial
database and two users. Configuration of the database is browser based, the
default address is http://127.0.0.1:8529. The default password for the root
user is blank "".
Creating users
In order for GraphRedex to work it needs to have two users in the system called
graphredex-qry and graphredex. The user graphredex has read and write
access while the user graphredex-qry only has read access.
- In the browser, go to the tab "Users", and create a user called
graphredex-qrywith passwordgraphredex-qry. - In the browser, go to the tab "Users", and create a user called
graphredexwith passwordgraphredex.
Creating the database
Go to the tab "Databases" and make a database called graphredex-data make sure
to select graphredex as the owner.
Setting the permissions
Now that the database is created we still need to make sure that the permissions of the users are correct:
Go to the Users tab and select permissions tab:
In Users/graphredex in the permissions tab (these should normally already be set):
- give
graphredexadministrative access to the databasegraphredex-data - give
graphredexread/write access to all collections- Click on
graphredex-data - Select "Read/Write" access on the line with
*
- Click on
- give
In Users/graphredex-qry in the permissions tab:
- give
graphredex-qryaccess access on thegraphredex-dataΒ database - give
graphredex-qryread access to all collections in that database- Click on
graphredex-data - Select "Read only" access on the line with
*
- Click on
- give
Advanced options
Running code samples with docker
To run code we receive as input in a docker container, set the
GRAPHREDEX_DOCKER environment variable to 1.
bash
GRAPHREDEX_DOCKER=1 ./run -c
Note: read RedexServer/README.md for security guidelines.
Set reduction limit
You can set a limit on the number of reductions preformed by default by setting
the environment variable GRAPHREDEX_COUNT (default: 1000).
bash
GRAPHREDEX_COUNT=100 ./run -c
Allow the use (require redex)
This allows you to use xvfb. To emulate having a screen. This is enabled by default in de docker version and comes with a performance hit.
bash
GRAPHREDEX_XVFB=1 ./run -c
For the moment, you will need to pach xvfb-run with this path to get it to work.
Setting the root password of AranogDB for auto setup
GraphRedex has an auto-setup feature. This proccess creates the required
database and users. For this to work the root password of arangoDB is needed.
You will be prompted for this if needed. For usage in scripts, you can also set
the environment varaiable ARANGO_ROOT_PASSWORD to the passsword of the root
user of the DB. This varaiable not be passed to ran code.
Using your own plugins from the query pannel
If you create APIServer/public/dist/Plugin.js with an AMD style module
definition, the search panel will show an extra button named "custom". Clicking
this button will invoke the exports.default function. The two arguments
supplied are:
- The result from the AQL query
- A graphredex object with following properties
render(graph)highlight(graph)expand({_id: nodeid})
The function should return true on success.
Example content of Plugin.js
```js define(["exports"], function (exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = (graphredex, result) => { // This function will get the result console.log("Plugin GR got:", graphredex); console.log("Plugin R got:", result);
for (let e of result[0].nodes) {
e._formatted = e._key;
}
// continue rendering
return graphredex.render(result);
};
// Comment the line below to enable this plugin
// exports.default = null;
}); ```
Tip: this file can be autogenerated by creating Plugin.ts in
APIServer/public/js and exporting a default funciton with TypeScript.
Citing this
Did you use GraphRedex in your research? Please cite the following:
bibtex
@article{https://doi.org/10.1002/spe.2959,
author = {Gurdeep Singh, Robbert and Scholliers, Christophe},
title = {GraphRedex: Look at your research},
journal = {Software: Practice and Experience},
volume = {51},
number = {6},
pages = {1322-1351},
keywords = {operational semantics, PLT Redex, semantics engineering, state explosion, tooling, visualization},
doi = {https://doi.org/10.1002/spe.2959},
url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/spe.2959},
eprint = {https://onlinelibrary.wiley.com/doi/pdf/10.1002/spe.2959},
abstract = {Abstract A significant aspect of designing new programming languages is to define their operational semantics. Working with a pen and paper version of such a semantics is notoriously difficult. For this reason, tools for computer aided semantics engineering were created. Many of these tools allow programmers to execute their language's operational semantics. An executable semantics makes it easier to verify whether the execution of a program leads to the desired result. When a program exhibits unexpected behavior, the programmer can consult the reduction graph to see what went wrong. Unfortunately, visualization of these graphs is currently not well-supported by most tools. Consequently, the comprehension of errors remains challenging. In this article, we present GraphRedex an open-source tool that empowers language designers to interactively explore their reduction graphs, offering three main benefits. First, a global exploration mode allows users to obtain a bird's-eye overview of the reduction graph and learn its high level workings. Second, a local exploration mode lets the programmer closely interact with the individual reduction rules. Third, our query interface allows the programmer to filter out and highlight specific regions of the reduction graph. We evaluated our tool by carrying out a user study showing that participants comprehend programs on average twice as fast while being able to answer questions more accurately. Finally, we demonstrate how GraphRedex helps to understand the semantics of two published works. Exploration of the semantics with GraphRedex unveiled an issue in one of the implementations of these works, which the author confirmed.},
year = {2021}
}
Owner
- Name: TOPL Lab
- Login: TOPLLab
- Kind: organization
- Email: warduino@ugent.be
- Location: Ghent University
- Website: https://topllab.github.io
- Repositories: 9
- Profile: https://github.com/TOPLLab
Theory & Operations of Programming Languages Lab at Ghent University
Citation (CITATION.cff)
cff-version: 1.2.0
message: Please use the bibtex in the README to cite this work
title: 'GraphRedex: Look at your research'
doi: 10.1002/spe.2959
authors:
- family-names: Gurdeep Singh
given-names: Robbert
affiliation: Ghent University
- family-names: Scholliers
given-names: Christophe
affiliation: Ghent University
identifiers:
- description: Research paper you should be citing
type: doi
value: 10.1002/spe.2959
- type: url
value: https://redex.ugent.be
description: Public demo site of GraphRedex
preferred-citation:
authors:
- family-names: Gurdeep Singh
given-names: Robbert
affiliation: Ghent University
- family-names: Scholliers
given-names: Christophe
affiliation: Ghent University
title: 'GraphRedex: Look at your research'
doi: 10.1002/spe.2959
type: article
journal: 'Software: Practice and Experience'
number: '6'
volume: '51'
pages: 1322-1351
year: 2021
month: 3
abstract: A significant aspect of designing new programming languages is to define
their operational semantics. Working with a pen and paper version of such a semantics
is notoriously difficult. For this reason, tools for computer aided semantics
engineering were created. Many of these tools allow programmers to execute their
language's operational semantics. An executable semantics makes it easier to verify
whether the execution of a program leads to the desired result. When a program
exhibits unexpected behavior, the programmer can consult the reduction graph to
see what went wrong. Unfortunately, visualization of these graphs is currently
not well-supported by most tools. Consequently, the comprehension of errors remains
challenging. In this article, we present GraphRedex an open-source tool that empowers
language designers to interactively explore their reduction graphs, offering three
main benefits. First, a global exploration mode allows users to obtain a bird's-eye
overview of the reduction graph and learn its high level workings. Second, a local
exploration mode lets the programmer closely interact with the individual reduction
rules. Third, our query interface allows the programmer to filter out and highlight
specific regions of the reduction graph. We evaluated our tool by carrying out
a user study showing that participants comprehend programs on average twice as
fast while being able to answer questions more accurately. Finally, we demonstrate
how GraphRedex helps to understand the semantics of two published works. Exploration
of the semantics with GraphRedex unveiled an issue in one of the implementations
of these works, which the author confirmed.
keywords:
- operational semantics
- PLT Redex
- semantics engineering
- state explosion
- tooling
- visualization
GitHub Events
Total
- Delete event: 1
- Push event: 1
- Pull request event: 6
- Create event: 4
Last Year
- Delete event: 1
- Push event: 1
- Pull request event: 6
- Create event: 4
Dependencies
- @types/node ^13.7.6 development
- eslint ^5.8.0 development
- eslint-config-google ^0.11.0 development
- grunt-webpack ^3.1.3 development
- ts-loader ^8.0.0 development
- webpack ^4.43.0 development
- @types/body-parser ^1.17.1
- @types/d3 ^5.7.2
- @types/express ^4.17.2
- @types/request ^2.48.1
- arangojs ^6.14.0
- basic-auth ^2.0.1
- body-parser ^1.18.3
- css-loader ^3.6.0
- d3 ^5.16.0
- expose-loader ^1.0.0
- express ^4.16.4
- grunt ^1.5.3
- grunt-cli ^1.3.2
- grunt-contrib-less ^2.0.0
- grunt-contrib-watch ^1.1.0
- grunt-ts ^6.0.0-beta.21
- grunt-tslint ^5.0.2
- less-loader ^6.2.0
- multer ^1.4.1
- needle ^2.5.0
- purecss ^1.0.0
- raw-loader ^4.0.1
- to-string-loader ^1.1.6
- tslint ^5.11.0
- typescript ^3.7.4
- 703 dependencies
- node 10-stretch-slim build