sysml-diagram 0.35.0 → 0.36.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/out/main.js +577 -100
- package/out/main.js.map +4 -4
- package/package.json +1 -1
- package/resources/sysml.dimension-table.json +1 -1
package/out/main.js
CHANGED
|
@@ -115652,10 +115652,10 @@ function untilTokenToRegex(until) {
|
|
|
115652
115652
|
lookahead: until.lookahead
|
|
115653
115653
|
});
|
|
115654
115654
|
}
|
|
115655
|
-
function negateTokenToRegex(
|
|
115656
|
-
return withCardinality(`(?!${abstractElementToRegex(
|
|
115657
|
-
cardinality:
|
|
115658
|
-
lookahead:
|
|
115655
|
+
function negateTokenToRegex(negate3) {
|
|
115656
|
+
return withCardinality(`(?!${abstractElementToRegex(negate3.terminal)})${WILDCARD}*?`, {
|
|
115657
|
+
cardinality: negate3.cardinality,
|
|
115658
|
+
lookahead: negate3.lookahead
|
|
115659
115659
|
});
|
|
115660
115660
|
}
|
|
115661
115661
|
function characterRangeToRegex(range) {
|
|
@@ -161054,6 +161054,422 @@ var ANCHOR_KEYWORD = {
|
|
|
161054
161054
|
bv: "package"
|
|
161055
161055
|
};
|
|
161056
161056
|
|
|
161057
|
+
// ../language-server/out/src/services/requirement-semantics.js
|
|
161058
|
+
var DEFAULT_SUBJECT_TYPE = "Anything";
|
|
161059
|
+
var MAX_INHERITANCE_DEPTH = 16;
|
|
161060
|
+
var SPECIALIZATION_KINDS = /* @__PURE__ */ new Set([
|
|
161061
|
+
":>",
|
|
161062
|
+
":>>",
|
|
161063
|
+
"specializes",
|
|
161064
|
+
"subsets",
|
|
161065
|
+
"redefines"
|
|
161066
|
+
]);
|
|
161067
|
+
var REDEFINITION_KINDS = /* @__PURE__ */ new Set([":>>", "redefines"]);
|
|
161068
|
+
var REQUIREMENT_SHAPED = /* @__PURE__ */ new Set([
|
|
161069
|
+
"RequirementDecl",
|
|
161070
|
+
"ConcernDecl",
|
|
161071
|
+
"ObjectiveDecl",
|
|
161072
|
+
"ViewpointDecl"
|
|
161073
|
+
]);
|
|
161074
|
+
var CONSTRAINT_SHAPED = /* @__PURE__ */ new Set([
|
|
161075
|
+
"ConstraintDecl",
|
|
161076
|
+
"InvShorthand",
|
|
161077
|
+
"PredicateDecl",
|
|
161078
|
+
"RequirementDecl",
|
|
161079
|
+
"ConcernDecl",
|
|
161080
|
+
"ObjectiveDecl"
|
|
161081
|
+
]);
|
|
161082
|
+
function simpleName(path10) {
|
|
161083
|
+
const last2 = path10.trim().split(/::|\./u).pop() ?? path10.trim();
|
|
161084
|
+
return last2.replace(/^'(.*)'$/u, "$1");
|
|
161085
|
+
}
|
|
161086
|
+
function* walkAll(node) {
|
|
161087
|
+
for (const child of [...node.elements ?? [], ...node.members ?? []]) {
|
|
161088
|
+
yield child;
|
|
161089
|
+
yield* walkAll(child);
|
|
161090
|
+
}
|
|
161091
|
+
}
|
|
161092
|
+
function rootOf(node) {
|
|
161093
|
+
let current2 = node;
|
|
161094
|
+
while (current2.$container)
|
|
161095
|
+
current2 = current2.$container;
|
|
161096
|
+
return current2;
|
|
161097
|
+
}
|
|
161098
|
+
function pathSegments(path10) {
|
|
161099
|
+
return path10.trim().split(/::|\./u).map((segment) => segment.trim().replace(/^'(.*)'$/u, "$1")).filter((segment) => segment.length > 0);
|
|
161100
|
+
}
|
|
161101
|
+
function qualifierChain(node) {
|
|
161102
|
+
const out = [];
|
|
161103
|
+
let current2 = node;
|
|
161104
|
+
while (current2) {
|
|
161105
|
+
if (current2.name)
|
|
161106
|
+
out.push(current2.name);
|
|
161107
|
+
current2 = current2.$container;
|
|
161108
|
+
}
|
|
161109
|
+
return out;
|
|
161110
|
+
}
|
|
161111
|
+
function documentResolver(from) {
|
|
161112
|
+
const root4 = rootOf(from);
|
|
161113
|
+
return (name) => {
|
|
161114
|
+
const segments = pathSegments(name);
|
|
161115
|
+
if (segments.length === 0)
|
|
161116
|
+
return void 0;
|
|
161117
|
+
const wanted = segments[segments.length - 1];
|
|
161118
|
+
const qualifiers = segments.slice(0, -1).reverse();
|
|
161119
|
+
let fallback;
|
|
161120
|
+
for (const candidate of walkAll(root4)) {
|
|
161121
|
+
if (candidate.name !== wanted)
|
|
161122
|
+
continue;
|
|
161123
|
+
if (qualifiers.length === 0)
|
|
161124
|
+
return candidate;
|
|
161125
|
+
const chain = qualifierChain(candidate).slice(1);
|
|
161126
|
+
let index2 = 0;
|
|
161127
|
+
for (const link of chain) {
|
|
161128
|
+
if (link === qualifiers[index2])
|
|
161129
|
+
index2++;
|
|
161130
|
+
if (index2 === qualifiers.length)
|
|
161131
|
+
break;
|
|
161132
|
+
}
|
|
161133
|
+
if (index2 === qualifiers.length)
|
|
161134
|
+
return candidate;
|
|
161135
|
+
fallback ??= candidate;
|
|
161136
|
+
}
|
|
161137
|
+
return fallback;
|
|
161138
|
+
};
|
|
161139
|
+
}
|
|
161140
|
+
function supertypesOf(node, resolve8) {
|
|
161141
|
+
const out = [];
|
|
161142
|
+
const add = (candidate) => {
|
|
161143
|
+
if (candidate)
|
|
161144
|
+
out.push(candidate);
|
|
161145
|
+
};
|
|
161146
|
+
for (const typing of [node.typing, ...node.moreTypings ?? []]) {
|
|
161147
|
+
if (!typing)
|
|
161148
|
+
continue;
|
|
161149
|
+
for (const ref of [typing.type, ...typing.moreTypes ?? []]) {
|
|
161150
|
+
if (!ref)
|
|
161151
|
+
continue;
|
|
161152
|
+
add(ref.ref ?? (ref.$refText ? resolve8(ref.$refText) : void 0));
|
|
161153
|
+
}
|
|
161154
|
+
}
|
|
161155
|
+
for (const rel2 of [...node.preRelationships ?? [], ...node.relationships ?? []]) {
|
|
161156
|
+
if (!rel2.kind || !SPECIALIZATION_KINDS.has(rel2.kind))
|
|
161157
|
+
continue;
|
|
161158
|
+
for (const target of rel2.targets ?? [])
|
|
161159
|
+
add(resolve8(target));
|
|
161160
|
+
}
|
|
161161
|
+
return out;
|
|
161162
|
+
}
|
|
161163
|
+
function locallyRedefinedNames(node) {
|
|
161164
|
+
const out = /* @__PURE__ */ new Set();
|
|
161165
|
+
for (const member of node.members ?? []) {
|
|
161166
|
+
for (const rel2 of [...member.preRelationships ?? [], ...member.relationships ?? []]) {
|
|
161167
|
+
if (!rel2.kind || !REDEFINITION_KINDS.has(rel2.kind))
|
|
161168
|
+
continue;
|
|
161169
|
+
for (const target of rel2.targets ?? [])
|
|
161170
|
+
out.add(simpleName(target));
|
|
161171
|
+
}
|
|
161172
|
+
}
|
|
161173
|
+
return out;
|
|
161174
|
+
}
|
|
161175
|
+
function referencePathOf(member) {
|
|
161176
|
+
const target = member.target;
|
|
161177
|
+
if (typeof target === "string")
|
|
161178
|
+
return target.trim() || void 0;
|
|
161179
|
+
if (target && typeof target === "object") {
|
|
161180
|
+
const text = target.$refText?.trim();
|
|
161181
|
+
return text || void 0;
|
|
161182
|
+
}
|
|
161183
|
+
return void 0;
|
|
161184
|
+
}
|
|
161185
|
+
function referenceTargetOf(member, resolve8) {
|
|
161186
|
+
const target = member.target;
|
|
161187
|
+
if (target && typeof target === "object" && target.ref)
|
|
161188
|
+
return target.ref;
|
|
161189
|
+
const path10 = referencePathOf(member);
|
|
161190
|
+
return path10 ? resolve8(path10) : void 0;
|
|
161191
|
+
}
|
|
161192
|
+
function constraintBodyOf(node, resolve8, depth = 0, seen = /* @__PURE__ */ new Set()) {
|
|
161193
|
+
if (!node || depth > MAX_INHERITANCE_DEPTH || seen.has(node))
|
|
161194
|
+
return void 0;
|
|
161195
|
+
seen.add(node);
|
|
161196
|
+
if (node.body)
|
|
161197
|
+
return node.body;
|
|
161198
|
+
const resolver = resolve8 ?? documentResolver(node);
|
|
161199
|
+
for (const supertype of supertypesOf(node, resolver)) {
|
|
161200
|
+
const inherited = constraintBodyOf(supertype, resolver, depth + 1, seen);
|
|
161201
|
+
if (inherited)
|
|
161202
|
+
return inherited;
|
|
161203
|
+
}
|
|
161204
|
+
return void 0;
|
|
161205
|
+
}
|
|
161206
|
+
function exprText(node) {
|
|
161207
|
+
return node?.$cstNode?.text?.trim() ?? "";
|
|
161208
|
+
}
|
|
161209
|
+
function labelOf(owner, kind, text) {
|
|
161210
|
+
const prefix = owner?.name ? `${owner.name} / ` : "";
|
|
161211
|
+
return `${prefix}${kind}: ${text}`;
|
|
161212
|
+
}
|
|
161213
|
+
function collect(node, origin, depth, walk) {
|
|
161214
|
+
if (depth > MAX_INHERITANCE_DEPTH || walk.seen.has(node))
|
|
161215
|
+
return;
|
|
161216
|
+
walk.seen.add(node);
|
|
161217
|
+
const redefined = locallyRedefinedNames(node);
|
|
161218
|
+
for (const member of node.members ?? []) {
|
|
161219
|
+
const kind = constraintKindOf(member);
|
|
161220
|
+
if (kind) {
|
|
161221
|
+
addConstraint(member, kind, origin, node, walk);
|
|
161222
|
+
continue;
|
|
161223
|
+
}
|
|
161224
|
+
if (member.$type === "InvShorthand" && member.body) {
|
|
161225
|
+
addBody(member, member.body, "require", origin, node, walk);
|
|
161226
|
+
}
|
|
161227
|
+
}
|
|
161228
|
+
for (const supertype of supertypesOf(node, walk.resolve)) {
|
|
161229
|
+
if (!REQUIREMENT_SHAPED.has(supertype.$type) && supertype.$type !== "ConstraintDecl")
|
|
161230
|
+
continue;
|
|
161231
|
+
const before = walk.out.length;
|
|
161232
|
+
collect(supertype, origin === "own" ? "inherited" : origin, depth + 1, walk);
|
|
161233
|
+
if (redefined.size === 0)
|
|
161234
|
+
continue;
|
|
161235
|
+
for (let i = walk.out.length - 1; i >= before; i--) {
|
|
161236
|
+
const host = walk.out[i].host;
|
|
161237
|
+
if (host.name && redefined.has(host.name))
|
|
161238
|
+
walk.out.splice(i, 1);
|
|
161239
|
+
}
|
|
161240
|
+
}
|
|
161241
|
+
for (const member of node.members ?? []) {
|
|
161242
|
+
if (member.$type === "RequirementDecl") {
|
|
161243
|
+
collect(member, origin === "own" ? "subrequirement" : origin, depth + 1, walk);
|
|
161244
|
+
} else if (member.$type === "FrameMember") {
|
|
161245
|
+
const concern = member.concernKw === true ? member : referenceTargetOf(member, walk.resolve);
|
|
161246
|
+
if (concern && (REQUIREMENT_SHAPED.has(concern.$type) || concern.$type === "FrameMember")) {
|
|
161247
|
+
collect(concern, origin === "own" ? "concern" : origin, depth + 1, walk);
|
|
161248
|
+
}
|
|
161249
|
+
}
|
|
161250
|
+
}
|
|
161251
|
+
}
|
|
161252
|
+
function constraintKindOf(member) {
|
|
161253
|
+
if (member.$type === "AssumeConstraintStmt")
|
|
161254
|
+
return "assume";
|
|
161255
|
+
if (member.$type === "RequireConstraintStmt" || member.$type === "AssertConstraintStmt")
|
|
161256
|
+
return "require";
|
|
161257
|
+
return void 0;
|
|
161258
|
+
}
|
|
161259
|
+
function addConstraint(member, kind, origin, owner, walk) {
|
|
161260
|
+
const negated = member.isNegated === true;
|
|
161261
|
+
if (member.body) {
|
|
161262
|
+
addBody(member, member.body, kind, origin, owner, walk, negated);
|
|
161263
|
+
return;
|
|
161264
|
+
}
|
|
161265
|
+
const path10 = referencePathOf(member);
|
|
161266
|
+
if (!path10)
|
|
161267
|
+
return;
|
|
161268
|
+
const target = referenceTargetOf(member, walk.resolve);
|
|
161269
|
+
const text = `${kind} ${negated ? "not " : ""}${path10}`;
|
|
161270
|
+
if (!target || !CONSTRAINT_SHAPED.has(target.$type)) {
|
|
161271
|
+
walk.out.push({
|
|
161272
|
+
kind,
|
|
161273
|
+
origin,
|
|
161274
|
+
host: member,
|
|
161275
|
+
text,
|
|
161276
|
+
negated,
|
|
161277
|
+
unresolved: true,
|
|
161278
|
+
label: labelOf(owner, kind, text)
|
|
161279
|
+
});
|
|
161280
|
+
return;
|
|
161281
|
+
}
|
|
161282
|
+
const body = constraintBodyOf(target, walk.resolve);
|
|
161283
|
+
if (!body) {
|
|
161284
|
+
if (REQUIREMENT_SHAPED.has(target.$type)) {
|
|
161285
|
+
collect(target, origin === "own" ? "subrequirement" : origin, 1, walk);
|
|
161286
|
+
return;
|
|
161287
|
+
}
|
|
161288
|
+
walk.out.push({
|
|
161289
|
+
kind,
|
|
161290
|
+
origin,
|
|
161291
|
+
host: member,
|
|
161292
|
+
owner: target,
|
|
161293
|
+
text,
|
|
161294
|
+
negated,
|
|
161295
|
+
unresolved: false,
|
|
161296
|
+
label: labelOf(target, kind, text)
|
|
161297
|
+
});
|
|
161298
|
+
return;
|
|
161299
|
+
}
|
|
161300
|
+
if (walk.bodies.has(body))
|
|
161301
|
+
return;
|
|
161302
|
+
walk.bodies.add(body);
|
|
161303
|
+
walk.out.push({
|
|
161304
|
+
kind,
|
|
161305
|
+
origin,
|
|
161306
|
+
host: member,
|
|
161307
|
+
owner: target,
|
|
161308
|
+
body,
|
|
161309
|
+
negated,
|
|
161310
|
+
unresolved: false,
|
|
161311
|
+
text,
|
|
161312
|
+
label: labelOf(target, kind, exprText(body))
|
|
161313
|
+
});
|
|
161314
|
+
}
|
|
161315
|
+
function addBody(host, body, kind, origin, owner, walk, negated = false) {
|
|
161316
|
+
if (walk.bodies.has(body))
|
|
161317
|
+
return;
|
|
161318
|
+
walk.bodies.add(body);
|
|
161319
|
+
const text = exprText(body);
|
|
161320
|
+
walk.out.push({
|
|
161321
|
+
kind,
|
|
161322
|
+
origin,
|
|
161323
|
+
host,
|
|
161324
|
+
owner,
|
|
161325
|
+
body,
|
|
161326
|
+
text,
|
|
161327
|
+
negated,
|
|
161328
|
+
unresolved: false,
|
|
161329
|
+
label: labelOf(owner, kind, text)
|
|
161330
|
+
});
|
|
161331
|
+
}
|
|
161332
|
+
function effectiveConstraints(req, resolve8) {
|
|
161333
|
+
const walk = {
|
|
161334
|
+
resolve: resolve8 ?? documentResolver(req),
|
|
161335
|
+
out: [],
|
|
161336
|
+
seen: /* @__PURE__ */ new Set(),
|
|
161337
|
+
bodies: /* @__PURE__ */ new Set()
|
|
161338
|
+
};
|
|
161339
|
+
collect(req, "own", 0, walk);
|
|
161340
|
+
return walk.out;
|
|
161341
|
+
}
|
|
161342
|
+
function ownSubject(node) {
|
|
161343
|
+
return (node.members ?? []).find((member) => member.$type === "SubjectDecl");
|
|
161344
|
+
}
|
|
161345
|
+
function subjectTypeName(subject) {
|
|
161346
|
+
const ref = subject?.typing?.type;
|
|
161347
|
+
const text = ref?.$refText?.trim() ?? ref?.ref?.name;
|
|
161348
|
+
return text || void 0;
|
|
161349
|
+
}
|
|
161350
|
+
function subjectInfo(subject, owner, origin) {
|
|
161351
|
+
return {
|
|
161352
|
+
declaration: subject,
|
|
161353
|
+
name: subject.name,
|
|
161354
|
+
typeName: subjectTypeName(subject) ?? DEFAULT_SUBJECT_TYPE,
|
|
161355
|
+
origin,
|
|
161356
|
+
owner
|
|
161357
|
+
};
|
|
161358
|
+
}
|
|
161359
|
+
function inheritedSubject(node, resolve8, depth, seen) {
|
|
161360
|
+
if (depth > MAX_INHERITANCE_DEPTH || seen.has(node))
|
|
161361
|
+
return void 0;
|
|
161362
|
+
seen.add(node);
|
|
161363
|
+
for (const supertype of supertypesOf(node, resolve8)) {
|
|
161364
|
+
if (!REQUIREMENT_SHAPED.has(supertype.$type))
|
|
161365
|
+
continue;
|
|
161366
|
+
const own = ownSubject(supertype);
|
|
161367
|
+
if (own)
|
|
161368
|
+
return subjectInfo(own, supertype, "inherited");
|
|
161369
|
+
const deeper = inheritedSubject(supertype, resolve8, depth + 1, seen);
|
|
161370
|
+
if (deeper)
|
|
161371
|
+
return deeper;
|
|
161372
|
+
}
|
|
161373
|
+
return void 0;
|
|
161374
|
+
}
|
|
161375
|
+
function effectiveSubject(req, resolve8) {
|
|
161376
|
+
const node = req;
|
|
161377
|
+
const resolver = resolve8 ?? documentResolver(req);
|
|
161378
|
+
const own = ownSubject(node);
|
|
161379
|
+
if (own)
|
|
161380
|
+
return subjectInfo(own, node, "own");
|
|
161381
|
+
const inherited = inheritedSubject(node, resolver, 0, /* @__PURE__ */ new Set());
|
|
161382
|
+
if (inherited)
|
|
161383
|
+
return inherited;
|
|
161384
|
+
let container = node.$container;
|
|
161385
|
+
while (container) {
|
|
161386
|
+
if (REQUIREMENT_SHAPED.has(container.$type)) {
|
|
161387
|
+
const enclosing = ownSubject(container);
|
|
161388
|
+
if (enclosing)
|
|
161389
|
+
return subjectInfo(enclosing, container, "enclosing");
|
|
161390
|
+
const above = inheritedSubject(container, resolver, 0, /* @__PURE__ */ new Set());
|
|
161391
|
+
if (above)
|
|
161392
|
+
return { ...above, origin: "enclosing" };
|
|
161393
|
+
}
|
|
161394
|
+
container = container.$container;
|
|
161395
|
+
}
|
|
161396
|
+
return { typeName: DEFAULT_SUBJECT_TYPE, origin: "default" };
|
|
161397
|
+
}
|
|
161398
|
+
function effectiveRequirement(req, resolve8) {
|
|
161399
|
+
const resolver = resolve8 ?? documentResolver(req);
|
|
161400
|
+
return {
|
|
161401
|
+
constraints: effectiveConstraints(req, resolver),
|
|
161402
|
+
subject: effectiveSubject(req, resolver)
|
|
161403
|
+
};
|
|
161404
|
+
}
|
|
161405
|
+
var SATISFIER_SHAPED = /* @__PURE__ */ new Set([
|
|
161406
|
+
"PartDecl",
|
|
161407
|
+
"ItemDecl",
|
|
161408
|
+
"OccurrenceDecl",
|
|
161409
|
+
"ActionDecl",
|
|
161410
|
+
"StateDecl",
|
|
161411
|
+
"PortDecl",
|
|
161412
|
+
"AttributeDecl",
|
|
161413
|
+
"EnumDecl",
|
|
161414
|
+
"ConnectionDecl",
|
|
161415
|
+
"InterfaceDecl",
|
|
161416
|
+
"AllocationDecl",
|
|
161417
|
+
"UseCaseDecl",
|
|
161418
|
+
"CaseDecl",
|
|
161419
|
+
"AnalysisCaseDecl",
|
|
161420
|
+
"VerificationCaseDecl",
|
|
161421
|
+
"ViewDecl",
|
|
161422
|
+
"CalcDecl",
|
|
161423
|
+
"ConstraintDecl",
|
|
161424
|
+
"RequirementDecl",
|
|
161425
|
+
"ConcernDecl",
|
|
161426
|
+
"ObjectiveDecl",
|
|
161427
|
+
"ViewpointDecl",
|
|
161428
|
+
"RenderingDecl",
|
|
161429
|
+
"EventDecl"
|
|
161430
|
+
]);
|
|
161431
|
+
function bindingSimpleName(by) {
|
|
161432
|
+
const node = by;
|
|
161433
|
+
if (!node)
|
|
161434
|
+
return void 0;
|
|
161435
|
+
if (node.$type === "ParenExpr") {
|
|
161436
|
+
const items = node.items ?? [];
|
|
161437
|
+
return items.length === 1 ? bindingSimpleName(items[0]) : void 0;
|
|
161438
|
+
}
|
|
161439
|
+
if (node.$type !== "PathExpr")
|
|
161440
|
+
return void 0;
|
|
161441
|
+
const last2 = node.path?.split(/::|\./u).pop();
|
|
161442
|
+
return last2 || void 0;
|
|
161443
|
+
}
|
|
161444
|
+
function satisfyIntentOf(stmt) {
|
|
161445
|
+
const node = stmt;
|
|
161446
|
+
if (node.$type !== "SatisfyStmt")
|
|
161447
|
+
return void 0;
|
|
161448
|
+
const path10 = referencePathOf(node);
|
|
161449
|
+
if (!path10)
|
|
161450
|
+
return void 0;
|
|
161451
|
+
const byName = bindingSimpleName(node.by);
|
|
161452
|
+
let enclosing;
|
|
161453
|
+
let container = node.$container;
|
|
161454
|
+
while (container && !enclosing) {
|
|
161455
|
+
if (SATISFIER_SHAPED.has(container.$type) && container.isDef !== true)
|
|
161456
|
+
enclosing = container;
|
|
161457
|
+
container = container.$container;
|
|
161458
|
+
}
|
|
161459
|
+
return {
|
|
161460
|
+
path: path10,
|
|
161461
|
+
simple: simpleName(path10),
|
|
161462
|
+
negated: node.isNegated === true,
|
|
161463
|
+
byName,
|
|
161464
|
+
// The presence of a `by`, not whether its expression could be named,
|
|
161465
|
+
// decides this. A `by` this reader cannot name is still a stated
|
|
161466
|
+
// satisfier, and reading it as the enclosing usage would evaluate and
|
|
161467
|
+
// check something the model never claimed.
|
|
161468
|
+
enclosingSelf: node.by === void 0,
|
|
161469
|
+
enclosing
|
|
161470
|
+
};
|
|
161471
|
+
}
|
|
161472
|
+
|
|
161057
161473
|
// ../language-server/out/src/services/requirement-eval.js
|
|
161058
161474
|
var UNRESOLVED = { kind: "unresolved" };
|
|
161059
161475
|
var INCONCLUSIVE = { kind: "inconclusive" };
|
|
@@ -161294,36 +161710,40 @@ function subjectScope(subjectName, subjectBinding) {
|
|
|
161294
161710
|
return resolveFeatureValue(binding, segments);
|
|
161295
161711
|
};
|
|
161296
161712
|
}
|
|
161297
|
-
function
|
|
161298
|
-
const
|
|
161299
|
-
return
|
|
161300
|
-
|
|
161301
|
-
|
|
161302
|
-
|
|
161303
|
-
|
|
161304
|
-
|
|
161305
|
-
|
|
161306
|
-
} else if (member.$type === "AssumeConstraintStmt" && member.body) {
|
|
161307
|
-
out.push({ kind: "assume", body: member.body, text: exprText(member.body) });
|
|
161713
|
+
function constraintScope(entry, evaluated, outer) {
|
|
161714
|
+
const owners = [entry.host, evaluated, entry.owner];
|
|
161715
|
+
return (segments, expression) => {
|
|
161716
|
+
for (const owner of owners) {
|
|
161717
|
+
if (!owner)
|
|
161718
|
+
continue;
|
|
161719
|
+
const value = resolveFeatureValue(owner, segments);
|
|
161720
|
+
if (value.kind !== "unresolved" && value.kind !== "inconclusive")
|
|
161721
|
+
return value;
|
|
161308
161722
|
}
|
|
161309
|
-
|
|
161310
|
-
|
|
161723
|
+
return outer(segments, expression);
|
|
161724
|
+
};
|
|
161311
161725
|
}
|
|
161312
|
-
function
|
|
161313
|
-
|
|
161726
|
+
function negate2(value, negated) {
|
|
161727
|
+
if (!negated || value.kind !== "boolean")
|
|
161728
|
+
return value;
|
|
161729
|
+
return { kind: "boolean", value: !value.value };
|
|
161314
161730
|
}
|
|
161315
|
-
function evaluateRequirement(req, subjectBinding) {
|
|
161316
|
-
const
|
|
161317
|
-
const
|
|
161318
|
-
const scope = subjectScope(subjectName, subjectBinding);
|
|
161319
|
-
const constraints = gatherConstraints(requirement);
|
|
161731
|
+
function evaluateRequirement(req, subjectBinding, resolve8) {
|
|
161732
|
+
const effective = effectiveRequirement(req, resolve8);
|
|
161733
|
+
const scope = subjectScope(effective.subject.name, subjectBinding);
|
|
161320
161734
|
const details = [];
|
|
161321
161735
|
let sawInconclusive = false;
|
|
161322
161736
|
let sawUnresolved = false;
|
|
161323
161737
|
let failed = false;
|
|
161324
|
-
for (const c of constraints) {
|
|
161325
|
-
const v = evaluateExpr(c.body, scope);
|
|
161738
|
+
for (const c of effective.constraints) {
|
|
161326
161739
|
let status2;
|
|
161740
|
+
if (c.unresolved) {
|
|
161741
|
+
status2 = "unresolved";
|
|
161742
|
+
sawUnresolved = true;
|
|
161743
|
+
details.push({ kind: c.kind, status: status2, text: c.text, origin: c.origin, label: c.label });
|
|
161744
|
+
continue;
|
|
161745
|
+
}
|
|
161746
|
+
const v = negate2(evaluateExpr(c.body, constraintScope(c, req, scope)), c.negated);
|
|
161327
161747
|
if (v.kind === "unresolved") {
|
|
161328
161748
|
status2 = "unresolved";
|
|
161329
161749
|
sawUnresolved = true;
|
|
@@ -161339,10 +161759,10 @@ function evaluateRequirement(req, subjectBinding) {
|
|
|
161339
161759
|
status2 = "inconclusive";
|
|
161340
161760
|
sawInconclusive = true;
|
|
161341
161761
|
}
|
|
161342
|
-
details.push({ kind: c.kind, status: status2, text: c.text });
|
|
161762
|
+
details.push({ kind: c.kind, status: status2, text: c.text, origin: c.origin, label: c.label });
|
|
161343
161763
|
}
|
|
161344
161764
|
let status;
|
|
161345
|
-
if (constraints.length === 0)
|
|
161765
|
+
if (effective.constraints.length === 0)
|
|
161346
161766
|
status = "inconclusive";
|
|
161347
161767
|
else if (failed)
|
|
161348
161768
|
status = "fail";
|
|
@@ -161354,6 +161774,20 @@ function evaluateRequirement(req, subjectBinding) {
|
|
|
161354
161774
|
status = "pass";
|
|
161355
161775
|
return { status, details };
|
|
161356
161776
|
}
|
|
161777
|
+
function evaluateSatisfy(stmt, resolveRequirement, resolvePart, resolve8) {
|
|
161778
|
+
const intent = satisfyIntentOf(stmt);
|
|
161779
|
+
if (!intent)
|
|
161780
|
+
return { status: "unresolved" };
|
|
161781
|
+
const requirement = resolveRequirement(intent.simple);
|
|
161782
|
+
if (!requirement)
|
|
161783
|
+
return { status: "unresolved" };
|
|
161784
|
+
const satisfier = intent.enclosingSelf ? intent.enclosing : intent.byName ? resolvePart(intent.byName) : void 0;
|
|
161785
|
+
const result = evaluateRequirement(requirement, satisfier, resolve8);
|
|
161786
|
+
if (!intent.negated)
|
|
161787
|
+
return { status: result.status, requirement, satisfier };
|
|
161788
|
+
const status = result.status === "pass" ? "fail" : result.status === "fail" ? "pass" : result.status;
|
|
161789
|
+
return { status, requirement, satisfier };
|
|
161790
|
+
}
|
|
161357
161791
|
function bindingName(by) {
|
|
161358
161792
|
const n2 = by;
|
|
161359
161793
|
if (n2?.$type !== "PathExpr")
|
|
@@ -162533,14 +162967,14 @@ function isPublic(node) {
|
|
|
162533
162967
|
}
|
|
162534
162968
|
return true;
|
|
162535
162969
|
}
|
|
162536
|
-
var
|
|
162970
|
+
var SPECIALIZATION_KINDS2 = /* @__PURE__ */ new Set([":>", ":>>", "specializes", "subsets", "redefines"]);
|
|
162537
162971
|
var inheritanceByNode = /* @__PURE__ */ new WeakMap();
|
|
162538
162972
|
function inheritanceSyntax(node) {
|
|
162539
162973
|
const cached = inheritanceByNode.get(node);
|
|
162540
162974
|
if (cached)
|
|
162541
162975
|
return cached;
|
|
162542
162976
|
const shape = node;
|
|
162543
|
-
const relationships = [...shape.preRelationships ?? [], ...shape.relationships ?? []].filter((relation) => relation.kind &&
|
|
162977
|
+
const relationships = [...shape.preRelationships ?? [], ...shape.relationships ?? []].filter((relation) => relation.kind && SPECIALIZATION_KINDS2.has(relation.kind));
|
|
162544
162978
|
const implicitVariant = implicitVariantSpecialization(node)?.target;
|
|
162545
162979
|
const externalVariant = !!externalVariantPath(node);
|
|
162546
162980
|
const enumUsage = node.$type === "EnumDecl" && shape.isDef !== true;
|
|
@@ -163162,7 +163596,7 @@ var FeaturePathResolver = class {
|
|
|
163162
163596
|
const declared = [
|
|
163163
163597
|
...record.preRelationships ?? [],
|
|
163164
163598
|
...record.relationships ?? []
|
|
163165
|
-
].filter((relation) => relation !== under && relation.kind &&
|
|
163599
|
+
].filter((relation) => relation !== under && relation.kind && SPECIALIZATION_KINDS2.has(relation.kind));
|
|
163166
163600
|
if (declared.length === 0)
|
|
163167
163601
|
return true;
|
|
163168
163602
|
const written = declared.reduce((total, relation) => total + (relation.targets?.length ?? 0), 0);
|
|
@@ -163557,7 +163991,7 @@ function memberSeparator(owner) {
|
|
|
163557
163991
|
function unquoteName(name) {
|
|
163558
163992
|
return name.replace(/^'(.*)'$/u, "$1");
|
|
163559
163993
|
}
|
|
163560
|
-
function
|
|
163994
|
+
function pathSegments2(path10) {
|
|
163561
163995
|
const segments = [];
|
|
163562
163996
|
let current2 = "";
|
|
163563
163997
|
let quoted = false;
|
|
@@ -163585,7 +164019,7 @@ function pathSegments(path10) {
|
|
|
163585
164019
|
return segments;
|
|
163586
164020
|
}
|
|
163587
164021
|
function simpleNameOf(name) {
|
|
163588
|
-
return
|
|
164022
|
+
return pathSegments2(name).at(-1) ?? name;
|
|
163589
164023
|
}
|
|
163590
164024
|
var ELEMENT_SEPARATOR = "\0";
|
|
163591
164025
|
function elementKey(description) {
|
|
@@ -163595,7 +164029,7 @@ function isDeclaredSpelling(description) {
|
|
|
163595
164029
|
const kind = description.derivedKind;
|
|
163596
164030
|
if (kind === "reexport" || kind === "inherited")
|
|
163597
164031
|
return false;
|
|
163598
|
-
return
|
|
164032
|
+
return pathSegments2(description.name).length === 1;
|
|
163599
164033
|
}
|
|
163600
164034
|
var SysmlNameLookup = class {
|
|
163601
164035
|
shared;
|
|
@@ -163705,7 +164139,7 @@ function nameLookupFor(shared) {
|
|
|
163705
164139
|
}
|
|
163706
164140
|
|
|
163707
164141
|
// ../language-server/out/src/services/effective-name.js
|
|
163708
|
-
var
|
|
164142
|
+
var REDEFINITION_KINDS2 = /* @__PURE__ */ new Set([":>>", "redefines"]);
|
|
163709
164143
|
var NO_CANDIDATES = [];
|
|
163710
164144
|
var NO_RESOLVER = () => NO_CANDIDATES;
|
|
163711
164145
|
var nameable = /* @__PURE__ */ new Map();
|
|
@@ -163739,7 +164173,7 @@ function firstRedefinitionPath(node) {
|
|
|
163739
164173
|
for (const relationship of group) {
|
|
163740
164174
|
if (typeof relationship?.kind !== "string")
|
|
163741
164175
|
continue;
|
|
163742
|
-
if (!
|
|
164176
|
+
if (!REDEFINITION_KINDS2.has(relationship.kind))
|
|
163743
164177
|
continue;
|
|
163744
164178
|
const targets = relationship.targets;
|
|
163745
164179
|
if (!Array.isArray(targets))
|
|
@@ -164784,7 +165218,7 @@ function nearestUnits(symbol, limit) {
|
|
|
164784
165218
|
}
|
|
164785
165219
|
|
|
164786
165220
|
// ../language-server/out/src/services/conformance.js
|
|
164787
|
-
var
|
|
165221
|
+
var SPECIALIZATION_KINDS3 = /* @__PURE__ */ new Set([
|
|
164788
165222
|
":>",
|
|
164789
165223
|
":>>",
|
|
164790
165224
|
"specializes",
|
|
@@ -164816,7 +165250,7 @@ function specializedNamesOf(node) {
|
|
|
164816
165250
|
const decl = node;
|
|
164817
165251
|
const out = [];
|
|
164818
165252
|
for (const rel2 of [...decl.preRelationships ?? [], ...decl.relationships ?? []]) {
|
|
164819
|
-
if (!rel2.kind || !
|
|
165253
|
+
if (!rel2.kind || !SPECIALIZATION_KINDS3.has(rel2.kind))
|
|
164820
165254
|
continue;
|
|
164821
165255
|
for (const target of rel2.targets ?? []) {
|
|
164822
165256
|
const text = target.trim();
|
|
@@ -165491,7 +165925,7 @@ function owningOccurrenceOf(node) {
|
|
|
165491
165925
|
return NON_OCCURRENCE_DECL_TYPES.has(owner.$type) ? void 0 : owner;
|
|
165492
165926
|
}
|
|
165493
165927
|
var MAX_ALIAS_HOPS = 8;
|
|
165494
|
-
var
|
|
165928
|
+
var SPECIALIZATION_KINDS4 = /* @__PURE__ */ new Set([
|
|
165495
165929
|
":>",
|
|
165496
165930
|
"subsets",
|
|
165497
165931
|
":>>",
|
|
@@ -165503,7 +165937,7 @@ function specializationTargetsOf(node) {
|
|
|
165503
165937
|
const decl = node;
|
|
165504
165938
|
const out = [];
|
|
165505
165939
|
for (const rel2 of [...decl.preRelationships ?? [], ...decl.relationships ?? []]) {
|
|
165506
|
-
if (!rel2.kind || !
|
|
165940
|
+
if (!rel2.kind || !SPECIALIZATION_KINDS4.has(rel2.kind))
|
|
165507
165941
|
continue;
|
|
165508
165942
|
for (const target of rel2.targets ?? []) {
|
|
165509
165943
|
const text = target.trim();
|
|
@@ -168729,16 +169163,16 @@ ${node.id}`;
|
|
|
168729
169163
|
};
|
|
168730
169164
|
const performedActions = depth < 8 && !(typeQ !== void 0 && seenTypes.has(typeQ)) ? effectiveMembersOf(part).filter((m) => m.$type === "PerformStmt" && !!nameOf2(m)).map((act) => {
|
|
168731
169165
|
const pinSource = this.performTargetOf(act, index2) ?? act;
|
|
168732
|
-
const
|
|
169166
|
+
const pathSegments4 = this.isAnonymousBehaviorReference(act) ? this.featurePaths.resolveDeclarationPath(act).segments.map((segment) => segment.text) : [nameOf2(act)];
|
|
168733
169167
|
return {
|
|
168734
169168
|
act,
|
|
168735
169169
|
pinSource,
|
|
168736
|
-
pathSegments:
|
|
168737
|
-
name:
|
|
169170
|
+
pathSegments: pathSegments4,
|
|
169171
|
+
name: pathSegments4.at(-1) ?? nameOf2(act),
|
|
168738
169172
|
key: concretePerformPath(act, pinSource)
|
|
168739
169173
|
};
|
|
168740
169174
|
}).filter((entry, i, list) => list.findIndex((other) => other.key === entry.key) === i) : [];
|
|
168741
|
-
const performedActionInfos = performedActions.map(({ act, pinSource, pathSegments:
|
|
169175
|
+
const performedActionInfos = performedActions.map(({ act, pinSource, pathSegments: pathSegments4, name, key: key2 }) => {
|
|
168742
169176
|
const id2 = `${instanceId}::__perform_${key2}`;
|
|
168743
169177
|
const inheritedFromDefinition = !!localUsage && !isAstDescendantOrSelf(act, localUsage);
|
|
168744
169178
|
const syncDeclaration2 = this.synchronizationDeclarationOf(act, index2);
|
|
@@ -168746,7 +169180,7 @@ ${node.id}`;
|
|
|
168746
169180
|
act,
|
|
168747
169181
|
name,
|
|
168748
169182
|
id: id2,
|
|
168749
|
-
pathSegments:
|
|
169183
|
+
pathSegments: pathSegments4,
|
|
168750
169184
|
pins: this.actionPinPorts(pinSource, id2, index2, uri),
|
|
168751
169185
|
meta: {
|
|
168752
169186
|
...ivEditMeta(act, id2, void 0, localUsage, [...localPath, name], uri),
|
|
@@ -174869,8 +175303,8 @@ function outlineGroupForType(astType) {
|
|
|
174869
175303
|
}
|
|
174870
175304
|
|
|
174871
175305
|
// ../language-server/out/src/services/document-symbol-provider.js
|
|
174872
|
-
var
|
|
174873
|
-
var
|
|
175306
|
+
var SPECIALIZATION_KINDS5 = /* @__PURE__ */ new Set([":>", "specializes"]);
|
|
175307
|
+
var REDEFINITION_KINDS3 = /* @__PURE__ */ new Set([":>>", "redefines"]);
|
|
174874
175308
|
var INHERITABLE_FEATURE_TYPES = /* @__PURE__ */ new Set([
|
|
174875
175309
|
"ActionDecl",
|
|
174876
175310
|
"AttributeDecl",
|
|
@@ -174941,7 +175375,7 @@ function specializationTargets2(node) {
|
|
|
174941
175375
|
const n2 = node;
|
|
174942
175376
|
const out = [];
|
|
174943
175377
|
for (const rel2 of [...n2.preRelationships ?? [], ...n2.relationships ?? []]) {
|
|
174944
|
-
if (rel2.kind &&
|
|
175378
|
+
if (rel2.kind && SPECIALIZATION_KINDS5.has(rel2.kind))
|
|
174945
175379
|
out.push(...rel2.targets ?? []);
|
|
174946
175380
|
}
|
|
174947
175381
|
return out;
|
|
@@ -174950,7 +175384,7 @@ function redefinitionTargets(node) {
|
|
|
174950
175384
|
const n2 = node;
|
|
174951
175385
|
const out = [];
|
|
174952
175386
|
for (const rel2 of [...n2.preRelationships ?? [], ...n2.relationships ?? []]) {
|
|
174953
|
-
if (rel2.kind &&
|
|
175387
|
+
if (rel2.kind && REDEFINITION_KINDS3.has(rel2.kind))
|
|
174954
175388
|
out.push(...rel2.targets ?? []);
|
|
174955
175389
|
}
|
|
174956
175390
|
return out;
|
|
@@ -175305,21 +175739,21 @@ var import_vscode_languageserver13 = __toESM(require_main4(), 1);
|
|
|
175305
175739
|
function isRequirementNode(node) {
|
|
175306
175740
|
return node?.$type === "RequirementDecl";
|
|
175307
175741
|
}
|
|
175308
|
-
function
|
|
175742
|
+
function ownSubject2(node) {
|
|
175309
175743
|
return (node.members ?? []).find((member) => member.$type === "SubjectDecl");
|
|
175310
175744
|
}
|
|
175311
175745
|
function resolveEffectiveSubject(node) {
|
|
175312
175746
|
if (!isRequirementNode(node))
|
|
175313
175747
|
return void 0;
|
|
175314
|
-
const own =
|
|
175748
|
+
const own = ownSubject2(node);
|
|
175315
175749
|
if (own)
|
|
175316
175750
|
return { subject: own, owner: node, inherited: false };
|
|
175317
175751
|
let container = node.$container;
|
|
175318
175752
|
while (container) {
|
|
175319
175753
|
if (isRequirementNode(container)) {
|
|
175320
|
-
const
|
|
175321
|
-
if (
|
|
175322
|
-
return { subject:
|
|
175754
|
+
const inheritedSubject2 = ownSubject2(container);
|
|
175755
|
+
if (inheritedSubject2) {
|
|
175756
|
+
return { subject: inheritedSubject2, owner: container, inherited: true };
|
|
175323
175757
|
}
|
|
175324
175758
|
}
|
|
175325
175759
|
container = container.$container;
|
|
@@ -176096,6 +176530,11 @@ var DIAGNOSTIC_MESSAGES = {
|
|
|
176096
176530
|
SSM040_INDIVIDUAL_NOT_OCCURRENCE: (name, kind) => `'individual' names one occurrence with an identity of its own, and ${name} is ${kind}, which has no life to identify. Remove 'individual', or move it to the occurrence this belongs to.`,
|
|
176097
176531
|
SSM041_INDIVIDUAL_MULTIPLE_DEFINITIONS: (name, first2, second) => `${name} is typed by two individual definitions, '${first2}' and '${second}'. An individual usage names ONE life, so at most one of its types may be an 'individual def'.`,
|
|
176098
176532
|
SSM042_INDIVIDUAL_WITHOUT_DEFINITION: (name) => `${name} is declared 'individual' but names no individual definition. An individual usage is typed by exactly one 'individual def' - the definition that carries the identity it names.`,
|
|
176533
|
+
// issue #165 — a satisfaction binds a thing to the subject a requirement
|
|
176534
|
+
// constrains, so the thing has to BE one of those (OMG SysML v2 Part 1
|
|
176535
|
+
// §7.21.2). The message names both types because the fix is either to bind a
|
|
176536
|
+
// different satisfier or to widen the requirement's subject.
|
|
176537
|
+
SSM044_SATISFIER_SUBJECT_TYPE: (satisfier, satisfierType, requirement, subjectType) => `'${satisfier}' is a '${satisfierType}', but '${requirement}' constrains a subject of type '${subjectType}'. A satisfying element must conform to the requirement's subject.`,
|
|
176099
176538
|
// REQ-392 — a `sysml-format` comment the formatter cannot act on. Advisory:
|
|
176100
176539
|
// the directive is inert, and saying so beats leaving the author to wonder
|
|
176101
176540
|
// why their layout was reformatted anyway.
|
|
@@ -177248,8 +177687,8 @@ var SysmlHoverProvider = class {
|
|
|
177248
177687
|
return buildOperatorHover(token, details);
|
|
177249
177688
|
}
|
|
177250
177689
|
async resolveLibraryFunction(qualifiedName) {
|
|
177251
|
-
const
|
|
177252
|
-
const descriptions = this.indexManager.allElements().toArray().filter((d) => (d.type === "FunctionDecl" || d.type === "CalcDecl" || d.type === "PredicateDecl") && (d.name === qualifiedName || d.name ===
|
|
177690
|
+
const simpleName3 = relationshipTargetKey(qualifiedName);
|
|
177691
|
+
const descriptions = this.indexManager.allElements().toArray().filter((d) => (d.type === "FunctionDecl" || d.type === "CalcDecl" || d.type === "PredicateDecl") && (d.name === qualifiedName || d.name === simpleName3)).sort((a2, b) => Number(b.name === qualifiedName) - Number(a2.name === qualifiedName));
|
|
177253
177692
|
for (const desc of descriptions) {
|
|
177254
177693
|
const node = await this.nodeFromDescription(desc);
|
|
177255
177694
|
if (node)
|
|
@@ -178058,7 +178497,7 @@ var SysmlCompletionProvider = class extends DefaultCompletionProvider {
|
|
|
178058
178497
|
itemForDescription(desc, document2, offset2) {
|
|
178059
178498
|
const importPath = document2 && offset2 !== void 0 ? this.autoImportPath(desc, document2, offset2) : void 0;
|
|
178060
178499
|
return {
|
|
178061
|
-
label:
|
|
178500
|
+
label: simpleName2(desc.name) ?? desc.name,
|
|
178062
178501
|
kind: this.nodeKindProvider.getCompletionItemKind(desc),
|
|
178063
178502
|
detail: desc.type,
|
|
178064
178503
|
sortText: "0",
|
|
@@ -178084,7 +178523,7 @@ var SysmlCompletionProvider = class extends DefaultCompletionProvider {
|
|
|
178084
178523
|
if (desc.name.includes("::"))
|
|
178085
178524
|
return desc.name;
|
|
178086
178525
|
const candidates = this.qualifiedNamesByElement().get(elementKey2(desc));
|
|
178087
|
-
return candidates?.find((name) =>
|
|
178526
|
+
return candidates?.find((name) => simpleName2(name) === desc.name);
|
|
178088
178527
|
}
|
|
178089
178528
|
// REQ-245, REQ-268 — An element's qualified names, shortest first, keyed by
|
|
178090
178529
|
// the element. A type-context completion offers thousands of symbols and each
|
|
@@ -178474,7 +178913,7 @@ function nearestMemberOwner(node) {
|
|
|
178474
178913
|
}
|
|
178475
178914
|
return void 0;
|
|
178476
178915
|
}
|
|
178477
|
-
function
|
|
178916
|
+
function simpleName2(name) {
|
|
178478
178917
|
if (!name)
|
|
178479
178918
|
return void 0;
|
|
178480
178919
|
const parts = name.split(/::|\./u);
|
|
@@ -178674,7 +179113,7 @@ var import_vscode_languageserver16 = __toESM(require_main4(), 1);
|
|
|
178674
179113
|
|
|
178675
179114
|
// ../language-server/out/src/services/metadata-filter.js
|
|
178676
179115
|
var INCONCLUSIVE2 = { kind: "inconclusive" };
|
|
178677
|
-
var
|
|
179116
|
+
var SPECIALIZATION_KINDS6 = /* @__PURE__ */ new Set([":>", "specializes", ":>>", "redefines", "subsets"]);
|
|
178678
179117
|
var MAX_SPECIALIZATION_DEPTH = 32;
|
|
178679
179118
|
var MAX_VALUE_DEPTH = 16;
|
|
178680
179119
|
function evaluateFilterCondition(condition, element, options) {
|
|
@@ -178777,7 +179216,7 @@ function declaresFeature2(node, name) {
|
|
|
178777
179216
|
if (node.name === name)
|
|
178778
179217
|
return true;
|
|
178779
179218
|
for (const rel2 of [...node.preRelationships ?? [], ...node.relationships ?? []]) {
|
|
178780
|
-
if (rel2.kind &&
|
|
179219
|
+
if (rel2.kind && SPECIALIZATION_KINDS6.has(rel2.kind) && (rel2.targets ?? []).includes(name))
|
|
178781
179220
|
return true;
|
|
178782
179221
|
}
|
|
178783
179222
|
return false;
|
|
@@ -178944,7 +179383,7 @@ function nameScope(ctx, depth = 0) {
|
|
|
178944
179383
|
function specializationTargets3(node) {
|
|
178945
179384
|
const targets = [];
|
|
178946
179385
|
for (const rel2 of [...node.preRelationships ?? [], ...node.relationships ?? []]) {
|
|
178947
|
-
if (rel2.kind &&
|
|
179386
|
+
if (rel2.kind && SPECIALIZATION_KINDS6.has(rel2.kind))
|
|
178948
179387
|
targets.push(...rel2.targets ?? []);
|
|
178949
179388
|
}
|
|
178950
179389
|
return targets;
|
|
@@ -179187,10 +179626,10 @@ function resolveImportedDescription(path10, globalDescriptions, options, visited
|
|
|
179187
179626
|
if (split < 0)
|
|
179188
179627
|
return void 0;
|
|
179189
179628
|
const ownerPath = path10.slice(0, split);
|
|
179190
|
-
const
|
|
179629
|
+
const simpleName3 = path10.slice(split + 2);
|
|
179191
179630
|
const exported = [];
|
|
179192
179631
|
expandNamespaceImports(ownerPath, globalDescriptions, exported, options, visitedNamespaces, importAll);
|
|
179193
|
-
return exported.find((entry) => entry.name ===
|
|
179632
|
+
return exported.find((entry) => entry.name === simpleName3)?.description;
|
|
179194
179633
|
}
|
|
179195
179634
|
function selectMemberships(path10, form, globalDescriptions) {
|
|
179196
179635
|
if (form.wildcard === "none")
|
|
@@ -179641,7 +180080,7 @@ function compositionProblemsOf(node, resolve8) {
|
|
|
179641
180080
|
}
|
|
179642
180081
|
|
|
179643
180082
|
// ../language-server/out/src/services/validator.js
|
|
179644
|
-
var
|
|
180083
|
+
var REDEFINITION_KINDS4 = /* @__PURE__ */ new Set([
|
|
179645
180084
|
":>>",
|
|
179646
180085
|
"redefines",
|
|
179647
180086
|
":>",
|
|
@@ -179735,7 +180174,7 @@ function maskNonCode(text) {
|
|
|
179735
180174
|
}
|
|
179736
180175
|
return out.join("");
|
|
179737
180176
|
}
|
|
179738
|
-
var
|
|
180177
|
+
var SPECIALIZATION_KINDS7 = /* @__PURE__ */ new Set([":>", ":>>", "specializes", "subsets", "redefines"]);
|
|
179739
180178
|
var CONSTRAINT_SIDE_EFFECT_TYPES = /* @__PURE__ */ new Set([
|
|
179740
180179
|
"AssignNode",
|
|
179741
180180
|
"SendNode",
|
|
@@ -179923,7 +180362,7 @@ var SysmlValidator = class _SysmlValidator {
|
|
|
179923
180362
|
// inventory completely. A later segment depends on the KerML semantic model
|
|
179924
180363
|
// this resolver does not evaluate.
|
|
179925
180364
|
checkRelationshipTargets(node, accept) {
|
|
179926
|
-
if (!node.kind || !
|
|
180365
|
+
if (!node.kind || !REDEFINITION_KINDS4.has(node.kind))
|
|
179927
180366
|
return;
|
|
179928
180367
|
for (let ordinal = 0; ordinal < node.targets.length; ordinal += 1) {
|
|
179929
180368
|
const resolution = this.featurePaths.resolvePropertyPath(node, "targets", ordinal);
|
|
@@ -181199,7 +181638,7 @@ ${baseIndent}}`;
|
|
|
181199
181638
|
accept(severity("SYN019", "error"), DIAGNOSTIC_MESSAGES.SYN019_ABSTRACT_VARIATION, { node: child, code: "SYN019" });
|
|
181200
181639
|
}
|
|
181201
181640
|
for (const relation of [...decl.preRelationships ?? [], ...decl.relationships ?? []]) {
|
|
181202
|
-
if (!relation.kind || !
|
|
181641
|
+
if (!relation.kind || !SPECIALIZATION_KINDS7.has(relation.kind))
|
|
181203
181642
|
continue;
|
|
181204
181643
|
for (let index2 = 0; index2 < (relation.targets?.length ?? 0); index2 += 1) {
|
|
181205
181644
|
const resolution = this.featurePaths.resolvePropertyPath(relation, "targets", index2);
|
|
@@ -181615,7 +182054,7 @@ ${baseIndent}}`;
|
|
|
181615
182054
|
this.checkInverseOfTargets(decl, index2, accept);
|
|
181616
182055
|
this.checkTypeComposition(decl, index2, accept);
|
|
181617
182056
|
}
|
|
181618
|
-
this.checkTypeConformance(decls, index2, accept);
|
|
182057
|
+
this.checkTypeConformance(decls, satisfyStmts, index2, accept);
|
|
181619
182058
|
}
|
|
181620
182059
|
// ══════════════════════════════════════════════════════════════════════
|
|
181621
182060
|
// REQ-390 — SSM017-SSM021: whole-model type conformance (issue #104)
|
|
@@ -181625,7 +182064,7 @@ ${baseIndent}}`;
|
|
|
181625
182064
|
// the walk, so a type rooted in the unparsed standard library yields
|
|
181626
182065
|
// `unknown` and no diagnostic. That is what keeps the OMG corpus clean while
|
|
181627
182066
|
// still catching the workspace-local mistakes these codes exist for.
|
|
181628
|
-
checkTypeConformance(decls, index2, accept) {
|
|
182067
|
+
checkTypeConformance(decls, satisfyStmts, index2, accept) {
|
|
181629
182068
|
const model = new ConformanceModel((name) => this.resolveUnique(name, index2), (node) => this.implicit?.closureOf(node) ?? { names: /* @__PURE__ */ new Set(), complete: true });
|
|
181630
182069
|
for (const decl of decls) {
|
|
181631
182070
|
this.checkRedefinitionTypeConformance(decl, model, index2, accept);
|
|
@@ -181641,6 +182080,40 @@ ${baseIndent}}`;
|
|
|
181641
182080
|
this.checkInterfaceEndTypes(decl, model, index2, accept);
|
|
181642
182081
|
this.checkIndividualDefinitions(decl, model, accept);
|
|
181643
182082
|
}
|
|
182083
|
+
for (const stmt of satisfyStmts)
|
|
182084
|
+
this.checkSatisfierSubjectType(stmt, model, index2, accept);
|
|
182085
|
+
}
|
|
182086
|
+
// REQ-416 — SSM044: `satisfy MassReq by engine;` claims that `engine` is one
|
|
182087
|
+
// of the things `MassReq` constrains, so `engine`'s type has to conform to
|
|
182088
|
+
// the requirement's subject type (OMG SysML v2 Part 1 §7.21.2: the
|
|
182089
|
+
// satisfying feature is bound to the requirement's subject parameter).
|
|
182090
|
+
//
|
|
182091
|
+
// The subject read here is the EFFECTIVE one (issue #165): a requirement
|
|
182092
|
+
// usage inherits the subject its definition declares, and a subrequirement
|
|
182093
|
+
// shares its parent's. A requirement that declares no subject at all
|
|
182094
|
+
// constrains `Anything`, which every satisfier conforms to, so nothing is
|
|
182095
|
+
// reported for one. Like every SSM01x check this stays silent unless the
|
|
182096
|
+
// closure was walked COMPLETELY.
|
|
182097
|
+
checkSatisfierSubjectType(stmt, model, index2, accept) {
|
|
182098
|
+
const intent = satisfyIntentOf(stmt);
|
|
182099
|
+
if (!intent)
|
|
182100
|
+
return;
|
|
182101
|
+
const requirement = this.resolveUnique(intent.path, index2);
|
|
182102
|
+
if (!requirement || requirement.$type !== "RequirementDecl")
|
|
182103
|
+
return;
|
|
182104
|
+
const subject = effectiveSubject(requirement, (name) => this.resolveUnique(name, index2));
|
|
182105
|
+
if (subject.origin === "default" || subject.typeName === DEFAULT_SUBJECT_TYPE)
|
|
182106
|
+
return;
|
|
182107
|
+
const satisfier = intent.enclosingSelf ? intent.enclosing : intent.byName ? this.resolveUnique(intent.byName, index2) : void 0;
|
|
182108
|
+
if (!satisfier)
|
|
182109
|
+
return;
|
|
182110
|
+
const declared = soleDeclaredType(satisfier);
|
|
182111
|
+
if (!declared || declared.conjugated)
|
|
182112
|
+
return;
|
|
182113
|
+
if (model.conforms(declared.text, subject.typeName) !== "unrelated")
|
|
182114
|
+
return;
|
|
182115
|
+
const label = intent.byName ?? satisfier.name ?? "this usage";
|
|
182116
|
+
accept(severity("SSM044", "error"), DIAGNOSTIC_MESSAGES.SSM044_SATISFIER_SUBJECT_TYPE(label, declared.text, intent.path, subject.typeName), { node: stmt, code: "SSM044" });
|
|
181644
182117
|
}
|
|
181645
182118
|
// issue #162 — SSM041 / SSM042: the identity an individual usage names.
|
|
181646
182119
|
//
|
|
@@ -183105,7 +183578,7 @@ function specializationTargets4(node) {
|
|
|
183105
183578
|
...node.relationships ?? []
|
|
183106
183579
|
];
|
|
183107
183580
|
for (const rel2 of rels) {
|
|
183108
|
-
if (rel2.kind &&
|
|
183581
|
+
if (rel2.kind && SPECIALIZATION_KINDS7.has(rel2.kind))
|
|
183109
183582
|
out.push(...rel2.targets);
|
|
183110
183583
|
}
|
|
183111
183584
|
return out;
|
|
@@ -183222,6 +183695,12 @@ var USAGE_DEFINITION_DOMAINS = {
|
|
|
183222
183695
|
AllocationDecl: { keyword: "allocation", expected: "an 'allocation def' (a 'connection def' is one)", allowed: /* @__PURE__ */ new Set(["AllocationDecl", "ConnectionDecl"]) },
|
|
183223
183696
|
ViewDecl: { keyword: "view", expected: "a 'view def'", allowed: /* @__PURE__ */ new Set(["ViewDecl", "PartDecl"]) },
|
|
183224
183697
|
ViewpointDecl: { keyword: "viewpoint", expected: "a 'viewpoint def' (a 'requirement def' is one)", allowed: /* @__PURE__ */ new Set(["ViewpointDecl", "RequirementDecl", "ConcernDecl"]) },
|
|
183698
|
+
// issue #165 — OMG SysML v2 Part 1 §7.21.1 types `actorParameter` and
|
|
183699
|
+
// `stakeholderParameter` as PART usages: an actor is a part that plays a
|
|
183700
|
+
// role, and a stakeholder is a part that holds an interest. So each names a
|
|
183701
|
+
// part definition, exactly as a `part` usage does.
|
|
183702
|
+
ActorDecl: { keyword: "actor", expected: "a 'part def' (or the 'item def' / 'occurrence def' it specializes)", allowed: /* @__PURE__ */ new Set(["PartDecl", "ItemDecl", "OccurrenceDecl"]) },
|
|
183703
|
+
StakeholderDecl: { keyword: "stakeholder", expected: "a 'part def' (or the 'item def' / 'occurrence def' it specializes)", allowed: /* @__PURE__ */ new Set(["PartDecl", "ItemDecl", "OccurrenceDecl"]) },
|
|
183225
183704
|
RenderingDecl: { keyword: "rendering", expected: "a 'rendering def'", allowed: /* @__PURE__ */ new Set(["RenderingDecl", "PartDecl"]) },
|
|
183226
183705
|
MetadataDecl: { keyword: "metadata", expected: "a 'metadata def'", allowed: /* @__PURE__ */ new Set(["MetadataDecl"]) }
|
|
183227
183706
|
};
|
|
@@ -183479,7 +183958,7 @@ function introducedNames(imp, index2, nodeOf) {
|
|
|
183479
183958
|
function protectedNamespaceKeysFor(context, globalDescs, nodeOf) {
|
|
183480
183959
|
const keys3 = /* @__PURE__ */ new Set();
|
|
183481
183960
|
const visitedTargets = /* @__PURE__ */ new Set();
|
|
183482
|
-
const
|
|
183961
|
+
const collect2 = (targetName) => {
|
|
183483
183962
|
if (visitedTargets.has(targetName))
|
|
183484
183963
|
return;
|
|
183485
183964
|
visitedTargets.add(targetName);
|
|
@@ -183491,13 +183970,13 @@ function protectedNamespaceKeysFor(context, globalDescs, nodeOf) {
|
|
|
183491
183970
|
if (!node || !isDeclLike(node))
|
|
183492
183971
|
return;
|
|
183493
183972
|
for (const inherited of specializationTargets4(node))
|
|
183494
|
-
|
|
183973
|
+
collect2(inherited);
|
|
183495
183974
|
};
|
|
183496
183975
|
let cur = context;
|
|
183497
183976
|
while (cur) {
|
|
183498
183977
|
if (isDeclLike(cur)) {
|
|
183499
183978
|
for (const target of specializationTargets4(cur))
|
|
183500
|
-
|
|
183979
|
+
collect2(target);
|
|
183501
183980
|
}
|
|
183502
183981
|
cur = cur.$container;
|
|
183503
183982
|
}
|
|
@@ -183881,12 +184360,12 @@ function importSignature(imp) {
|
|
|
183881
184360
|
const segments = imp.segs.map((seg) => `${seg.name ?? ""}${seg.star ? "*" : ""}${seg.recursive ? "**" : ""}`);
|
|
183882
184361
|
return `${importVisibility(imp)} ${imp.head}::${segments.join("::")}${imp.alias ? ` as ${imp.alias}` : ""}`;
|
|
183883
184362
|
}
|
|
183884
|
-
var
|
|
184363
|
+
var SPECIALIZATION_KINDS8 = /* @__PURE__ */ new Set([":>", ":>>", "specializes", "subsets", "redefines"]);
|
|
183885
184364
|
function specializationTargets5(node) {
|
|
183886
184365
|
const n2 = node;
|
|
183887
184366
|
const out = [];
|
|
183888
184367
|
for (const rel2 of [...n2.preRelationships ?? [], ...n2.relationships ?? []]) {
|
|
183889
|
-
if (rel2.kind &&
|
|
184368
|
+
if (rel2.kind && SPECIALIZATION_KINDS8.has(rel2.kind))
|
|
183890
184369
|
out.push(...rel2.targets ?? []);
|
|
183891
184370
|
}
|
|
183892
184371
|
return out;
|
|
@@ -184174,12 +184653,12 @@ function directImportEntries(imp, descriptions) {
|
|
|
184174
184653
|
}
|
|
184175
184654
|
return applyFilters(imp, selectMemberships(path10, form, descriptions), options);
|
|
184176
184655
|
}
|
|
184177
|
-
var
|
|
184656
|
+
var SPECIALIZATION_KINDS9 = /* @__PURE__ */ new Set([":>", ":>>", "specializes", "subsets", "redefines"]);
|
|
184178
184657
|
function specializationTargets6(node) {
|
|
184179
184658
|
const value = node;
|
|
184180
184659
|
const targets = [];
|
|
184181
184660
|
for (const relationship of [...value.preRelationships ?? [], ...value.relationships ?? []]) {
|
|
184182
|
-
if (relationship.kind &&
|
|
184661
|
+
if (relationship.kind && SPECIALIZATION_KINDS9.has(relationship.kind)) {
|
|
184183
184662
|
targets.push(...relationship.targets ?? []);
|
|
184184
184663
|
}
|
|
184185
184664
|
}
|
|
@@ -184348,7 +184827,7 @@ var SysmlRenameProvider = class extends DefaultRenameProvider {
|
|
|
184348
184827
|
// comparison is against `oldName` directly.
|
|
184349
184828
|
*writtenPathSegments(root4, oldName) {
|
|
184350
184829
|
const matching = (segments) => segments.filter((segment) => segment.text === oldName);
|
|
184351
|
-
const spellsName = (path10) => !!path10 &&
|
|
184830
|
+
const spellsName = (path10) => !!path10 && pathSegments3(path10).some((step) => canonicalEscapedName(step) === oldName);
|
|
184352
184831
|
for (const node of [root4, ...ast_utils_exports.streamAllContents(root4)]) {
|
|
184353
184832
|
if (isPathExpr(node)) {
|
|
184354
184833
|
if (!spellsName(node.path))
|
|
@@ -184423,7 +184902,7 @@ var SysmlRenameProvider = class extends DefaultRenameProvider {
|
|
|
184423
184902
|
return this.references.findDeclaration(leafNode);
|
|
184424
184903
|
}
|
|
184425
184904
|
};
|
|
184426
|
-
function
|
|
184905
|
+
function pathSegments3(path10) {
|
|
184427
184906
|
const out = [];
|
|
184428
184907
|
let current2 = "";
|
|
184429
184908
|
let quoted = false;
|
|
@@ -186213,7 +186692,7 @@ function typeAnchor(node, refText) {
|
|
|
186213
186692
|
}
|
|
186214
186693
|
return void 0;
|
|
186215
186694
|
}
|
|
186216
|
-
var
|
|
186695
|
+
var REDEFINITION_KINDS5 = /* @__PURE__ */ new Set([":>>", "redefines"]);
|
|
186217
186696
|
var CONSTANT_CARRYING_KINDS = /* @__PURE__ */ new Set([
|
|
186218
186697
|
":>",
|
|
186219
186698
|
"subsets",
|
|
@@ -186602,7 +187081,7 @@ var SysmlInlayHintProvider = class {
|
|
|
186602
187081
|
const parameter = mine[index2].node;
|
|
186603
187082
|
if (!parameter.name || !parameter.$cstNode)
|
|
186604
187083
|
continue;
|
|
186605
|
-
if (allRelationships3(parameter).some((rel2) => rel2.kind &&
|
|
187084
|
+
if (allRelationships3(parameter).some((rel2) => rel2.kind && REDEFINITION_KINDS5.has(rel2.kind)))
|
|
186606
187085
|
continue;
|
|
186607
187086
|
const target = theirs[index2].node;
|
|
186608
187087
|
if (!target.name || target.name === parameter.name)
|
|
@@ -186845,7 +187324,7 @@ var SysmlInlayHintProvider = class {
|
|
|
186845
187324
|
function effectiveNameHint(node, resolver) {
|
|
186846
187325
|
if (node.name || node.shortName?.name || !node.$cstNode)
|
|
186847
187326
|
return void 0;
|
|
186848
|
-
const redefinition = allRelationships3(node).find((rel2) => rel2.kind &&
|
|
187327
|
+
const redefinition = allRelationships3(node).find((rel2) => rel2.kind && REDEFINITION_KINDS5.has(rel2.kind) && (rel2.targets?.length ?? 0) > 0);
|
|
186849
187328
|
if (!redefinition?.targets?.[0])
|
|
186850
187329
|
return void 0;
|
|
186851
187330
|
const names = effectiveNamesOf(node, resolver);
|
|
@@ -186878,6 +187357,12 @@ var EVAL_LABEL = {
|
|
|
186878
187357
|
inconclusive: "$(question) Requirement: inconclusive (values unavailable)",
|
|
186879
187358
|
unresolved: "$(warning) Requirement: unresolved reference"
|
|
186880
187359
|
};
|
|
187360
|
+
var NEGATED_EVAL_LABEL = {
|
|
187361
|
+
pass: "$(pass) Requirement not satisfied, as claimed",
|
|
187362
|
+
fail: "$(error) Requirement satisfied, against the claim",
|
|
187363
|
+
inconclusive: EVAL_LABEL.inconclusive,
|
|
187364
|
+
unresolved: EVAL_LABEL.unresolved
|
|
187365
|
+
};
|
|
186881
187366
|
function indexByName(root4, type) {
|
|
186882
187367
|
const map3 = /* @__PURE__ */ new Map();
|
|
186883
187368
|
walkAst(root4, (n2) => {
|
|
@@ -186887,11 +187372,6 @@ function indexByName(root4, type) {
|
|
|
186887
187372
|
});
|
|
186888
187373
|
return map3;
|
|
186889
187374
|
}
|
|
186890
|
-
function lastSegment4(path10) {
|
|
186891
|
-
if (!path10)
|
|
186892
|
-
return void 0;
|
|
186893
|
-
return path10.split(/::|\./).pop();
|
|
186894
|
-
}
|
|
186895
187375
|
function qualifiedNameOf2(node) {
|
|
186896
187376
|
const parts = [];
|
|
186897
187377
|
let cur = node;
|
|
@@ -186977,16 +187457,13 @@ var SysmlCodeLensProvider = class {
|
|
|
186977
187457
|
return;
|
|
186978
187458
|
const range = cst.range;
|
|
186979
187459
|
if (isSatisfyStmt(node)) {
|
|
186980
|
-
const
|
|
186981
|
-
|
|
186982
|
-
|
|
186983
|
-
const bound = bindingName(node.by);
|
|
186984
|
-
const subject = bound ? parts.get(bound) : void 0;
|
|
186985
|
-
const result = evaluateRequirement(req, subject);
|
|
187460
|
+
const result = evaluateSatisfy(node, (name) => requirements.get(name), (name) => parts.get(name));
|
|
187461
|
+
if (result.requirement) {
|
|
187462
|
+
const labels = node.isNegated ? NEGATED_EVAL_LABEL : EVAL_LABEL;
|
|
186986
187463
|
lenses.push({
|
|
186987
187464
|
range,
|
|
186988
187465
|
command: {
|
|
186989
|
-
title:
|
|
187466
|
+
title: labels[result.status],
|
|
186990
187467
|
command: "editor.action.findReferences",
|
|
186991
187468
|
arguments: [uri, range.start]
|
|
186992
187469
|
}
|
|
@@ -190435,7 +190912,7 @@ function collapseActionFrames(model, hiddenInternals, isHost = isCollapsibleActi
|
|
|
190435
190912
|
frames.filter((f) => framePresentationEnabled(hiddenInternals, f) && isHost(f)).map((f) => f.id)
|
|
190436
190913
|
);
|
|
190437
190914
|
if (requested.size === 0) return model;
|
|
190438
|
-
const
|
|
190915
|
+
const rootOf2 = (id2) => {
|
|
190439
190916
|
let root4;
|
|
190440
190917
|
const seen = /* @__PURE__ */ new Set();
|
|
190441
190918
|
for (let cur = id2; cur !== void 0 && !seen.has(cur); cur = frameById.get(cur)?.parent) {
|
|
@@ -190444,13 +190921,13 @@ function collapseActionFrames(model, hiddenInternals, isHost = isCollapsibleActi
|
|
|
190444
190921
|
}
|
|
190445
190922
|
return root4;
|
|
190446
190923
|
};
|
|
190447
|
-
const roots = new Set([...requested].filter((id2) =>
|
|
190924
|
+
const roots = new Set([...requested].filter((id2) => rootOf2(frameById.get(id2)?.parent) === void 0));
|
|
190448
190925
|
const dockOf = /* @__PURE__ */ new Map();
|
|
190449
190926
|
const proxyHost = /* @__PURE__ */ new Map();
|
|
190450
190927
|
const ownerOfHiddenPort = /* @__PURE__ */ new Map();
|
|
190451
190928
|
const hiddenFrameIds = /* @__PURE__ */ new Set();
|
|
190452
190929
|
for (const f of frames) {
|
|
190453
|
-
const root4 = roots.has(f.id) ?
|
|
190930
|
+
const root4 = roots.has(f.id) ? rootOf2(f.parent) : rootOf2(f.id);
|
|
190454
190931
|
if (root4 === void 0) continue;
|
|
190455
190932
|
hiddenFrameIds.add(f.id);
|
|
190456
190933
|
dockOf.set(f.id, root4);
|
|
@@ -190461,7 +190938,7 @@ function collapseActionFrames(model, hiddenInternals, isHost = isCollapsibleActi
|
|
|
190461
190938
|
}
|
|
190462
190939
|
const hiddenNodeIds = /* @__PURE__ */ new Set();
|
|
190463
190940
|
for (const n2 of model.nodes) {
|
|
190464
|
-
const root4 =
|
|
190941
|
+
const root4 = rootOf2(n2.frame);
|
|
190465
190942
|
if (root4 === void 0) continue;
|
|
190466
190943
|
hiddenNodeIds.add(n2.id);
|
|
190467
190944
|
dockOf.set(n2.id, root4);
|
|
@@ -210783,7 +211260,7 @@ async function runExport(command) {
|
|
|
210783
211260
|
}
|
|
210784
211261
|
|
|
210785
211262
|
// src/main.ts
|
|
210786
|
-
var VERSION2 = true ? "0.
|
|
211263
|
+
var VERSION2 = true ? "0.36.0" : "dev";
|
|
210787
211264
|
function display(file) {
|
|
210788
211265
|
const rel2 = path9.relative(process.cwd(), file);
|
|
210789
211266
|
return rel2 && !rel2.startsWith("..") ? rel2.split(path9.sep).join("/") : file;
|