Giter Club home page Giter Club logo

terminusdb / terminusdb Goto Github PK

View Code? Open in Web Editor NEW
2.6K 36.0 101.0 14.03 MB

TerminusDB is a distributed database with a collaboration model

Home Page: https://terminusdb.com

License: Apache License 2.0

Prolog 82.18% Dockerfile 0.06% Shell 0.05% Smarty 0.10% Makefile 0.05% Python 0.05% JavaScript 7.33% Rust 10.18%
knowledge-graphs linked-data terminusdb collaboration revision-control immutable document-database graph-database acid database

terminusdb's Introduction

TerminusDB Logo

CI Issues

TerminusDB is a distributed database with a collaboration model.

It is designed to be like git, but for data. If you are reading this, give this repo a star.

The building blocks of the model are -

  • Revision Control: commits for every update
  • Diff: differences between commits can be interpreted as patches between states
  • Push/Pull/Clone: communicate diffs between nodes using push / pull / clone
  • Query: You can query any state of the database at any commit.

TerminusDB allows you to link JSON documents in a knowledge graph through a document API. TerminusDB is available as a standalone server, or you can use our headless content and knowledge management system TerminusCMS.

TerminusDB Version 11

TerminusDB 11 features a new Rustified storage backend that reduces storage overhead and latency, improves search performance, and simplifies interchange. TerminusDB 11 also comes with some exciting features to make building easier and faster -

  • GraphQL - Use GraphQL as a proper graph query language with deep link discover and path queries
  • Added @unfoldable document flag to frames - Making data curation easier by unfolding subdocuments within a frame to add all relevant data in one place
  • Add @metadata to frames - Include additional metadata to document frames including data formatted as Markdown.

Installation Guide

Get it from the Snap Store

The easiest way to install TerminusDB as a developer is by using the Snap. It does not provide a daemon and is mainly intended for developers that want to try TerminusDB.

For deployments, or if you want to use the local dashboard:

  1. Add the following to a .env file in the source directory:
OPENAI_KEY=YOUR_OPENAI_KEY_HERE
# And optionally specify number of pages for the vector database
# for instance
BUFFER_AMOUNT=120000
  1. docker compose up

You should be able to view TerminusDB running by default at localhost:6363

If you're installing TerminusDB on Windows with Docker, our friends at DFRNT wrote this comprehensive guide.

You can also install TerminusDB from the Source Code.

TerminusDB CLI

A simple example creating a person with friends can be created as follows:

terminusdb db create admin/example1
terminusdb doc insert --graph_type=schema admin/example1 <<EOF
{ "@id" : "Person",
  "@type" : "Class",
  "name" : "xsd:string",
  "occupation" : "xsd:string",
  "friends" : { "@type" : "Set",
                "@class" : "Person" }}
EOF
terminusdb doc insert admin/example1 --message='adding Gavin' <<EOF
{ "@type" : "Person","name" : "Gavin", "occupation" : "Coder"}
EOF

You can attach this to a database on TerminusCMS in order to distribute it by setting your remote. First you will need to create a resource from TerminusCMS. This is analogous to creating a repository on GitHub.

Log into TerminusCMS, create a new data product, and make sure you have an access token to the team in which we created that data product. Then copy the URL to clone from the data product info page.

If you make a data product called example in the team Terminators. We could then issue the following command using the TerminusDB CLI. You should get an API token from your profile page and replace 'XYZ' with this token.

terminusdb remote add admin/example1 origin 'https://cloud-dev.terminusdb.com/Terminators/example' --token='XYZ'
terminusdb fetch admin/example1 --token='XYZ'
terminusdb push admin/example1 --token='XYZ'

Once completed, you'll have a remote copy of this database.

More on the CLI here

Community

Come visit us on Discord or our community Subreddit. On Twitter, we're @TerminusDB.

Documentation

Check out our documentation site for more information: TerminusDB documentation website.

We are working hard to improve our docs - if you see an issue, please open an issue in the documentation repo.

White paper on our delta-encoding approach to data management.

Check the Python Client ๐Ÿ. Or the JavaScript Client ๐ŸŒ.

WOQL is a powerful query language that allows you to express complex patterns over arbitrary data structures concisely. What makes it so expressive and easy to use is the radical simplicity of the core underlying concepts.

Changes in this Version

Release Notes

Copyright

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

terminusdb's People

Contributors

alexander-mart avatar anniepoo avatar danipmax avatar dependabot[bot] avatar dmytri avatar drkameleon avatar dwinston avatar eltociear avatar fms12 avatar francesca-bit avatar gavinmendelgleason avatar gneissone avatar kevinchekovfeeney avatar kittyjose avatar luke-feeney avatar matko avatar oj423 avatar padraic7a avatar pmoura avatar pwin avatar rrooij avatar spl avatar tfidfwastaken avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terminusdb's Issues

Editing documents on the master database not possible

Editing a document on the master database is currently not possible and gives the error:

Error: API Error terminus:message Unable to guess a valid document store for database: database('http://localhost:6363/terminus',['http://localhost:6363/terminus/document'],['http://localhost:6363/terminus/inference'],['http://localhost:6363/terminus/schema'],[],[]) terminus:status terminus:failure Code: 404, url: http://localhost:6363/terminus/document/server

Steps to reproduce:

  1. Run start.pl
  2. Go to the dashboard on localhost:6363/dashboard
  3. Find the document id server and change the comment in something else
  4. Try to press save.

BUILD.md file in `dev` branch missing dependency?

In the dev branch, the BUILD.md file doesn't contain the following block compared with the master branch:

HDT Library

You will also need to install hdt-cpp. You can git clone the source tree from this repository:

git clone https://github.com/rdfhdt/hdt-cpp

But installing this dependency seems to still be required. In the master branch, the text above should ideally be moved before the instructions to install the SWI-Prolog hdt pack otherwise the installation may fail due to missing dependencies (that are listed in the hdt-cpp repo readme page). Back to the dev branch, if we try to set the admin user password using the command from the BUILD.md file:

$ utils/db_util -k "my_password_here" -s "my_server_name_here"

we will get an error that db_util doesn't exist. The command seems to have been renamed to initialize_database. But if we try it without first installing hdt-cppfrom its clone, we get an error that the required rdf2hdt command is not installed.

Summarizing:

  1. Installing hdt-cpp still seems to be required when using the dev branch.
  2. There's a typo in the dev branch BUILD.md file: db_util -> initialize_database .

I'm hesitant to submit a PR to fix the BUILD.md file in the dev branch as these issue seem to be caused by work-in-progress...

Missing predicate: initialise_prefix_db/1

Reported by the Logtalk make tool (on the dev branch):

*       initialise_prefix_db/1
*         referenced from object database_utils
*         in file /Users/pmoura/terminus-server/library/database_utils.pl at line 52

There's a definition for this predicate in the prefixes module. But there's no use_module(prefixes) directive in the database_utils module from where the predicate is called.

Creating a database twice results in internal server error

Creating a database with the API succeeds when trying it once:

curl -X POST 'localhost:6363/testdb' --user ':root' -H "Content-Type: application/json" -d@create_new_db.json

However, when running it a second time:

{
  "code":500,
  "message":"Type error: `json_term' expected, found `{'@value':'http://localhost:6363/testdb','@type':'xdd:url'}' (a compound)"

It should return an error message with a message that the database already exists.

To reproduce:

  1. Save this as create_new_db.json
{
    "@context": {
        "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
        "terminus": "http://terminusdb.com/schema/terminus#",
        "_": "http://localhost:6363/testdb/"
    },
    "terminus:document": {
        "@type": "terminus:Database",
        "rdfs:label": {
            "@language": "en",
            "@value": "test"
        },
        "rdfs:comment": {
            "@language": "en",
            "@value": "Test database"
        },
        "terminus:allow_origin": {
            "@type": "xsd:string",
            "@value": "*"
        },
        "@id": "http://localhost:6363/testdb"
    },
    "@type": "terminus:APIUpdate"
}
  1. Run the curl command (see the top of the issue)

WOQL instantiation errors should return the bound variable name

Currently we get a rather uninformative error message referring to an internal unbound prolog variable. We need to do a backwards lookup in the environment and report this instead. This could be a bit tricky as we need to catch in a context in which the environment is exposed to us. Potentially we need to do a re-throw wrapper around the entire prolog term compiled so that we can ensure this.

Internal server error when changing schema with API

Error

The following error appears when trying to change the schema from the terminus-server API:

{
  "code":500,
  "message":"Type error: `json_term' expected, found `base64_char(_9532,58)' (a compound)"
}

Expected result

A clear error message or a changed schema.

How to reproduce

  1. Create a database called testdb.
  2. Run the folllowing python3 script:
#!/usr/bin/env python3
import requests


headers = { 'Authorization' : 'Basic %s' %  ":root" }

small_turtle = """
@base <http://example.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rel: <http://www.perceive.net/schemas/relationship/> .

<#green-goblin>
    rel:enemyOf <#spiderman> ;
    a foaf:Person ;    # in the context of the Marvel universe
    foaf:name "Green Goblin" .

<#spiderman>
    rel:enemyOf <#green-goblin> ;
    a foaf:Person ;
    foaf:name "Spiderman" .
"""
payload = {
    "terminus:turtle": small_turtle,
    "terminus:schema": "http://localhost:6363/testdb/schema",
    "@type": "terminus:APIUpdate"
}
response = requests.post("http://localhost:6363/testdb/schema", json=payload, headers=headers)
print(response.text)

Circular module dependencies (just FYI)

Maybe the following data on circular module dependencies could be useful if you're planning some refactoring:

?- {@}.
% Scanning for circular entity dependencies ...
*     Circular references:
*       database-schema
*         in file /Users/pmoura/terminus-server/library/database.pl at line 104
*         in file /Users/pmoura/terminus-server/library/schema.pl at line 32
*       database-sdk
*         in file /Users/pmoura/terminus-server/library/database.pl at line 59
*         in file /Users/pmoura/terminus-server/library/sdk.pl at line 31
*       database-triplestore
*         in file /Users/pmoura/terminus-server/library/database.pl at line 66
*         in file /Users/pmoura/terminus-server/library/triplestore.pl at line 25
*       schema-triplestore
*         in file /Users/pmoura/terminus-server/library/schema.pl at line 33
*         in file /Users/pmoura/terminus-server/library/triplestore.pl at line 21
*       validate_instance-validate_schema
*         in file /Users/pmoura/terminus-server/library/validate_instance.pl at line 32
*         in file /Users/pmoura/terminus-server/library/validate_schema.pl at line 106
*       database-schema-schema_util
*         in file /Users/pmoura/terminus-server/library/database.pl at line 104
*         in file /Users/pmoura/terminus-server/library/schema.pl at line 35
*         in file /Users/pmoura/terminus-server/library/schema_util.pl at line 35
*       database-schema-triplestore
*         in file /Users/pmoura/terminus-server/library/database.pl at line 104
*         in file /Users/pmoura/terminus-server/library/schema.pl at line 33
*         in file /Users/pmoura/terminus-server/library/triplestore.pl at line 25
*       database-sdk-woql_compile
*         in file /Users/pmoura/terminus-server/library/database.pl at line 59
*         in file /Users/pmoura/terminus-server/library/sdk.pl at line 32
*         in file /Users/pmoura/terminus-server/library/woql_compile.pl at line 34
*     
% ... completed scanning for circular entity dependencies
true.

Logtalk make tool only reports two-way and three-way circular dependencies, however.

Single binary without any dependencies.

Developers are eagerly waiting for a modern, easy to use and manage database. It would be great If Terminusdb is released as a single binary without any other dependencies or requiring developers to install Docker. New storage engine is written in Rust lang, why not just also develop Terminusdb server in Rust lang and release it as a single binary.

I would also like to suggest a twitter account and discord server for community support.

Frames should use dictionaries

Currently we're lists of terms in frames.pl and really this should use dictionaries as it would make the code more suscinct, faster and more readable. It would also reduce the need to convert back and forth between dictionaries and this representation.

not recovering properly from invalid document in dashboard

  1. Follow the 'my first TerminusDB' example until you have the schema

  2. make a person. Fill in the id doc:twice
    and make a friend doc:nonexist

  3. Click Save
    EXPECTED: error message
    OBSERVED: no reaction

  4. click Save again
    EXPECTED: ????
    OBSERVED: NOW I get an error message - the message refers to the root of the document space, and generally is unhelpful

1 Violation Detected in Document
vio:UntypedInstanceThe subject 'http://localhost:6363/annie/document/foo' has no defined class.
vio:subjecthttp://localhost:6363/annie/document/foo

Missing predicate: woql_context/1

The Logtalk make tool reports (on the dev branch):

*       woql_context/1
*         referenced from object woql_compile
*         in file /Users/pmoura/terminus-server/library/woql_compile.pl at line 458

The only definition I find for the predicate is in the prefixes module where the predicate is an exported dynamic predicate. Not clear how the predicate becomes visible in the woql_compile module as there's not reference there (notably, via a use_module directive) to the prefixes module.

Missing predicate: write_cors_headers/1

The Logtalk make tool reports this missing ppredicate (on the dev branch):

*       write_cors_headers/1
*         referenced from object api
*         in file /Users/pmoura/terminus-server/library/api.pl at line 287

But the capabilities.pl module have the definition:

/*
 * write_cors_headers(Resource_URI) is det.
 *
 * Writes cors headers associated with Resource_URI
 */
write_cors_headers(Resource_URI, DB) :-
  ...

Work in progress?

rapper used in some rules

Rapper is used in checkpoint_to_turtle in library/file_utils.pl.

It is not listed as a dependency.

All unrecoverable errors should be http_reply exceptions

Instead of throwing for instance, type errors which yield 500s, we need to throw more informative status messages with JSON-LD objects. This will require scouring the code-base for throw and determining if this is a recoverable exception or not, or by making recovery catch http replies if it's impossible to disambiguate.

Spurious choice-points in frame.pl ?

Are the implicit choice-points created by the following member/2 and select/3 calls required?

https://github.com/terminusdb/terminus-server/blob/df1ba67477fd0d32f9f4062eb18e62e2982b2117/library/frame.pl#L818-L819

The call to the realise_triples/4 predicate from the object_edges/3 predicate suggests that those calls could be replaced with memberchk/2 and selectchk/3. As the realise_triples/4 predicate is recursive, these choice-points accumulate.

P.S. Given sort/2 semantics, the object_edges/3 predicate can also be rewritten as:

object_edges(URI,Database,Edges) :-
    (   most_specific_type(URI,Class,Database),
        class_frame(Class,Database,Frame),
        realise_triples(URI,Frame,Database,Unsorted)
    ->  sort(Unsorted,Edges)
    % There is no type in the database, so it doesn't exist...
    ;   Edges=[]).

WOQL 'get' should return literal wrapped elements.

Currently we are giving raw strings which is awkward and error prone. We don't want to be required to specify types when they are already strings or numbers, and we don't want to accidentally put random strings in to URI positions.

Build instructions for Fedora/Redhat

BUILD.md has instructions for Debian, but not Fedora.

So for fun I tried building on Fedora release 30 (Thirty), but no luck. I did this (as root):

dnf install pl
swipl
pack_install('https://github.com/GavinMendelGleason/hdt.git').

Create directory for packages
(1) * /root/lib/swipl/pack
(2) /usr/lib64/swipl-8.0.3/pack
(3) Cancel

Your choice?

% Cloning into '/usr/lib64/swipl-8.0.3/pack/hdt'...
Verify package status (anonymously)
at "https://www.swi-prolog.org/pack/query" Y/n?
% Contacting server at https://www.swi-prolog.org/pack/query ...
ERROR: Server reported the following error:
ERROR: No permission to register pack(hdt) `'https://github.com/GavinMendelGleason/hdt.git''
Package: hdt
Title: Access RDF HDT files
Installed version: 0.5
Author: Jan Wielemaker [email protected]
Maintainer: Jan Wielemaker [email protected]
Packager: Jan Wielemaker [email protected]
Home page: https://github.com/GavinMendelGleason/hdt
Download URL: https://github.com/GavinMendelGleason/hdt.git
Run post installation scripts for pack "hdt" Y/n?
% git submodule update --init
% Submodule 'hdt-cpp' (https://github.com/rdfhdt/hdt-cpp.git) registered for path 'hdt-cpp'
% Cloning into '/usr/lib64/swipl-8.0.3/pack/hdt/hdt-cpp'...
% Submodule path 'hdt-cpp': checked out 'a8aafe32e0209a50a7671ddd5376b5c0d6934496'
% cd hdt-cpp && ./autogen.sh
% aclocal: installing 'm4/pkg.m4' from '/usr/share/aclocal/pkg.m4'
% configure.ac:16: installing 'build/ar-lib'
% configure.ac:12: installing 'build/compile'
% configure.ac:5: installing 'build/install-sh'
% configure.ac:5: installing 'build/missing'
ERROR: libcds/Makefile.am:8: error: Libtool library used but 'LIBTOOL' is undefined
ERROR: libcds/Makefile.am:8: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
ERROR: libcds/Makefile.am:8: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
ERROR: libcds/Makefile.am:8: If 'LT_INIT' is in 'configure.ac', make sure
ERROR: libcds/Makefile.am:8: its definition is in aclocal's search path.
% libcds/Makefile.am: installing 'build/depcomp'
% parallel-tests: installing 'build/test-driver'
ERROR: libhdt/Makefile.am:23: error: Libtool library used but 'LIBTOOL' is undefined
ERROR: libhdt/Makefile.am:23: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
ERROR: libhdt/Makefile.am:23: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
ERROR: libhdt/Makefile.am:23: If 'LT_INIT' is in 'configure.ac', make sure
ERROR: libhdt/Makefile.am:23: its definition is in aclocal's search path.
% autoreconf: automake failed with exit status: 1
% make: *** [Makefile:23: hdt-cpp/libhdt/.make-senitel] Error 1
ERROR: Process "process(path(make),[all])": exit status: 2
ERROR: In:
ERROR: [18] throw(error(process_error(...,...),_28682))
ERROR: [16] '$apply':forall(prolog_pack:member(all,...),prolog_pack:run_process(...,...,...)) at /usr/lib64/swipl-8.0.3/boot/apply.pl:52
ERROR: [12] prolog_pack:pack_post_install(hdt,'/usr/lib64/swipl-8.0.3/pack/hdt',[git(true),...|...]) at /usr/lib64/swipl-8.0.3/library/prolog_pack.pl:1017
ERROR: [7]
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.

Capabilities analyser for woql

WOQL queries need to be analysed to assess which capabilities need to be present for execution, and then checked against auth_action_scope/3.

Creating huge schema results in bad performance

Steps to reproduce:

  1. Use the latest terminus-server
  2. Create a new database called testdb
  3. Click in the dashboard on schema -> edit schema -> and paste the attachment in the editor
    big_turtle.ttl.txt
  4. Save the edited schema

Results

Terminus gets very slow. It is definitely busy indexing the schema and the like, as my CPU usage gets crazy, but the dashboard UI makes it seem like everything is finished and ready.

Expected results

An indicator that the database is busy with indexing and the like and therefore will be slow. Or better performance for this in general. (this might be good to test again when terminus-store is implemented as storage backend)

Memory leaks

Problem

When querying a database, the memory usage of terminus-server keeps growing. This occurs on the dev branch with the terminus-store backend.

How to reproduce

  1. Start a system monitor (for instance gnome-system-monitor)
  2. Play around in the dashboard (click on schema, query etc.) and see the memory size of terminus-server getting bigger.

Additional information

Some valgrind logs of querying and the like:

==1408== 39,312 bytes in 1 blocks are still reachable in loss record 4,049 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5E9AE: do_init_atoms (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6515C: PL_new_atom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5CD68: PL_register_blob_type (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EFE9FF: initReservedSymbols (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5EB38: do_init_atoms (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6515C: PL_new_atom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F2C681: setPrologFlag (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6DFAD: PL_set_prolog_flag (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF42AD: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 39,312 bytes in 1 blocks are possibly lost in loss record 4,050 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5E9AE: do_init_atoms (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6515C: PL_new_atom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F2C681: setPrologFlag (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6DFAD: PL_set_prolog_flag (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF42AD: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 39,936 bytes in 18 blocks are still reachable in loss record 4,051 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB923A: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDB3F5: loadXRc (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDBE20: loadPredicate (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 41,400 bytes in 1,035 blocks are still reachable in loss record 4,052 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9BB28: lookupFunctorDef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EAAB96: pl_functor3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F08067: pl_with_mutex (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79F63: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6E3C: pl_notrace1_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EBB0F1: trapUndefined (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 41,472 bytes in 432 blocks are still reachable in loss record 4,053 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EBB445: pl_get_predicate_attribute (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79FA5: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 41,760 bytes in 1,740 blocks are still reachable in loss record 4,054 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB8B75: newClauseRef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB8C11: assertProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDBE90: loadPredicate (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDD25B: loadWicFromStream (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 41,984 bytes in 8 blocks are still reachable in loss record 4,055 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB923A: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E8DCC5: compileSubClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9399F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E94FFC: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 42,744 bytes in 137 blocks are possibly lost in loss record 4,056 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA25005B: alloc::alloc::alloc::he71f6672ff69332a (alloc.rs:84)
==1408==    by 0xA24FFCB: alloc::alloc::exchange_malloc::h46527e14373cbbb6 (alloc.rs:206)
==1408==    by 0xA1844FF: new<terminus_store::layer::child::ChildSubjectLookup<terminus_store::storage::directory::SharedMmap>> (boxed.rs:121)
==1408==    by 0xA1844FF: _$LT$terminus_store..layer..child..ChildLayer$LT$M$GT$$u20$as$u20$terminus_store..layer..layer..Layer$GT$::lookup_subject::h0c968e5564fb6aac (child.rs:378)
==1408==    by 0xA34C2AA: _$LT$terminus_store..store..StoreLayer$u20$as$u20$terminus_store..layer..layer..Layer$GT$::lookup_subject::hc31873af51cae373 (mod.rs:205)
==1408==    by 0xA5BEC30: _$LT$terminus_store..store..sync..SyncStoreLayer$u20$as$u20$terminus_store..layer..layer..Layer$GT$::lookup_subject::hf2365060bef0b9b4 (sync.rs:163)
==1408==    by 0xA284D7D: layer_lookup_subject (lib.rs:351)
==1408==    by 0x9EB2A6B: pl_layer_lookup_subject (terminus_store.c:589)
==1408==    by 0x4E79FA5: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EE5A3B: start_thread (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x60384A3: start_thread (pthread_create.c:456)
==1408== 
==1408== 44,032 bytes in 10 blocks are still reachable in loss record 4,057 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB923A: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E8DCC5: compileSubClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9399F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9396F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E94FFC: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 44,032 bytes in 56 blocks are still reachable in loss record 4,058 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F901: updateHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA9135: exportProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA92D8: export_pi (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA92F0: pl_export1_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 46,608 bytes in 1,942 blocks are still reachable in loss record 4,059 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB8B75: newClauseRef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E616D2: addClauseBucket (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E618AD: addClauseToIndex (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E61BC0: hashDefinition (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E62368: first_clause_guarded (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E636FA: firstClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E7B4D8: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 47,104 bytes in 7 blocks are still reachable in loss record 4,060 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB923A: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95E06: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 49,152 bytes in 1 blocks are possibly lost in loss record 4,061 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5C628: allocateAtomBlock.part.6 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D474: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9A5DD: registerBuiltins (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9A908: initBuildIns (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4ED0CCC: setupProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF42B2: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 49,248 bytes in 2 blocks are still reachable in loss record 4,062 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E61ACD: hashDefinition (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E62368: first_clause_guarded (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E636FA: firstClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E7B4D8: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EBB0F1: trapUndefined (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E72C10: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 49,440 bytes in 56 blocks are still reachable in loss record 4,063 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E61ACD: hashDefinition (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E62368: first_clause_guarded (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E636FA: firstClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E7B4D8: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 54,643 bytes in 1 blocks are still reachable in loss record 4,064 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E8D2C8: initWamTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4ED0B9E: setupProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF42B2: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 56,952 bytes in 113 blocks are still reachable in loss record 4,065 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA66B22B: alloc::alloc::alloc::h5720529faf6a4289 (alloc.rs:84)
==1408==    by 0xA66B19B: alloc::alloc::exchange_malloc::h96e4bb19607190fc (alloc.rs:206)
==1408==    by 0xA677F65: new<crossbeam_queue::seg_queue::Block<alloc::sync::Arc<tokio_threadpool::task::Task>>> (boxed.rs:121)
==1408==    by 0xA677F65: crossbeam_queue::seg_queue::SegQueue$LT$T$GT$::push::h60912bed1aa34d4c (seg_queue.rs:201)
==1408==    by 0xA68D264: tokio_threadpool::worker::entry::WorkerEntry::remotely_complete_task::hb324e0f074062ccf (entry.rs:266)
==1408==    by 0xA69BA66: tokio_threadpool::worker::Worker::run_task::h1ecf2a8dd4e7574e (mod.rs:515)
==1408==    by 0xA69AEDF: tokio_threadpool::worker::Worker::try_steal_task::hbf0e24cb88f05cbd (mod.rs:416)
==1408==    by 0xA69A4B9: tokio_threadpool::worker::Worker::try_run_task::h54601ba776355230 (mod.rs:301)
==1408==    by 0xA69A2F5: tokio_threadpool::worker::Worker::run::ha620171d3f5df792 (mod.rs:241)
==1408==    by 0xA61BA9B: tokio::runtime::threadpool::builder::Builder::build::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hf1a0f86368d24d90 (builder.rs:390)
==1408==    by 0xA629E3B: tokio_timer::timer::handle::with_default::_$u7b$$u7b$closure$u7d$$u7d$::h7f92321d998b87fc (handle.rs:101)
==1408==    by 0xA627C63: std::thread::local::LocalKey$LT$T$GT$::try_with::h0591efca88fdf8c2 (local.rs:262)
==1408== 
==1408== 58,544 bytes in 3,659 blocks are still reachable in loss record 4,066 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EEE291: addProcedureSourceFile (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95CB0: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 59,920 bytes in 1,498 blocks are still reachable in loss record 4,067 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9BB28: lookupFunctorDef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC05F9: build_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC5B14: simple_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC6FFB: complex_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC7A2A: read_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC90E0: read_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC9374: pl_read_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 64,416 bytes in 671 blocks are still reachable in loss record 4,068 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E8DCC5: compileSubClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9399F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E94FFC: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 64,524 bytes in 6,007 blocks are still reachable in loss record 4,069 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D4D8: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC448C: get_token__LD.part.37 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC4EBB: simple_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC6FFB: complex_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC7A2A: read_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC90E0: read_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC9374: pl_read_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 64,800 bytes in 675 blocks are still reachable in loss record 4,070 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95E06: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 65,536 bytes in 1 blocks are still reachable in loss record 4,071 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F931: addNewHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB7F06: importDefinitionModule (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDD25B: loadWicFromStream (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 65,536 bytes in 1 blocks are still reachable in loss record 4,072 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9B755: rehashFunctors.part.0 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9BADE: lookupFunctorDef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB4E49: pl_univ2_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 65,536 bytes in 1 blocks are definitely lost in loss record 4,073 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9B94F: registerFunctor (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9BC9A: lookupFunctorDef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC05F9: build_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC5B14: simple_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC6FFB: complex_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC7A2A: read_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC90E0: read_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC9374: pl_read_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 65,544 bytes in 1 blocks are still reachable in loss record 4,074 of 4,104
==1408==    at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==1408==    by 0x4ED0708: stack_realloc (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9FCA3: growStacks (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4ECF053: pl_trim_stacks0_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 69,360 bytes in 68 blocks are still reachable in loss record 4,075 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x111EA983: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111EB281: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111EB4D7: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111E0CA9: el_init_fd (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111E0DC4: el_init (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x10FD2378: pl_wrap (in /usr/lib/swipl/lib/x86_64-linux/libedit4pl.so)
==1408==    by 0x4E79FEC: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 69,360 bytes in 68 blocks are still reachable in loss record 4,076 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x111EAA23: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111EB281: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111EB4D7: ??? (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111E0CA9: el_init_fd (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x111E0DC4: el_init (in /usr/lib/x86_64-linux-gnu/libedit.so.2.0.55)
==1408==    by 0x10FD2378: pl_wrap (in /usr/lib/swipl/lib/x86_64-linux/libedit4pl.so)
==1408==    by 0x4E79FEC: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 75,376 bytes in 1,346 blocks are possibly lost in loss record 4,077 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA25005B: alloc::alloc::alloc::he71f6672ff69332a (alloc.rs:84)
==1408==    by 0xA24FFCB: alloc::alloc::exchange_malloc::h46527e14373cbbb6 (alloc.rs:206)
==1408==    by 0xA281C29: new<terminus_store::store::sync::SyncStoreLayer> (boxed.rs:121)
==1408==    by 0xA281C29: named_graph_get_head (lib.rs:92)
==1408==    by 0x9EB194C: pl_head (terminus_store.c:76)
==1408==    by 0x4E79F63: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EE5A3B: start_thread (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x60384A3: start_thread (pthread_create.c:456)
==1408== 
==1408== 77,066 bytes in 1,562 blocks are possibly lost in loss record 4,078 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA6FF59B: alloc::alloc::alloc::hd4aea4183502f317 (alloc.rs:84)
==1408==    by 0xA6FF381: _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::alloc::h480641302563a5de (alloc.rs:172)
==1408==    by 0xA6FD4F1: alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::hdf0c932391516013 (raw_vec.rs:98)
==1408==    by 0xA6FD315: alloc::raw_vec::RawVec$LT$T$GT$::with_capacity::he59c15e7bbc32409 (raw_vec.rs:142)
==1408==    by 0xA6FB7D3: alloc::vec::Vec$LT$T$GT$::with_capacity::h01034cb82ca16857 (vec.rs:356)
==1408==    by 0xA6FBEE0: alloc::slice::hack::to_vec::ha47e2e0d5411d604 (slice.rs:158)
==1408==    by 0xA6FF714: alloc::slice::_$LT$impl$u20$$u5b$T$u5d$$GT$::to_vec::h4998449c8f1d41db (slice.rs:379)
==1408==    by 0xA6D8684: alloc::slice::_$LT$impl$u20$alloc..borrow..ToOwned$u20$for$u20$$u5b$T$u5d$$GT$::to_owned::h46d730f63c69ab9c (slice.rs:716)
==1408==    by 0xA519399: alloc::str::_$LT$impl$u20$alloc..borrow..ToOwned$u20$for$u20$str$GT$::to_owned::h6c513b92cb4e973a (str.rs:207)
==1408==    by 0xA42AE95: terminus_store::storage::directory::get_label_from_file::hfe4de0f255ba6d3f (directory.rs:185)
==1408==    by 0xA42C7B0: _$LT$terminus_store..storage..directory..DirectoryLabelStore$u20$as$u20$terminus_store..storage..label..LabelStore$GT$::get_label::h3bc90d719ba2e3c2 (directory.rs:257)
==1408== 
==1408== 83,136 bytes in 866 blocks are still reachable in loss record 4,079 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDB3F5: loadXRc (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDBE20: loadPredicate (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDD25B: loadWicFromStream (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 86,880 bytes in 905 blocks are still reachable in loss record 4,080 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E8DCC5: compileSubClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9399F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E9396F: compileBody (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E94FFC: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 89,536 bytes in 293 blocks are still reachable in loss record 4,081 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95587: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EBB0F1: trapUndefined (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E72C10: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 98,304 bytes in 1 blocks are still reachable in loss record 4,082 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5C628: allocateAtomBlock.part.6 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D474: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4ED8292: getAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDB304: loadXRc (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDB370: loadXRc (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC786: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 98,304 bytes in 8 blocks are still reachable in loss record 4,083 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA6EE06B: alloc::alloc::alloc::ha26ad29b2718f601 (alloc.rs:84)
==1408==    by 0xA6EDE51: _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::alloc::hd4fce9f3a1e51fd6 (alloc.rs:172)
==1408==    by 0xA6E9FF1: alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::h4992af088d19145b (raw_vec.rs:98)
==1408==    by 0xA6E9E65: alloc::raw_vec::RawVec$LT$T$GT$::with_capacity::h40203dd55ac5499a (raw_vec.rs:142)
==1408==    by 0xA6F5033: alloc::vec::Vec$LT$T$GT$::with_capacity::ha16120202ccaaf0f (vec.rs:356)
==1408==    by 0xA6F0728: mio::sys::unix::epoll::Events::with_capacity::h7ee83912fc62963e (epoll.rs:184)
==1408==    by 0xA6E4C37: mio::poll::Events::with_capacity::h76433514da4913ed (poll.rs:1362)
==1408==    by 0xA63B1CD: tokio_reactor::Reactor::new::hded064c06aa038fb (lib.rs:256)
==1408==    by 0xA61AF56: tokio::runtime::threadpool::builder::Builder::build::h5c3ebe8c09353878 (builder.rs:356)
==1408==    by 0xA61A374: tokio::runtime::threadpool::Runtime::new::h1069aba4c726ff08 (mod.rs:145)
==1408==    by 0xA4BC54D: __static_ref_initialize (sync.rs:18)
==1408==    by 0xA4BC54D: core::ops::function::FnOnce::call_once::h343c611514ba4125 (function.rs:235)
==1408== 
==1408== 99,968 bytes in 1,562 blocks are possibly lost in loss record 4,084 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA25005B: alloc::alloc::alloc::he71f6672ff69332a (alloc.rs:84)
==1408==    by 0xA24FFCB: alloc::alloc::exchange_malloc::h46527e14373cbbb6 (alloc.rs:206)
==1408==    by 0xA281811: new<terminus_store::store::sync::SyncNamedGraph> (boxed.rs:121)
==1408==    by 0xA281811: open_named_graph (lib.rs:70)
==1408==    by 0x9EB18A6: pl_open_named_graph (terminus_store.c:56)
==1408==    by 0x4E79FA5: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EE5A3B: start_thread (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x60384A3: start_thread (pthread_create.c:456)
==1408== 
==1408== 115,536 bytes in 574 blocks are still reachable in loss record 4,085 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95587: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95FE5: pl_assertz11_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 118,848 bytes in 7,428 blocks are still reachable in loss record 4,086 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA8621: import (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA8B70: pl_import2_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 121,344 bytes in 1,264 blocks are still reachable in loss record 4,087 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA9293: export_pi (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA92F0: pl_export1_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 131,072 bytes in 1 blocks are still reachable in loss record 4,088 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D154: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC448C: get_token__LD.part.37 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC4EBB: simple_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC6FFB: complex_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC7A2A: read_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC90E0: read_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC9374: pl_read_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 135,264 bytes in 1,409 blocks are still reachable in loss record 4,089 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB9186: lookupProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EBB445: pl_get_predicate_attribute (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79FA5: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 151,216 bytes in 610 blocks are still reachable in loss record 4,090 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDBC36: loadPredicate (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDD25B: loadWicFromStream (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4983: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 162,352 bytes in 1,274 blocks are still reachable in loss record 4,091 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95587: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95FE5: pl_assertz11_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F08067: pl_with_mutex (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79F63: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6C2B: callProlog (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6E3C: pl_notrace1_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 163,840 bytes in 3 blocks are still reachable in loss record 4,092 of 4,104
==1408==    at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==1408==    by 0xA66B2FC: alloc::alloc::realloc::h8a506f3cbb6b31d2 (alloc.rs:128)
==1408==    by 0xA66B085: _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::realloc::hb3182a071ab63438 (alloc.rs:187)
==1408==    by 0xA68B4FC: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_internal::h831f47b119d22fb7 (raw_vec.rs:670)
==1408==    by 0xA68C321: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve::h0ab4df7f50cf5bac (raw_vec.rs:495)
==1408==    by 0xA67AB59: alloc::vec::Vec$LT$T$GT$::reserve::h52b1de304f27808a (vec.rs:458)
==1408==    by 0xA67A9D8: alloc::vec::Vec$LT$T$GT$::push::ha3ca665daa1a1f25 (vec.rs:1103)
==1408==    by 0xA6A52CA: slab::Slab$LT$T$GT$::insert_at::h368e1806d6c9a02c (lib.rs:632)
==1408==    by 0xA6A4F8D: slab::Slab$LT$T$GT$::insert::h00760eb0289b4efd (lib.rs:593)
==1408==    by 0xA68D0FD: tokio_threadpool::worker::entry::WorkerEntry::register_task::h2dc22e18db88036e (entry.rs:246)
==1408==    by 0xA69B3C2: tokio_threadpool::worker::Worker::run_task::h1ecf2a8dd4e7574e (mod.rs:456)
==1408==    by 0xA69AEDF: tokio_threadpool::worker::Worker::try_steal_task::hbf0e24cb88f05cbd (mod.rs:416)
==1408== 
==1408== 199,848 bytes in 711 blocks are still reachable in loss record 4,093 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95587: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E6D8AC: PL_toplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108724: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 320,912 bytes in 160 blocks are still reachable in loss record 4,094 of 4,104
==1408==    at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==1408==    by 0xA6D97FC: alloc::alloc::realloc::h44faf8366b2dd8f5 (alloc.rs:128)
==1408==    by 0xA6D95C5: _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::realloc::h1401f2a0cb8d81be (alloc.rs:187)
==1408==    by 0xA6E2A2C: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_internal::h4c6160995cb76387 (raw_vec.rs:670)
==1408==    by 0xA6E2DF1: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve::h02e7114964f068bf (raw_vec.rs:495)
==1408==    by 0xA6DAD09: alloc::vec::Vec$LT$T$GT$::reserve::h3e715be6561b28cf (vec.rs:458)
==1408==    by 0xA439AD7: std::io::read_to_end_with_reservation::ha4f7121a3e92b640 (mod.rs:369)
==1408==    by 0xA4399D9: std::io::read_to_end::h26ee9a584052e32d (mod.rs:356)
==1408==    by 0xA439F54: std::io::Read::read_to_end::h2b0c8315939ac5b6 (mod.rs:648)
==1408==    by 0xA5248F2: _$LT$tokio_io..io..read_to_end..ReadToEnd$LT$A$GT$$u20$as$u20$futures..future..Future$GT$::poll::hb08d089e542610dd (read_to_end.rs:56)
==1408==    by 0xA364B9E: _$LT$futures..future..map..Map$LT$A$C$F$GT$$u20$as$u20$futures..future..Future$GT$::poll::h6f8cdb8e2e4ee012 (map.rs:30)
==1408==    by 0xA394429: _$LT$futures..future..either..Either$LT$A$C$B$GT$$u20$as$u20$futures..future..Future$GT$::poll::h5e4dca6ff650928d (either.rs:36)
==1408== 
==1408== 330,120 bytes in 655 blocks are still reachable in loss record 4,095 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA66B22B: alloc::alloc::alloc::h5720529faf6a4289 (alloc.rs:84)
==1408==    by 0xA66B19B: alloc::alloc::exchange_malloc::h96e4bb19607190fc (alloc.rs:206)
==1408==    by 0xA677F65: new<crossbeam_queue::seg_queue::Block<alloc::sync::Arc<tokio_threadpool::task::Task>>> (boxed.rs:121)
==1408==    by 0xA677F65: crossbeam_queue::seg_queue::SegQueue$LT$T$GT$::push::h60912bed1aa34d4c (seg_queue.rs:201)
==1408==    by 0xA68D264: tokio_threadpool::worker::entry::WorkerEntry::remotely_complete_task::hb324e0f074062ccf (entry.rs:266)
==1408==    by 0xA69BA66: tokio_threadpool::worker::Worker::run_task::h1ecf2a8dd4e7574e (mod.rs:515)
==1408==    by 0xA69AA56: tokio_threadpool::worker::Worker::try_run_owned_task::hd80973516daca83e (mod.rs:390)
==1408==    by 0xA69A49C: tokio_threadpool::worker::Worker::try_run_task::h54601ba776355230 (mod.rs:297)
==1408==    by 0xA69A2F5: tokio_threadpool::worker::Worker::run::ha620171d3f5df792 (mod.rs:241)
==1408==    by 0xA61BA9B: tokio::runtime::threadpool::builder::Builder::build::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hf1a0f86368d24d90 (builder.rs:390)
==1408==    by 0xA629E3B: tokio_timer::timer::handle::with_default::_$u7b$$u7b$closure$u7d$$u7d$::h7f92321d998b87fc (handle.rs:101)
==1408==    by 0xA627C63: std::thread::local::LocalKey$LT$T$GT$::try_with::h0591efca88fdf8c2 (local.rs:262)
==1408== 
==1408== 330,752 bytes in 125 blocks are still reachable in loss record 4,096 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F10A: htable_alloc_kvs (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F47F: htable_put (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F1F891: addHTable (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA867E: import (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EA8B70: pl_import2_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 360,448 bytes in 5 blocks are still reachable in loss record 4,097 of 4,104
==1408==    at 0x4C2DDCF: realloc (vg_replace_malloc.c:785)
==1408==    by 0xA66B2FC: alloc::alloc::realloc::h8a506f3cbb6b31d2 (alloc.rs:128)
==1408==    by 0xA66B085: _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Alloc$GT$::realloc::hb3182a071ab63438 (alloc.rs:187)
==1408==    by 0xA68B4FC: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_internal::h831f47b119d22fb7 (raw_vec.rs:670)
==1408==    by 0xA68C321: alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve::h0ab4df7f50cf5bac (raw_vec.rs:495)
==1408==    by 0xA67AB59: alloc::vec::Vec$LT$T$GT$::reserve::h52b1de304f27808a (vec.rs:458)
==1408==    by 0xA67A9D8: alloc::vec::Vec$LT$T$GT$::push::ha3ca665daa1a1f25 (vec.rs:1103)
==1408==    by 0xA6A52CA: slab::Slab$LT$T$GT$::insert_at::h368e1806d6c9a02c (lib.rs:632)
==1408==    by 0xA6A4F8D: slab::Slab$LT$T$GT$::insert::h00760eb0289b4efd (lib.rs:593)
==1408==    by 0xA68D0FD: tokio_threadpool::worker::entry::WorkerEntry::register_task::h2dc22e18db88036e (entry.rs:246)
==1408==    by 0xA69B3C2: tokio_threadpool::worker::Worker::run_task::h1ecf2a8dd4e7574e (mod.rs:456)
==1408==    by 0xA69AA56: tokio_threadpool::worker::Worker::try_run_owned_task::hd80973516daca83e (mod.rs:390)
==1408== 
==1408== 441,456 bytes in 18,394 blocks are still reachable in loss record 4,098 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E60CCD: allocHeapOrHalt (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB8B75: newClauseRef (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB8C11: assertProcedure (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95CC7: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 460,440 bytes in 1,740 blocks are still reachable in loss record 4,099 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDBC36: loadPredicate (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDC5CC: loadPart (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDCA4D: loadStatement (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EDD25B: loadWicFromStream (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4983: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 589,824 bytes in 2 blocks are possibly lost in loss record 4,100 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5C628: allocateAtomBlock.part.6 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D474: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4F2191C: PL_unify_text (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB4603: atomic_list_concat (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== 786,432 bytes in 1 blocks are still reachable in loss record 4,101 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5C628: allocateAtomBlock.part.6 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D474: lookupBlob (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E5D6F4: lookupAtom (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC448C: get_token__LD.part.37 (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC4EBB: simple_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC6FFB: complex_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC7A2A: read_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC90E0: read_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EC9374: pl_read_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408== 
==1408== 1,532,416 bytes in 11,972 blocks are still reachable in loss record 4,102 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA66B22B: alloc::alloc::alloc::h5720529faf6a4289 (alloc.rs:84)
==1408==    by 0xA66B19B: alloc::alloc::exchange_malloc::h96e4bb19607190fc (alloc.rs:206)
==1408==    by 0xA6A6DBD: alloc::sync::Arc$LT$T$GT$::new::h39278ecbb3715592 (sync.rs:306)
==1408==    by 0xA6992FF: _$LT$$RF$tokio_threadpool..sender..Sender$u20$as$u20$tokio_executor..executor..Executor$GT$::spawn::he41a8e947bc04f02 (sender.rs:168)
==1408==    by 0xA4B9EE5: tokio_threadpool::sender::Sender::spawn::hff27a00b7db63eee (sender.rs:84)
==1408==    by 0xA4E555D: _$LT$tokio_threadpool..sender..Sender$u20$as$u20$futures..future..Executor$LT$T$GT$$GT$::execute::heb0eb5a86d418f85 (sender.rs:207)
==1408==    by 0xA4B84B1: _$LT$tokio..runtime..threadpool..task_executor..TaskExecutor$u20$as$u20$futures..future..Executor$LT$T$GT$$GT$::execute::hba082e0ddfdb4670 (task_executor.rs:65)
==1408==    by 0xA38E4BB: futures::sync::oneshot::spawn::h1836a491ca64c44b (oneshot.rs:517)
==1408==    by 0xA5BF4BB: terminus_store::store::sync::SyncStore::open::hdc8943dc25014f5b (sync.rs:282)
==1408==    by 0xA28170E: open_named_graph (lib.rs:67)
==1408==    by 0x9EB18A6: pl_open_named_graph (terminus_store.c:56)
==1408== 
==1408== 1,532,416 bytes in 11,972 blocks are still reachable in loss record 4,103 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0xA66B22B: alloc::alloc::alloc::h5720529faf6a4289 (alloc.rs:84)
==1408==    by 0xA66B19B: alloc::alloc::exchange_malloc::h96e4bb19607190fc (alloc.rs:206)
==1408==    by 0xA6A6DBD: alloc::sync::Arc$LT$T$GT$::new::h39278ecbb3715592 (sync.rs:306)
==1408==    by 0xA6992FF: _$LT$$RF$tokio_threadpool..sender..Sender$u20$as$u20$tokio_executor..executor..Executor$GT$::spawn::he41a8e947bc04f02 (sender.rs:168)
==1408==    by 0xA4B9DC5: tokio_threadpool::sender::Sender::spawn::hedd6cb8ecb813ff8 (sender.rs:84)
==1408==    by 0xA4E538D: _$LT$tokio_threadpool..sender..Sender$u20$as$u20$futures..future..Executor$LT$T$GT$$GT$::execute::hc30fa031c999c532 (sender.rs:207)
==1408==    by 0xA4B838F: _$LT$tokio..runtime..threadpool..task_executor..TaskExecutor$u20$as$u20$futures..future..Executor$LT$T$GT$$GT$::execute::h78ab25535157aa3b (task_executor.rs:65)
==1408==    by 0xA38F6A5: futures::sync::oneshot::spawn::hbf18f4b4bf54e1ba (oneshot.rs:517)
==1408==    by 0xA5BEFF7: terminus_store::store::sync::SyncNamedGraph::head::ha3dbb3d9050b7690 (sync.rs:236)
==1408==    by 0xA281B08: named_graph_get_head (lib.rs:85)
==1408==    by 0x9EB194C: pl_head (terminus_store.c:76)
==1408== 
==1408== 4,341,320 bytes in 18,394 blocks are still reachable in loss record 4,104 of 4,104
==1408==    at 0x4C2BBAF: malloc (vg_replace_malloc.c:299)
==1408==    by 0x4E63358: PL_malloc_atomic_unmanaged (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95587: compileClause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E95BCE: assert_term (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E96136: record_clause (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E961C9: pl_record_clause3_va (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4E79C62: PL_next_solution (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB675A: query_loop (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EB6F8A: prologToplevel (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x4EF4ACF: PL_initialise (in /usr/lib/swipl/lib/x86_64-linux/libswipl.so.8.0.3)
==1408==    by 0x108718: main (in /usr/lib/swipl/bin/x86_64-linux/swipl)
==1408== 
==1408== LEAK SUMMARY:
==1408==    definitely lost: 160,800 bytes in 205 blocks
==1408==    indirectly lost: 8,192 bytes in 1 blocks
==1408==      possibly lost: 1,221,173 bytes in 14,903 blocks
==1408==    still reachable: 15,880,378 bytes in 149,101 blocks
==1408==                       of which reachable via heuristic:
==1408==                         length64           : 106,520 bytes in 3 blocks
==1408==                         newarray           : 55,160 bytes in 1,594 blocks
==1408==         suppressed: 0 bytes in 0 blocks
==1408== 
==1408== For counts of detected and suppressed errors, rerun with: -v
==1408== Use --track-origins=yes to see where uninitialised values come from
==1408== ERROR SUMMARY: 69934 errors from 461 contexts (suppressed: 0 from 0)

Missing predicate: schema:subsumptionOf/3

The Logtalk make tool reports (on the dev branch):

*       schema::subsumptionOf/3
*         referenced from object frame
*         in file /Users/pmoura/terminus-server/library/frame.pl at line 149

I could not find any definition in the schema module for this predicate (or in the schema_util that it reexports). But the validate_schema module does define the subsumptionOf/3 predicate.

xrdf_db type checking and subsumption

When queries are made in which the type of the input query differs from the stored literal result only by the type, the type should be checked for subsumption by the type given in the query.

For example:

ask(DB, 
        t(URI, some/predicate, Value^^(xsd/string))
       )

Should also get you anything of Value^^(xdd/email) etc.

JSON Errors need to be lifted to schema driven JSON-LD

We are currently returning ad-hoc javascript objects. These really need to conform to the ontology to which they refer, together with a context object so they can be statelessly interpreted, with a valid '@type'. Should there be a seperate API ontology for talking about interchange messages? Should it all live in "vio"? Or is "vio" meant only for data conformance checking.

WOQL needs to find all needed write targets

The WOQL compiler needs to know which write targets exist at the point of setting up a transaction. This requires meta-analysis of the WOQL in advanced of compilation. We can do this with the capability traversal, or we can do a specialised traversal.

Server Endpoint management fixes

Currently there are two places in which it is necessary to specify the server name. One is in the configuration script which creates the initial terminus database. The other is a legacy config/config.pl which allowed some configuration of predicates.

We should be trying to move as much as possible to the terminus database. This means the initial startup script should probably use a configuration file to draw from - perhaps config.pl in order to set defaults. Much better that this information resides in one place than two.

The configuration script also doesn't handle different protocols (https versus http) and just takes the server name. This is obviously wrong. We need to either increase the number of parameters to the script, or draw them from configuration.

We may also need to think about how we deal with slight difference of server. Apache has virtual servers to handle this issue. This is easy enough in swipl, but not actually achieved by the current code.

Generate diagrams for the application

I cannot do this myself yet as I'm still missing the correct version of the serd dependency on my macOS laptop. But you may have fun generating diagrams for the application.

First, start Logtalk using either the swilgt script or the pack:

?- pack_install(logtalk).
...

?- use_module(library(logtalk)).
...

Then, load the application and try the next queries:

?- [start].
...

?- {diagrams(loader)}.
...

?- working_directory(TerminusDB, TerminusDB),
   file_search_path(swi, SWIHome),
   atom_concat(SWIHome, '/library', Library),
   git_hash(Hash, []),
   atomic_list_concat(['https://github.com/terminusdb/terminus-server/tree/',Hash,'/'], Git),
   diagrams::rdirectory(
       terminusdb,
       '.',
       [
           zoom(true),
           path_url_prefixes(TerminusDB, Git, ''),
           path_url_prefixes(Library, 'https://github.com/SWI-Prolog/swipl-devel/tree/master/library/', ''),
           omit_path_prefixes([TerminusDB, Library]),
           title('TerminusDB'),
           layout(top_to_bottom)
        ]
   ).

The last query assumes that [start] loads all the application files. If that's not the case, load any missing files first.

Possible bug in setof/3 call in frame module

In the setof/3 call in the following clause:

https://github.com/terminusdb/terminus-server/blob/82871e8522e9cf993b0f53cad8ada3994a007901/library/frame.pl#L730-L750

the Logtalk linter reports:

*     Suspicious call: A^(inferredEdge(B,C,A,D),(schema:document(A,D)->(E=<1->F=[A];G is E-1,document_object(A,D,G,H),H=[I,J|F]);realiser(A,K,D,E,F))) in setof/3 goal contains singleton variables [I,J]
*       while compiling object frame
*       in file /Users/pmoura/terminus-server/library/frame.pl between lines 730-750

The reported variables are _Type and _Id in the sub-goal:

Object = [_Type,_Id|New_Realiser]

This may be a false positive as in #14. Still using complex goals in all-solutions predicate calls is not ideal for performance and readability. Here, a suitably named auxiliary predicate would improve the code and simplify the setof/3 call by also eliminating the need of existentially qualify any variables.

Missing predicate: is_rdf_object/1

Reported by the Logtalk make tool (on the devbranch):

*       is_rdf_object/1
*         referenced from object types
*         in file /Users/pmoura/terminus-server/library/types.pl at line 210

That line does contain a likely relevant comment:

% Why is this alone?
error:has_type(rdf_object, Rdf_Object):-
    is_rdf_object(Rdf_Object).

Thus, I assume this is an already known issue?

Possible bug in setof/3 call

In the following predicate definition:

https://github.com/terminusdb/terminus-server/blob/152b2f58c869523f2ad5ffeecbb702045d3a84d2/library/validate_schema.pl#L476-L482

the Logtalk linter reports:

*     Suspicious call: xrdf(A,B,C,D,E) in setof/3 goal contains singleton variable D
*       while compiling object validate_schema
*       in file /Users/pmoura/terminus-server/library/validate_schema.pl between lines 476-482

The reported singleton variable can result in multiple solutions (one per binding of the variable) where a single solution is expected.

Can't start terminus on macOS 10.14.6

I've been following the instructions from the README.md, installed swi-prolog, installed hdt-cpp but whe I try to run ./start.pl i get the following:

ERROR: /Users/nemanjav/dev/terminusdb/library/triplestore.pl:18:
source_sink library(hdt)' does not exist Warning: /Users/nemanjav/dev/terminusdb/library/triplestore.pl:18: Goal (directive) failed: triplestore:use_module(library(hdt)) ERROR: /Users/nemanjav/dev/terminusdb/library/triplestore.pl:625:20: Syntax error: Operator expected ERROR: /Users/nemanjav/dev/terminusdb/library/triplestore.pl:627:20: Syntax error: Operator expected ERROR: /Users/nemanjav/dev/terminusdb/library/json_ld.pl:34: source_sink library(mavis)' does not exist
Warning: /Users/nemanjav/dev/terminusdb/library/json_ld.pl:34:
Goal (directive) failed: json_ld:use_module(library(mavis))
ERROR: /Users/nemanjav/dev/terminusdb/library/api.pl:90:7: Syntax error: Operator expected
ERROR: /Users/nemanjav/dev/terminusdb/library/api.pl:103:7: Syntax error: Operator expected
Warning: /Users/nemanjav/dev/terminusdb/library/api.pl:122:
Singleton variables: [DB]
Warning: /Users/nemanjav/dev/terminusdb/library/api.pl:128:
Singleton variables: [Auth]
ERROR: /Users/nemanjav/dev/terminusdb/library/api.pl:128:
Full stop in clause-body? Cannot redefine ,/2
Warning: /Users/nemanjav/dev/terminusdb/library/api.pl:131:
Singleton variables: [DB]
Warning: /Users/nemanjav/dev/terminusdb/library/api.pl:137:
Singleton variables: [Data]
ERROR: /Users/nemanjav/dev/terminusdb/library/api.pl:137:
Full stop in clause-body? Cannot redefine ,/2
Warning: /Users/nemanjav/dev/terminusdb/library/api.pl:160:
Singleton variables: [Request,Method,DB,Docid]
% Started server at http://localhost:6363/

** Syncing schema in collection 'http://localhost/capability'
ERROR: /Users/nemanjav/dev/terminusdb/start.pl:21: Initialization goal raised exception:
ERROR: ''/1: Undefined procedure: triplestore:hdt_open/2
Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit http://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

?-

What am I doing wrong? I also don't see hdt.pl in the library folder. Is that maybe the cause of the problem?

Frames need to be genuine JSON-LD

Frames are currently a well defined but undocumented and ontology free json structure. This isn't good enough! Needs to be ontologised and made into genuine JSON-LD return object.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.