SHaclEX is a Scala library that implements both ShEx and SHACL.

The library has been implemented in Scala which means that it can be used in any JVM environment. In principle, it could also work on Javascript compiling it with ScalaJs, but we haven’t tried it yet (see issue 117)

SHaclEX can be used as: - An independent comman line tool - A JAR library that can be invoked from other Scala or Java programs - Integrated in a Web application (see rdfshape)

About ShEx and SHACL

Modules and repositories

The library is composed of several modules and repositories.

The following diagram depicts the main modules and dependencies:

diagram classes


This module handles schema validation. It is a top-level module that invokes ShEx and SHACL engines.


This module can be used to convert between different schema formats and schema engines. As an example, it can be used to convert from ShEx to SHACL and from SHACL to ShEx.

Currently, only a subset of both languages can be converted.


Scala implementation of ShEx. This module has been separated to its own its own repository


Scala implementation of SHACL. This module has been separated to its own repository.


Scala implementation of ShapeMaps. This module has been separated to its own repository.


A simple Java application that invokes Shaclex.


RDFShape is a web service implemented using http4s.

RDFShape clients


A client of RDFShape which is deployed at It is implemented in Javascript using React.


Another client of RDFShape specialized on Wikidata and wikibase. It is deployed at


A Shape Expressions Editor. Deployed at:


Simple RDF library. This module contains a simple RDF interface for Scala. The module has its own repository and documentation.

We have two implementations of SRDF: - SRDFJena for Apache Jena - RDF4J for RDF4j


This module allows to infer schemas from RDF data.


This module contains an implementation of the S-Language, which is a minimal language that can represent both SHACL and ShEx.

The S-Language is described in this paper