2026-10-24 05:49:57 +08:00
|
|
|
/** Independent unknown host inputs keep both conditional arms reachable. */
|
2026-10-24 06:19:05 +08:00
|
|
|
export const primitiveCandidateExpansionExpression = (): string =>
|
2026-10-24 05:49:57 +08:00
|
|
|
Array.from(
|
|
|
|
|
{ length: 20 },
|
|
|
|
|
(_, index) => `(globalThis.choice${String(index)} ? "a" : "b")`,
|
|
|
|
|
).join(" + ");
|
2026-10-10 02:21:54 +08:00
|
|
|
|
|
|
|
|
/** Source whose repeated doubling exceeds derived primitive string storage. */
|
|
|
|
|
export const primitiveByteExpansionSource = (): string => {
|
|
|
|
|
const declarations = ['const value0 = "x";'];
|
|
|
|
|
for (let index = 1; index <= 30; index += 1) {
|
|
|
|
|
const previous = `value${String(index - 1)}`;
|
|
|
|
|
declarations.push(
|
|
|
|
|
`const value${String(index)} = ${previous} + ${previous};`,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
declarations.push("const answer = value30;");
|
|
|
|
|
return declarations.join("\n");
|
|
|
|
|
};
|