{"_id":"@a0n/aeon-logic","_rev":"3-285c801d56eba746e34c06071d172b0b","name":"@a0n/aeon-logic","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@a0n/aeon-logic","version":"0.1.0","keywords":["tla","temporal-logic","model-checker","fork-race-fold","formal-methods"],"author":{"name":"Affectively AI"},"license":"MIT","_id":"@a0n/aeon-logic@0.1.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"dist":{"shasum":"de8e558a850cd1157d5cc882ecf6f2574ceae0fe","tarball":"https://registry.npmjs.org/@a0n/aeon-logic/-/aeon-logic-0.1.0.tgz","fileCount":57,"integrity":"sha512-RoZrHMGWZT0w6WRPLtKmM6IQ1LNJWHz7MeQy7hZ9TBmrWN+TGXqzoZpK4iyUk56wYgAxF96Yv+cT/PS6inCM9w==","signatures":[{"sig":"MEYCIQDBVQYcFWTo+n1MYRvTQP1EwZ3GmeqPS3nrR4iz/gmoGAIhALe9DUkB10aehZ7ytKFQiqAKMFzjm+Y5eu3DYn5DdhDI","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":281162},"main":"dist/index.js","type":"module","_from":"file:a0n-aeon-logic-0.1.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./src/browser.ts","import":"./src/browser.ts"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","check":"bun run typecheck && bun run test","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"_resolved":"/private/var/folders/kf/tkq8cmd54fl9c1wh414dj3240000gn/T/3ee76cd661ed239d12613d2bb44ffef6/a0n-aeon-logic-0.1.0.tgz","_integrity":"sha512-RoZrHMGWZT0w6WRPLtKmM6IQ1LNJWHz7MeQy7hZ9TBmrWN+TGXqzoZpK4iyUk56wYgAxF96Yv+cT/PS6inCM9w==","deprecated":"This package is deprecated and no longer supported. Do not use.","_npmVersion":"11.11.0","description":"Fork/Race/Fold temporal logic engine and model checker","directories":{},"_nodeVersion":"25.8.0","_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.9","typescript":"^5.9.3","@types/node":"^25.3.2"},"_npmOperationalInternal":{"tmp":"tmp/aeon-logic_0.1.0_1773802063476_0.32208047418844044","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-03-18T02:47:43.354Z","modified":"2026-03-27T20:48:53.025Z","0.1.0":"2026-03-18T02:47:43.634Z"},"author":{"name":"Affectively AI"},"license":"MIT","keywords":["tla","temporal-logic","model-checker","fork-race-fold","formal-methods"],"description":"Fork/Race/Fold temporal logic engine and model checker","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# @a0n/aeon-logic\n\nFormal-methods toolkit for fork/race/fold systems. Model checker, TLA+/TLC helpers, Lean project inspection, `.gg` parsing, temporal formula compilation, boundary learning, and a browser-safe entrypoint -- all in one package.\n\n## Install\n\n```bash\nbun add @a0n/aeon-logic\n```\n\n```bash\nnpm install @a0n/aeon-logic   # or yarn / pnpm\n```\n\nTwo entrypoints:\n- `@a0n/aeon-logic` -- full package (Node/Bun)\n- `@a0n/aeon-logic/browser` -- browser-safe (no Lean helpers)\n\n## Quick Start\n\n### Model Checker\n\n```ts\nimport { ForkRaceFoldModelChecker } from '@a0n/aeon-logic';\n\nconst checker = new ForkRaceFoldModelChecker<{ value: number }>();\n\nconst result = await checker.check(\n  {\n    initialStates: [{ value: 0 }],\n    fingerprint: (state) => `${state.value}`,\n    actions: [\n      {\n        name: 'Inc',\n        enabled: (state) => state.value < 2,\n        successors: (state) => [{ value: state.value + 1 }],\n      },\n    ],\n  },\n  {\n    invariants: [{ name: 'Bounded', test: (state) => state.value <= 2 }],\n    eventual: [{ name: 'Reached2', test: (state) => state.value === 2 }],\n  }\n);\n\nconsole.log(result.status);       // 'pass' | 'violation'\nconsole.log(result.stats.states);  // total states explored\n```\n\n### GG Topology Checking\n\n```ts\nimport { checkGgProgram, parseGgProgram } from '@a0n/aeon-logic';\n\nconst result = await checkGgProgram(`\n  (input)-[:FORK]->(a | b)-[:RACE]->(winner)\n`);\n\nconsole.log(result.status);  // 'pass' if invariants hold\n```\n\n### TLA+ Generation\n\n```ts\nimport { renderTlaModule, parseTlcConfig } from '@a0n/aeon-logic';\n\nconst tla = renderTlaModule({\n  moduleName: 'Counter',\n  extends: ['Naturals'],\n  body: ['VARIABLE x', 'Init == x = 0', 'Next == x\\\\' = x + 1', 'Spec == Init /\\\\ [][Next]_x'],\n});\n\nconst cfg = parseTlcConfig(`SPECIFICATION Spec\\nINVARIANT TypeOK`);\n```\n\n### Temporal Formulas\n\n```ts\nimport { compileTemporalFormula, parseTemporalFormula } from '@a0n/aeon-logic';\n\nconst formula = parseTemporalFormula('always(x > 0)');\nconst compiled = compileTemporalFormula(formula);\n```\n\n### Boundary Learning\n\n```ts\nimport { runBoundarySweep, createInversionPair } from '@a0n/aeon-logic';\n\nconst sweep = await runBoundarySweep({\n  parameter: 'threshold',\n  range: { min: 0, max: 1, steps: 20 },\n  buildModel: (value) => createModelWithThreshold(value),\n  invariants: [{ name: 'Safe', test: (s) => s.safe }],\n});\n\nconsole.log(sweep.frontier);  // where the invariant starts failing\n```\n\n## API\n\n### Core\n\n| Export | Description |\n|--------|-------------|\n| `ForkRaceFoldModelChecker` | Finite-state model checker with invariant and liveness properties |\n| `LogicChainSuperposition` | Superposition-based logic chain evaluation |\n| `ComplexLogicChainSuperposition` | Complex-number weighted logic chains |\n| `LogicChainFlowBridge` | Bridge between logic chains and flow protocol |\n\n### GG Integration\n\n| Export | Description |\n|--------|-------------|\n| `checkGgProgram` | Parse and model-check a `.gg` topology in one call |\n| `parseGgProgram` | Parse `.gg` syntax into a typed AST |\n| `buildGgTemporalModel` | Convert parsed `.gg` into a temporal model for the checker |\n| `buildDefaultGgCheckerOptions` | Default invariants for `.gg` topologies |\n\n### TLA+ / TLC\n\n| Export | Description |\n|--------|-------------|\n| `parseTlaModule` / `renderTlaModule` | Parse and generate TLA+ module source |\n| `parseTlcConfig` / `serializeTlcConfig` | Parse and generate TLC configuration files |\n| `runTlaSandbox` | Run TLA+ in a WASM-friendly sandbox |\n| `checkerTraceToTlcText` / `checkerTraceToTlcJson` | Convert checker traces to TLC format |\n| `renderTlcArtifactPair` | Generate paired TLA+/TLC output files |\n\n### Lean\n\n| Export | Description |\n|--------|-------------|\n| `findLeanProjectRoot` | Locate the Lean project root from a path |\n| `inspectLeanProject` | Inspect Lean project structure and dependencies |\n| `runLeanSandbox` | Sandboxed Lean build and verification |\n\n### Temporal Formulas\n\n| Export | Description |\n|--------|-------------|\n| `parseTemporalFormula` / `renderTemporalFormula` | Parse and render temporal logic formulas |\n| `compileTemporalFormula` | Compile formulas into checker predicates |\n| `compileTemporalFormulaSet` | Compile a set of formulas |\n| `mergeCompiledTemporalFormulasIntoCheckerOptions` | Inject compiled formulas into checker options |\n\n### Boundary Learning\n\n| Export | Description |\n|--------|-------------|\n| `runBoundarySweep` | Sweep a parameter range to find invariant boundaries |\n| `runBoundaryLearningSuite` | Run a suite of boundary learning experiments |\n| `createInversionPair` | Create a pair of models that should invert a property |\n| `crossVerify` | Cross-verify multiple checker results |\n| `diagnoseVacuity` | Detect vacuously true invariants |\n\n### Artifact Generation\n\n| Export | Description |\n|--------|-------------|\n| `renderSuperpositionArtifactPair` | Generate superposition analysis artifacts |\n| `renderSelfVerificationArtifactPair` | Generate self-verification proof artifacts |\n\n## Development\n\n```bash\nbun run check       # typecheck + test\nbun run test        # vitest\nbun run build       # compile to dist/\n```\n\n## Related\n\n- [Gnosis](https://github.com/forkjoin-ai/gnosis) -- the GGL language and compiler\n- [Aeon](https://github.com/forkjoin-ai/aeon) -- transport protocol (TLA+ specs in companion-tests/formal/)\n- [aeon-pipelines](https://github.com/forkjoin-ai/aeon-pipelines) -- fork/race/fold execution engine\n\n## License\n\nCopyright Taylor William Buley. All rights reserved.\n\nMIT\n","readmeFilename":"README.md"}