This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SWIPL = (() => { | |
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined; | |
if (typeof __filename !== 'undefined') _scriptDir = _scriptDir || __filename; | |
return ( | |
function(SWIPL) { | |
SWIPL = SWIPL || {}; | |
var Module = typeof SWIPL != "undefined" ? SWIPL : {}; | |
var readyPromiseResolve, readyPromiseReject; | |
Module["ready"] = new Promise(function(resolve, reject) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { QueryEngine } from '@comunica/query-sparql-solid'; | |
(async () => { | |
const qpfEndpoint = 'https://fragments.dbpedia.org/2016-04/en'; | |
const myEngine = new QueryEngine(); | |
const query = '?s ?p ?o' | |
const logStream = await myEngine.queryBindings(` | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
SELECT * WHERE { | |
?s ?p ?o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?p1 http://www.w3.org/2002/07/owl#sameAs ?p2) ^ (?p1 ?pp ?o) -> (?p2 ?pp ?o) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix owl: <http://www.w3.org/2002/07/owl#> . | |
foaf:Person owl:sameAs <http://example.org/jesse#Person> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This specification MUST be implmented by POD providers. | |
The Background Agent Service Specification (BASS) is developed as a way to enable *internet based* agents to *READ*, *MODIFY* and *WRITE* to PODS. | |
If there is a file `./agents.(ttl|rdf|xml|...)` located in the ROOT of a users POD then the provider MUST attempt to parse the file - if the file contains valid RDF data then it MUST execute the following logic | |
# Note this step may not be necessary, or, may be generalized to more similar contexts | |
?1) MUST apply RDF reasoning over the file, BASS ontology, and all imports of the BASS ontology. For security reasons, imports from the agents file SHOULD NOT be included. | |
2) TODO: Discuss how a file that looks like what is below should be processed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async execute({ rules, context }: IActionRdfReasonExecute): Promise<void> { | |
const nodes: IRuleNode[] = rules.map(rule => ({ rule, next: [] })); | |
// Creating rule dependencies | |
for (const n1 of nodes) { | |
for (const n2 of nodes) { | |
if (n1.rule.conclusion === false) { | |
continue; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CLOSED, ENDED } from 'asynciterator'; | |
import { ArrayIterator as OldArrayIterator } from 'asynciterator'; | |
import { ArrayIterator, AsyncIterator, range } from './asynciterator' | |
type Transform = { | |
type: 'filter'; | |
function: (elem: any) => boolean | |
} | { | |
type: 'map'; | |
function: (elem: any) => any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { CLOSED, ENDED } from 'asynciterator'; | |
import { ArrayIterator as OldArrayIterator } from 'asynciterator'; | |
import { ArrayIterator, AsyncIterator, range } from './asynciterator' | |
type Transform = { | |
type: 'filter'; | |
function: (elem: any) => boolean | |
} | { | |
type: 'map'; | |
function: (elem: any) => any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?uuu rdfs:subClassOf ?xxx) ^ (?vvv rdf:type ?uuu) -> (?vvv rdf:type ?xxx) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?p http://www.w3.org/2000/01/rdf-schema#domain ?c) ^ (?x ?p ?y) -> (?x http://www.w3.org/1999/02/22-rdf-syntax-ns#type ?c) | |
(?p http://www.w3.org/2000/01/rdf-schema#range ?c) ^ (?x ?p ?y) -> (?y http://www.w3.org/1999/02/22-rdf-syntax-ns#type ?c) | |
(?p http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#FunctionalProperty) ^ (?x ?p ?y1) ^ (?x ?p ?y2) -> (?y1 http://www.w3.org/2002/07/owl#sameAs ?y2) | |
(?p http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#InverseFunctionalProperty) ^ (?x1 ?p ?y) ^ (?x2 ?p ?y) -> (?x1 http://www.w3.org/2002/07/owl#sameAs ?x2) | |
(?p http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#IrreflexiveProperty) ^ (?x ?p ?x) -> false | |
(?p http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#SymmetricProperty) ^ (?x ?p ?y) -> (?y ?p ?x) | |
(?p http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://www.w3.org/2002/07/owl#AsymmetricProperty) ^ (?x ?p ?y) ^ (?y ?p ?x) -> false | |
(?p http://www.w3.or |