@tuprolog/arg2p 0.17.2 → 0.18.0
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/2p-core.js +2567 -2558
- package/2p-core.js.map +1 -1
- package/2p-dsl-core.js +428 -422
- package/2p-dsl-core.js.map +1 -1
- package/2p-dsl-solve.js +260 -264
- package/2p-dsl-solve.js.map +1 -1
- package/2p-dsl-theory.js +161 -155
- package/2p-dsl-theory.js.map +1 -1
- package/2p-dsl-unify.js +6 -6
- package/2p-io-lib.js +936 -936
- package/2p-io-lib.js.map +1 -1
- package/2p-parser-core.js +136 -136
- package/2p-parser-core.js.map +1 -1
- package/2p-parser-impl.js +1461 -1451
- package/2p-parser-impl.js.map +1 -1
- package/2p-parser-theory.js +89 -94
- package/2p-parser-theory.js.map +1 -1
- package/2p-solve.js +4712 -4965
- package/2p-solve.js.map +1 -1
- package/2p-theory.js +1460 -1460
- package/2p-unify.js +349 -349
- package/2p-utils.js +488 -489
- package/2p-utils.js.map +1 -1
- package/README.md +26 -19
- package/arg2p-causality-solver.js +569 -486
- package/arg2p-causality-solver.js.map +1 -1
- package/arg2p-core.js +13492 -5266
- package/arg2p-core.js.map +1 -1
- package/arg2p.js +26 -551
- package/arg2p.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +3337 -3145
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kt-math.js +1530 -1530
- package/okio-parent-okio-nodefilesystem.js +52 -52
- package/okio-parent-okio.js +685 -685
- package/okio-parent-okio.js.map +1 -1
- package/package.json +1 -1
- package/2p-solve-prolog.js +0 -2856
- package/2p-solve-prolog.js.map +0 -1
|
@@ -24,24 +24,24 @@
|
|
|
24
24
|
var openSync = $module$fs.openSync;
|
|
25
25
|
var lstatSync = $module$fs.lstatSync;
|
|
26
26
|
var readlinkSync = $module$fs.readlinkSync;
|
|
27
|
-
var toString = kotlin_kotlin.$_$.
|
|
28
|
-
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.
|
|
29
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
30
|
-
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.
|
|
27
|
+
var toString = kotlin_kotlin.$_$.h8;
|
|
28
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.n1;
|
|
29
|
+
var Unit_instance = kotlin_kotlin.$_$.r;
|
|
30
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.q1;
|
|
31
31
|
var IOException_init_$Create$ = kotlin_com_squareup_okio_okio.$_$.b;
|
|
32
|
-
var numberToLong = kotlin_kotlin.$_$.
|
|
33
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
34
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
35
|
-
var convertToInt = kotlin_kotlin.$_$.
|
|
36
|
-
var toNumber = kotlin_kotlin.$_$.
|
|
37
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
38
|
-
var fromInt = kotlin_kotlin.$_$.
|
|
39
|
-
var add = kotlin_kotlin.$_$.
|
|
32
|
+
var numberToLong = kotlin_kotlin.$_$.t6;
|
|
33
|
+
var protoOf = kotlin_kotlin.$_$.e8;
|
|
34
|
+
var initMetadataForClass = kotlin_kotlin.$_$.r7;
|
|
35
|
+
var convertToInt = kotlin_kotlin.$_$.m6;
|
|
36
|
+
var toNumber = kotlin_kotlin.$_$.y6;
|
|
37
|
+
var numberToInt = kotlin_kotlin.$_$.c8;
|
|
38
|
+
var fromInt = kotlin_kotlin.$_$.p6;
|
|
39
|
+
var add = kotlin_kotlin.$_$.k6;
|
|
40
40
|
var FileNotFoundException = kotlin_com_squareup_okio_okio.$_$.d;
|
|
41
41
|
var FileSystem = kotlin_com_squareup_okio_okio.$_$.e;
|
|
42
42
|
var Companion_getInstance = kotlin_com_squareup_okio_okio.$_$.a;
|
|
43
43
|
var FileMetadata = kotlin_com_squareup_okio_okio.$_$.c;
|
|
44
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
44
|
+
var initMetadataForObject = kotlin_kotlin.$_$.v7;
|
|
45
45
|
var VOID = kotlin_kotlin.$_$.b;
|
|
46
46
|
//endregion
|
|
47
47
|
//region block: pre-declaration
|
|
@@ -50,74 +50,74 @@
|
|
|
50
50
|
initMetadataForObject(NodeJsFileSystem, 'NodeJsFileSystem', VOID, FileSystem);
|
|
51
51
|
//endregion
|
|
52
52
|
function FileSink(fd) {
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
53
|
+
this.k3v_1 = fd;
|
|
54
|
+
this.l3v_1 = false;
|
|
55
55
|
}
|
|
56
|
-
protoOf(FileSink).
|
|
56
|
+
protoOf(FileSink).d3t = function (source, byteCount) {
|
|
57
57
|
// Inline function 'kotlin.require' call
|
|
58
58
|
if (!(byteCount >= 0n)) {
|
|
59
59
|
var message = 'byteCount < 0: ' + byteCount.toString();
|
|
60
60
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
61
61
|
}
|
|
62
62
|
// Inline function 'kotlin.require' call
|
|
63
|
-
if (!(source.
|
|
64
|
-
var message_0 = 'source.size=' + source.
|
|
63
|
+
if (!(source.t3s_1 >= byteCount)) {
|
|
64
|
+
var message_0 = 'source.size=' + source.t3s_1.toString() + ' < byteCount=' + byteCount.toString();
|
|
65
65
|
throw IllegalArgumentException_init_$Create$(toString(message_0));
|
|
66
66
|
}
|
|
67
67
|
// Inline function 'kotlin.check' call
|
|
68
|
-
if (!!this.
|
|
68
|
+
if (!!this.l3v_1) {
|
|
69
69
|
var message_1 = 'closed';
|
|
70
70
|
throw IllegalStateException_init_$Create$(toString(message_1));
|
|
71
71
|
}
|
|
72
|
-
var data = source.
|
|
73
|
-
var writtenByteCount = writeSync(this.
|
|
72
|
+
var data = source.h3u(byteCount);
|
|
73
|
+
var writtenByteCount = writeSync(this.k3v_1, data);
|
|
74
74
|
if (!(numberToLong(writtenByteCount) === byteCount)) {
|
|
75
75
|
throw IOException_init_$Create$('expected ' + byteCount.toString() + ' but was ' + writtenByteCount);
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
protoOf(FileSink).
|
|
78
|
+
protoOf(FileSink).o8 = function () {
|
|
79
79
|
};
|
|
80
|
-
protoOf(FileSink).
|
|
81
|
-
if (this.
|
|
80
|
+
protoOf(FileSink).z22 = function () {
|
|
81
|
+
if (this.l3v_1)
|
|
82
82
|
return Unit_instance;
|
|
83
|
-
this.
|
|
84
|
-
closeSync(this.
|
|
83
|
+
this.l3v_1 = true;
|
|
84
|
+
closeSync(this.k3v_1);
|
|
85
85
|
};
|
|
86
86
|
function FileSource(fd) {
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
87
|
+
this.m3v_1 = fd;
|
|
88
|
+
this.n3v_1 = 0n;
|
|
89
|
+
this.o3v_1 = false;
|
|
90
90
|
}
|
|
91
|
-
protoOf(FileSource).
|
|
91
|
+
protoOf(FileSource).u3u = function (sink, byteCount) {
|
|
92
92
|
// Inline function 'kotlin.require' call
|
|
93
93
|
if (!(byteCount >= 0n)) {
|
|
94
94
|
var message = 'byteCount < 0: ' + byteCount.toString();
|
|
95
95
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
96
96
|
}
|
|
97
97
|
// Inline function 'kotlin.check' call
|
|
98
|
-
if (!!this.
|
|
98
|
+
if (!!this.o3v_1) {
|
|
99
99
|
var message_0 = 'closed';
|
|
100
100
|
throw IllegalStateException_init_$Create$(toString(message_0));
|
|
101
101
|
}
|
|
102
102
|
var data = new Int8Array(convertToInt(byteCount));
|
|
103
|
-
var tmp0_fd = this.
|
|
103
|
+
var tmp0_fd = this.m3v_1;
|
|
104
104
|
var tmp1_length = toNumber(byteCount);
|
|
105
|
-
var tmp2_position = toNumber(this.
|
|
105
|
+
var tmp2_position = toNumber(this.n3v_1);
|
|
106
106
|
var readByteCount = numberToInt(readSync(tmp0_fd, data, 0.0, tmp1_length, tmp2_position));
|
|
107
107
|
if (readByteCount === 0)
|
|
108
108
|
return -1n;
|
|
109
109
|
var tmp = this;
|
|
110
110
|
// Inline function 'kotlin.Long.plus' call
|
|
111
|
-
var this_0 = this.
|
|
112
|
-
tmp.
|
|
113
|
-
sink.
|
|
111
|
+
var this_0 = this.n3v_1;
|
|
112
|
+
tmp.n3v_1 = add(this_0, fromInt(readByteCount));
|
|
113
|
+
sink.v3s(data, 0, readByteCount);
|
|
114
114
|
return fromInt(readByteCount);
|
|
115
115
|
};
|
|
116
|
-
protoOf(FileSource).
|
|
117
|
-
if (this.
|
|
116
|
+
protoOf(FileSource).z22 = function () {
|
|
117
|
+
if (this.o3v_1)
|
|
118
118
|
return Unit_instance;
|
|
119
|
-
this.
|
|
120
|
-
closeSync(this.
|
|
119
|
+
this.o3v_1 = true;
|
|
120
|
+
closeSync(this.m3v_1);
|
|
121
121
|
};
|
|
122
122
|
function _get_errorCode__501hwc($this, $receiver) {
|
|
123
123
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -141,12 +141,12 @@
|
|
|
141
141
|
function NodeJsFileSystem() {
|
|
142
142
|
NodeJsFileSystem_instance = this;
|
|
143
143
|
FileSystem.call(this);
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
144
|
+
this.p3v_1 = 61440;
|
|
145
|
+
this.q3v_1 = 32768;
|
|
146
|
+
this.r3v_1 = 16384;
|
|
147
|
+
this.s3v_1 = 40960;
|
|
148
148
|
}
|
|
149
|
-
protoOf(NodeJsFileSystem).
|
|
149
|
+
protoOf(NodeJsFileSystem).w3s = function (path) {
|
|
150
150
|
var pathString = path.toString();
|
|
151
151
|
var tmp;
|
|
152
152
|
try {
|
|
@@ -164,9 +164,9 @@
|
|
|
164
164
|
}
|
|
165
165
|
var stat = tmp;
|
|
166
166
|
var symlinkTarget = null;
|
|
167
|
-
if ((numberToInt(stat.mode) & this.
|
|
167
|
+
if ((numberToInt(stat.mode) & this.p3v_1) === this.s3v_1) {
|
|
168
168
|
try {
|
|
169
|
-
symlinkTarget = Companion_getInstance().
|
|
169
|
+
symlinkTarget = Companion_getInstance().q3t(readlinkSync(pathString));
|
|
170
170
|
} catch ($p_0) {
|
|
171
171
|
if ($p_0 instanceof Error) {
|
|
172
172
|
var e_0 = $p_0;
|
|
@@ -176,18 +176,18 @@
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
return new FileMetadata((numberToInt(stat.mode) & this.
|
|
179
|
+
return new FileMetadata((numberToInt(stat.mode) & this.p3v_1) === this.q3v_1, (numberToInt(stat.mode) & this.p3v_1) === this.r3v_1, symlinkTarget, numberToLong(stat.size), numberToLong(stat.birthtimeMs), numberToLong(stat.mtimeMs), numberToLong(stat.atimeMs));
|
|
180
180
|
};
|
|
181
|
-
protoOf(NodeJsFileSystem).
|
|
181
|
+
protoOf(NodeJsFileSystem).s3t = function (file) {
|
|
182
182
|
var fd = openFd(this, file, 'r');
|
|
183
183
|
return new FileSource(fd);
|
|
184
184
|
};
|
|
185
|
-
protoOf(NodeJsFileSystem).
|
|
185
|
+
protoOf(NodeJsFileSystem).t3t = function (file, mustCreate) {
|
|
186
186
|
var fd = openFd(this, file, mustCreate ? 'wx' : 'w');
|
|
187
187
|
return new FileSink(fd);
|
|
188
188
|
};
|
|
189
|
-
protoOf(NodeJsFileSystem).
|
|
190
|
-
if (mustExist && !this.
|
|
189
|
+
protoOf(NodeJsFileSystem).u3t = function (file, mustExist) {
|
|
190
|
+
if (mustExist && !this.r3t(file))
|
|
191
191
|
throw IOException_init_$Create$(file.toString() + " doesn't exist.");
|
|
192
192
|
var fd = openFd(this, file, 'a');
|
|
193
193
|
return new FileSink(fd);
|