eyeling 1.31.0 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -3
- package/browser.d.ts +63 -0
- package/dist/browser/eyeling.browser.js +336 -15
- package/eyeling-builtins.ttl +3 -3
- package/eyeling.js +336 -15
- package/index.d.ts +221 -298
- package/lib/builtins.js +297 -14
- package/lib/rdfjs.js +39 -1
- package/package.json +7 -3
- package/test/builtins.test.js +49 -1
package/index.d.ts
CHANGED
|
@@ -1,322 +1,245 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface RdfJsNamedNode extends RdfJsTerm {
|
|
9
|
-
termType: 'NamedNode';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface RdfJsBlankNode extends RdfJsTerm {
|
|
13
|
-
termType: 'BlankNode';
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface RdfJsVariable extends RdfJsTerm {
|
|
17
|
-
termType: 'Variable';
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface RdfJsDefaultGraph extends RdfJsTerm {
|
|
21
|
-
termType: 'DefaultGraph';
|
|
22
|
-
value: '';
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface RdfJsLiteral extends RdfJsTerm {
|
|
26
|
-
termType: 'Literal';
|
|
27
|
-
language: string;
|
|
28
|
-
datatype: RdfJsNamedNode;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface RdfJsQuad extends RdfJsTerm {
|
|
32
|
-
termType: 'Quad';
|
|
33
|
-
value: '';
|
|
34
|
-
subject: RdfJsTerm;
|
|
35
|
-
predicate: RdfJsTerm;
|
|
36
|
-
object: RdfJsTerm;
|
|
37
|
-
graph: RdfJsTerm;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface RdfJsDataFactory {
|
|
41
|
-
namedNode(value: string): RdfJsNamedNode;
|
|
42
|
-
blankNode(value?: string): RdfJsBlankNode;
|
|
43
|
-
literal(value: string, languageOrDatatype?: string | RdfJsNamedNode): RdfJsLiteral;
|
|
44
|
-
variable(value: string): RdfJsVariable;
|
|
45
|
-
defaultGraph(): RdfJsDefaultGraph;
|
|
46
|
-
quad(subject: RdfJsTerm, predicate: RdfJsTerm, object: RdfJsTerm, graph?: RdfJsTerm): RdfJsQuad;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface EyelingPrefixEnv {
|
|
50
|
-
_type?: 'PrefixEnv';
|
|
51
|
-
map: Record<string, string>;
|
|
52
|
-
baseIri?: string;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface EyelingIri {
|
|
56
|
-
_type?: 'Iri';
|
|
57
|
-
value: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface EyelingLiteral {
|
|
61
|
-
_type?: 'Literal';
|
|
62
|
-
value: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface EyelingVar {
|
|
66
|
-
_type?: 'Var';
|
|
67
|
-
name: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface EyelingBlank {
|
|
71
|
-
_type?: 'Blank';
|
|
72
|
-
label: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface EyelingListTerm {
|
|
76
|
-
_type?: 'ListTerm';
|
|
77
|
-
elems: EyelingTerm[];
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface EyelingOpenListTerm {
|
|
81
|
-
_type?: 'OpenListTerm';
|
|
82
|
-
prefix: EyelingTerm[];
|
|
83
|
-
tailVar: string;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface EyelingGraphTerm {
|
|
87
|
-
_type?: 'GraphTerm';
|
|
88
|
-
triples: EyelingTriple[];
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export type EyelingTerm =
|
|
92
|
-
| EyelingIri
|
|
93
|
-
| EyelingLiteral
|
|
94
|
-
| EyelingVar
|
|
95
|
-
| EyelingBlank
|
|
96
|
-
| EyelingListTerm
|
|
97
|
-
| EyelingOpenListTerm
|
|
98
|
-
| EyelingGraphTerm
|
|
99
|
-
| RdfJsNamedNode
|
|
100
|
-
| RdfJsBlankNode
|
|
101
|
-
| RdfJsVariable
|
|
102
|
-
| RdfJsLiteral
|
|
103
|
-
| RdfJsQuad;
|
|
1
|
+
export interface EyelingPrefixEnv {
|
|
2
|
+
_type?: 'PrefixEnv';
|
|
3
|
+
map: Record<string, string>;
|
|
4
|
+
baseIri?: string;
|
|
5
|
+
}
|
|
104
6
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
o: EyelingTerm;
|
|
110
|
-
}
|
|
7
|
+
export interface EyelingIri {
|
|
8
|
+
_type?: 'Iri';
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
111
11
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
isForward?: boolean;
|
|
117
|
-
isFuse?: boolean;
|
|
118
|
-
headBlankLabels?: Iterable<string> | string[];
|
|
119
|
-
__dynamicConclusionTerm?: EyelingTerm;
|
|
120
|
-
}
|
|
12
|
+
export interface EyelingLiteral {
|
|
13
|
+
_type?: 'Literal';
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
121
16
|
|
|
122
|
-
|
|
17
|
+
export interface EyelingVar {
|
|
18
|
+
_type?: 'Var';
|
|
19
|
+
name: string;
|
|
20
|
+
}
|
|
123
21
|
|
|
124
|
-
|
|
22
|
+
export interface EyelingBlank {
|
|
23
|
+
_type?: 'Blank';
|
|
24
|
+
label: string;
|
|
25
|
+
}
|
|
125
26
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
27
|
+
export interface EyelingListTerm {
|
|
28
|
+
_type?: 'ListTerm';
|
|
29
|
+
elems: EyelingTerm[];
|
|
30
|
+
}
|
|
130
31
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
rules?: EyelingRule[] | EyelingAstBundle;
|
|
137
|
-
factsN3?: string;
|
|
138
|
-
n3Facts?: string;
|
|
139
|
-
prefixesN3?: string;
|
|
140
|
-
n3Prefixes?: string;
|
|
141
|
-
prefixes?: EyelingPrefixEnv;
|
|
142
|
-
triples?: EyelingTriple[];
|
|
143
|
-
forwardRules?: EyelingRule[];
|
|
144
|
-
frules?: EyelingRule[];
|
|
145
|
-
backwardRules?: EyelingRule[];
|
|
146
|
-
brules?: EyelingRule[];
|
|
147
|
-
queryRules?: EyelingRule[];
|
|
148
|
-
logQueryRules?: EyelingRule[];
|
|
149
|
-
qrules?: EyelingRule[];
|
|
150
|
-
ast?: EyelingAstBundle;
|
|
151
|
-
document?: EyelingAstBundle;
|
|
152
|
-
}
|
|
32
|
+
export interface EyelingOpenListTerm {
|
|
33
|
+
_type?: 'OpenListTerm';
|
|
34
|
+
prefix: EyelingTerm[];
|
|
35
|
+
tailVar: string;
|
|
36
|
+
}
|
|
153
37
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
type?: 'memory' | 'persistent';
|
|
159
|
-
backend?: 'memory' | 'level' | 'indexeddb';
|
|
160
|
-
}
|
|
38
|
+
export interface EyelingGraphTerm {
|
|
39
|
+
_type?: 'GraphTerm';
|
|
40
|
+
triples: EyelingTriple[];
|
|
41
|
+
}
|
|
161
42
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
43
|
+
export type EyelingTerm =
|
|
44
|
+
| EyelingIri
|
|
45
|
+
| EyelingLiteral
|
|
46
|
+
| EyelingVar
|
|
47
|
+
| EyelingBlank
|
|
48
|
+
| EyelingListTerm
|
|
49
|
+
| EyelingOpenListTerm
|
|
50
|
+
| EyelingGraphTerm
|
|
51
|
+
| import('@rdfjs/types').NamedNode
|
|
52
|
+
| import('@rdfjs/types').BlankNode
|
|
53
|
+
| import('@rdfjs/types').Variable
|
|
54
|
+
| import('@rdfjs/types').Literal
|
|
55
|
+
| import('@rdfjs/types').Quad;
|
|
56
|
+
|
|
57
|
+
export interface EyelingTriple {
|
|
58
|
+
_type?: 'Triple';
|
|
59
|
+
s: EyelingTerm;
|
|
60
|
+
p: EyelingTerm;
|
|
61
|
+
o: EyelingTerm;
|
|
62
|
+
}
|
|
173
63
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
api: any;
|
|
184
|
-
}
|
|
64
|
+
export interface EyelingRule {
|
|
65
|
+
_type?: 'Rule';
|
|
66
|
+
premise: EyelingTriple[];
|
|
67
|
+
conclusion: EyelingTriple[];
|
|
68
|
+
isForward?: boolean;
|
|
69
|
+
isFuse?: boolean;
|
|
70
|
+
headBlankLabels?: Iterable<string> | string[];
|
|
71
|
+
__dynamicConclusionTerm?: EyelingTerm;
|
|
72
|
+
}
|
|
185
73
|
|
|
186
|
-
|
|
74
|
+
export type EyelingAstBundle = [EyelingPrefixEnv, EyelingTriple[], EyelingRule[], EyelingRule[], EyelingRule[]?];
|
|
187
75
|
|
|
188
|
-
|
|
189
|
-
baseIri?: string | null;
|
|
190
|
-
proof?: boolean;
|
|
191
|
-
includeInputFactsInClosure?: boolean;
|
|
192
|
-
enforceHttps?: boolean;
|
|
193
|
-
rdfjs?: boolean;
|
|
194
|
-
dataFactory?: RdfJsDataFactory | null;
|
|
195
|
-
skipUnsupportedRdfJs?: boolean;
|
|
196
|
-
builtinModules?: string | string[];
|
|
197
|
-
store?: string | StoreOptions;
|
|
198
|
-
storePath?: string;
|
|
199
|
-
storeClear?: boolean;
|
|
200
|
-
onDerived?: (item: { triple: string; quad?: RdfJsQuad; quads?: RdfJsQuad[]; df: any }) => void;
|
|
201
|
-
}
|
|
76
|
+
export type N3Source = string | { n3?: string; text?: string; baseIri?: string; label?: string };
|
|
202
77
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
queryMode: boolean;
|
|
208
|
-
queryTriples: any[];
|
|
209
|
-
queryDerived: any[];
|
|
210
|
-
closureN3: string;
|
|
211
|
-
closureQuads?: RdfJsQuad[];
|
|
212
|
-
queryQuads?: RdfJsQuad[];
|
|
213
|
-
}
|
|
78
|
+
export interface N3SourceListInput {
|
|
79
|
+
sources: N3Source[];
|
|
80
|
+
scopeBlankNodes?: boolean;
|
|
81
|
+
}
|
|
214
82
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
83
|
+
export interface RdfJsReasonInput {
|
|
84
|
+
n3?: string;
|
|
85
|
+
quads?: Iterable<import('@rdfjs/types').Quad> | AsyncIterable<import('@rdfjs/types').Quad>;
|
|
86
|
+
facts?: Iterable<import('@rdfjs/types').Quad> | AsyncIterable<import('@rdfjs/types').Quad>;
|
|
87
|
+
dataset?: Iterable<import('@rdfjs/types').Quad> | AsyncIterable<import('@rdfjs/types').Quad>;
|
|
88
|
+
rules?: EyelingRule[] | EyelingAstBundle;
|
|
89
|
+
factsN3?: string;
|
|
90
|
+
n3Facts?: string;
|
|
91
|
+
prefixesN3?: string;
|
|
92
|
+
n3Prefixes?: string;
|
|
93
|
+
prefixes?: EyelingPrefixEnv;
|
|
94
|
+
triples?: EyelingTriple[];
|
|
95
|
+
forwardRules?: EyelingRule[];
|
|
96
|
+
frules?: EyelingRule[];
|
|
97
|
+
backwardRules?: EyelingRule[];
|
|
98
|
+
brules?: EyelingRule[];
|
|
99
|
+
queryRules?: EyelingRule[];
|
|
100
|
+
logQueryRules?: EyelingRule[];
|
|
101
|
+
qrules?: EyelingRule[];
|
|
102
|
+
ast?: EyelingAstBundle;
|
|
103
|
+
document?: EyelingAstBundle;
|
|
104
|
+
}
|
|
224
105
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
clear(): Promise<void>;
|
|
233
|
-
close(): Promise<void>;
|
|
234
|
-
}
|
|
106
|
+
export interface StoreOptions {
|
|
107
|
+
name?: string;
|
|
108
|
+
clear?: boolean;
|
|
109
|
+
path?: string;
|
|
110
|
+
type?: 'memory' | 'persistent';
|
|
111
|
+
backend?: 'memory' | 'level' | 'indexeddb';
|
|
112
|
+
}
|
|
235
113
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
114
|
+
export interface ReasonOptions {
|
|
115
|
+
proof?: boolean;
|
|
116
|
+
proofComments?: boolean;
|
|
117
|
+
noProofComments?: boolean;
|
|
118
|
+
rdf?: boolean;
|
|
119
|
+
args?: string[];
|
|
120
|
+
maxBuffer?: number;
|
|
121
|
+
builtinModules?: string | string[];
|
|
122
|
+
store?: string | StoreOptions;
|
|
123
|
+
storePath?: string;
|
|
124
|
+
storeClear?: boolean;
|
|
125
|
+
}
|
|
245
126
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
): ReasonStreamResult;
|
|
258
|
-
export function reasonRdfJs(
|
|
259
|
-
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
260
|
-
opts?: Omit<ReasonStreamOptions, 'rdfjs' | 'onDerived'>,
|
|
261
|
-
): AsyncIterable<RdfJsQuad>;
|
|
127
|
+
export interface BuiltinRegistrationContext {
|
|
128
|
+
iri: string;
|
|
129
|
+
goal: EyelingTriple;
|
|
130
|
+
subst: Record<string, EyelingTerm>;
|
|
131
|
+
facts: EyelingTriple[];
|
|
132
|
+
backRules: EyelingRule[];
|
|
133
|
+
depth: number;
|
|
134
|
+
varGen: number[];
|
|
135
|
+
maxResults?: number;
|
|
136
|
+
api: unknown;
|
|
137
|
+
}
|
|
262
138
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
139
|
+
export type BuiltinHandler = (ctx: BuiltinRegistrationContext) => Array<Record<string, EyelingTerm>>;
|
|
140
|
+
|
|
141
|
+
export interface ReasonStreamOptions {
|
|
142
|
+
baseIri?: string | null;
|
|
143
|
+
proof?: boolean;
|
|
144
|
+
includeInputFactsInClosure?: boolean;
|
|
145
|
+
enforceHttps?: boolean;
|
|
146
|
+
rdfjs?: boolean;
|
|
147
|
+
dataFactory?: import('@rdfjs/types').DataFactory<import('@rdfjs/types').Quad, import('@rdfjs/types').Quad> | null;
|
|
148
|
+
skipUnsupportedRdfJs?: boolean;
|
|
149
|
+
builtinModules?: string | string[];
|
|
150
|
+
store?: string | StoreOptions;
|
|
151
|
+
storePath?: string;
|
|
152
|
+
storeClear?: boolean;
|
|
153
|
+
onDerived?: (item: { triple: string; quad?: import('@rdfjs/types').Quad; quads?: import('@rdfjs/types').Quad[]; df: import('@rdfjs/types').DataFactory<import('@rdfjs/types').Quad, import('@rdfjs/types').Quad> }) => void;
|
|
271
154
|
}
|
|
272
155
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
export type FactStore = import('eyeling').FactStore;
|
|
156
|
+
export interface ReasonStreamResult {
|
|
157
|
+
prefixes: EyelingPrefixEnv;
|
|
158
|
+
facts: EyelingTriple[];
|
|
159
|
+
derived: EyelingTriple[];
|
|
160
|
+
queryMode: boolean;
|
|
161
|
+
queryTriples: EyelingTriple[];
|
|
162
|
+
queryDerived: EyelingTriple[];
|
|
163
|
+
closureN3: string;
|
|
164
|
+
closureQuads?: import('@rdfjs/types').Quad[];
|
|
165
|
+
queryQuads?: import('@rdfjs/types').Quad[];
|
|
166
|
+
}
|
|
285
167
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
): Promise<
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
):
|
|
294
|
-
|
|
295
|
-
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
296
|
-
opts?: Omit<ReasonStreamOptions, 'rdfjs' | 'onDerived'>,
|
|
297
|
-
): AsyncIterable<RdfJsQuad>;
|
|
168
|
+
export interface FactStore {
|
|
169
|
+
add(triple: EyelingTriple, kind?: 'explicit' | 'inferred'): Promise<boolean>;
|
|
170
|
+
has(triple: EyelingTriple): Promise<boolean>;
|
|
171
|
+
kindOf?(triple: EyelingTriple): Promise<number>;
|
|
172
|
+
match(s?: EyelingTerm | null, p?: EyelingTerm | null, o?: EyelingTerm | null): AsyncIterable<EyelingTriple>;
|
|
173
|
+
batchAdd?(triples: Iterable<EyelingTriple>, kind?: 'explicit' | 'inferred'): Promise<number>;
|
|
174
|
+
clear?(): Promise<void>;
|
|
175
|
+
close?(): Promise<void>;
|
|
176
|
+
}
|
|
298
177
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
178
|
+
export class MemoryFactStore implements FactStore {
|
|
179
|
+
constructor();
|
|
180
|
+
add(triple: EyelingTriple, kind?: 'explicit' | 'inferred'): Promise<boolean>;
|
|
181
|
+
has(triple: EyelingTriple): Promise<boolean>;
|
|
182
|
+
kindOf(triple: EyelingTriple): Promise<number>;
|
|
183
|
+
match(s?: EyelingTerm | null, p?: EyelingTerm | null, o?: EyelingTerm | null): AsyncIterable<EyelingTriple>;
|
|
184
|
+
batchAdd(triples: Iterable<EyelingTriple>, kind?: 'explicit' | 'inferred'): Promise<number>;
|
|
185
|
+
clear(): Promise<void>;
|
|
186
|
+
close(): Promise<void>;
|
|
187
|
+
}
|
|
306
188
|
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
registerBuiltinModule: typeof registerBuiltinModule;
|
|
318
|
-
listBuiltinIris: typeof listBuiltinIris;
|
|
319
|
-
};
|
|
189
|
+
export class PersistentFactStore implements FactStore {
|
|
190
|
+
constructor(kv?: unknown, options?: StoreOptions);
|
|
191
|
+
add(triple: EyelingTriple, kind?: 'explicit' | 'inferred'): Promise<boolean>;
|
|
192
|
+
has(triple: EyelingTriple): Promise<boolean>;
|
|
193
|
+
kindOf(triple: EyelingTriple): Promise<number>;
|
|
194
|
+
match(s?: EyelingTerm | null, p?: EyelingTerm | null, o?: EyelingTerm | null): AsyncIterable<EyelingTriple>;
|
|
195
|
+
batchAdd(triples: Iterable<EyelingTriple>, kind?: 'explicit' | 'inferred'): Promise<number>;
|
|
196
|
+
clear(): Promise<void>;
|
|
197
|
+
close(): Promise<void>;
|
|
198
|
+
}
|
|
320
199
|
|
|
321
|
-
|
|
200
|
+
export function reason(
|
|
201
|
+
opts: ReasonOptions,
|
|
202
|
+
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
203
|
+
): string;
|
|
204
|
+
export function runAsync(
|
|
205
|
+
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
206
|
+
opts?: ReasonStreamOptions,
|
|
207
|
+
): Promise<ReasonStreamResult & { store?: FactStore }>;
|
|
208
|
+
export function reasonStream(
|
|
209
|
+
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
210
|
+
opts?: ReasonStreamOptions,
|
|
211
|
+
): ReasonStreamResult;
|
|
212
|
+
export function reasonRdfJs(
|
|
213
|
+
input: string | RdfJsReasonInput | EyelingAstBundle | N3SourceListInput,
|
|
214
|
+
opts?: Omit<ReasonStreamOptions, 'rdfjs' | 'onDerived'>,
|
|
215
|
+
): AsyncIterable<import('@rdfjs/types').Quad>;
|
|
216
|
+
|
|
217
|
+
export const INFERENCE_FUSE_EXIT_CODE: 65;
|
|
218
|
+
export const rdfjs: import('@rdfjs/types').DataFactory<import('@rdfjs/types').Quad, import('@rdfjs/types').Quad> & { variable(value: string): import('@rdfjs/types').Variable };
|
|
219
|
+
export function createFactStore(options?: string | StoreOptions | null): Promise<FactStore>;
|
|
220
|
+
export function registerBuiltin(iri: string, handler: BuiltinHandler): BuiltinHandler;
|
|
221
|
+
export function unregisterBuiltin(iri: string): boolean;
|
|
222
|
+
export function registerBuiltinModule(mod: unknown, origin?: string): boolean;
|
|
223
|
+
export function loadBuiltinModule(specifier: string, options?: { resolveFrom?: string }): string;
|
|
224
|
+
export function listBuiltinIris(): string[];
|
|
225
|
+
|
|
226
|
+
export interface EyelingModule {
|
|
227
|
+
readonly version: string;
|
|
228
|
+
reason: typeof reason;
|
|
229
|
+
runAsync: typeof runAsync;
|
|
230
|
+
reasonStream: typeof reasonStream;
|
|
231
|
+
reasonRdfJs: typeof reasonRdfJs;
|
|
232
|
+
readonly INFERENCE_FUSE_EXIT_CODE: typeof INFERENCE_FUSE_EXIT_CODE;
|
|
233
|
+
rdfjs: typeof rdfjs;
|
|
234
|
+
createFactStore: typeof createFactStore;
|
|
235
|
+
MemoryFactStore: typeof MemoryFactStore;
|
|
236
|
+
PersistentFactStore: typeof PersistentFactStore;
|
|
237
|
+
registerBuiltin: typeof registerBuiltin;
|
|
238
|
+
unregisterBuiltin: typeof unregisterBuiltin;
|
|
239
|
+
registerBuiltinModule: typeof registerBuiltinModule;
|
|
240
|
+
loadBuiltinModule: typeof loadBuiltinModule;
|
|
241
|
+
listBuiltinIris: typeof listBuiltinIris;
|
|
322
242
|
}
|
|
243
|
+
|
|
244
|
+
declare const eyeling: EyelingModule;
|
|
245
|
+
export default eyeling;
|