1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
15pub enum Status {
16 Complete,
17 InProgress,
18 Planned,
19}
20
21impl Status {
22 pub fn css_class(self) -> &'static str {
24 match self {
25 Status::Complete => "done",
26 Status::InProgress => "progress",
27 Status::Planned => "planned",
28 }
29 }
30
31 pub fn label(self) -> &'static str {
33 match self {
34 Status::Complete => "Complete",
35 Status::InProgress => "In Progress",
36 Status::Planned => "Planned",
37 }
38 }
39}
40
41#[derive(Clone, Copy, Debug, PartialEq, Eq)]
44pub enum Output {
45 Fol {
48 simple: &'static str,
49 unicode: &'static str,
50 },
51 Rust(&'static str),
53 Sva(&'static str),
55}
56
57#[derive(Clone, Copy, Debug, PartialEq, Eq)]
59pub struct Example {
60 pub label: &'static str,
61 pub english: &'static str,
62 pub output: Output,
63}
64
65#[derive(Clone, Copy, Debug, PartialEq, Eq)]
67pub struct Milestone {
68 pub title: &'static str,
69 pub status: Status,
70 pub description: &'static str,
71 pub features: &'static [&'static str],
72 pub examples: &'static [Example],
73}
74
75pub fn get_milestones() -> &'static [Milestone] {
77 MILESTONES
78}
79
80static MILESTONES: &[Milestone] = &[
81 Milestone {
82 title: "Core Transpiler",
83 status: Status::Complete,
84 description: "English to first-order logic. A two-stage lexer with morphology and lexicon lookup, a recursive-descent parser over an arena AST with Discourse Representation Structures, Montague-style lambda semantics, and a Neo-Davidsonian event-semantics transpiler. Quantifier scope, relative clauses, negation, and modality, rendered to a collapsed SimpleFOL or full Unicode with event variables.",
85 features: &[
86 "Two-stage lexer",
87 "Recursive-descent parser",
88 "DRS discourse tracking",
89 "Lambda semantics",
90 "Quantifier scope",
91 "Event semantics",
92 "Unicode / ASCII / LaTeX",
93 ],
94 examples: &[
95 Example {
96 label: "Universal",
97 english: "Every user who has a key enters the room.",
98 output: Output::Fol {
99 simple: "∀x(((User(x) ∧ ∃y((Key(y) ∧ Have(x, y)))) → Enter(x, Room)))",
100 unicode: "∀x(((User(x) ∧ ∃y((Key(y) ∧ ∃e(Have(e) ∧ Agent(e, x) ∧ Theme(e, y))))) → ∃e(Enter(e) ∧ Agent(e, x) ∧ Theme(e, Room))))",
101 },
102 },
103 Example {
104 label: "Scope",
105 english: "Every student read a book.",
106 output: Output::Fol {
107 simple: "∀x((Student(x) → ∃y((Book(y) ∧ Read(x, y)))))",
108 unicode: "∀x((Student(x) → ∃y((Book(y) ∧ ∃e(Read(e) ∧ Agent(e, x) ∧ Theme(e, y))))))",
109 },
110 },
111 Example {
112 label: "Negation",
113 english: "No user who lacks a key can enter the room.",
114 output: Output::Fol {
115 simple: "∀x(((User(x) ∧ ∃y((Key(y) ∧ ¬Have(x, y)))) → ¬Enter(x, Room)))",
116 unicode: "∀x(((User(x) ∧ ∃y((Key(y) ∧ ¬∃e(Have(e) ∧ Agent(e, x) ∧ Theme(e, y))))) → ¬◇_{0.5} ∃e(Enter(e) ∧ Agent(e, x) ∧ Theme(e, Room))))",
117 },
118 },
119 ],
120 },
121 Milestone {
122 title: "Web Platform & Studio",
123 status: Status::Complete,
124 description: "A Dioxus/WASM front end with prerendered pages. The Studio is a browser IDE: every mode edits in one code editor, with the language server running in the page — VS Code-style hovers, problems underlined as you type, keywords coloured the way the lexer reads them — and a debugger that steps a program forward and back through time. The Syntax Guide's examples are live editors too, and Learn is a structured curriculum of lessons, exercises and tests.",
125 features: &[
126 "Dioxus WASM",
127 "Prerendered pages",
128 "Studio IDE",
129 "In-browser language server",
130 "Time-travel debugger",
131 "Live Syntax Guide",
132 "Learn curriculum",
133 ],
134 examples: &[],
135 },
136 Milestone {
137 title: "Imperative Language",
138 status: Status::Complete,
139 description: "LOGOS as a general-purpose language: functions, structs, enums, pattern matching, a standard library, and I/O, parsed in the imperative mode of the same front end. Codegen emits Rust source plus C, Python, and TypeScript FFI bindings.",
140 features: &[
141 "Functions",
142 "Structs & enums",
143 "Pattern matching",
144 "Standard library",
145 "C / Python / TS FFI",
146 ],
147 examples: &[
148 Example {
149 label: "Function",
150 english: "## To greet (name: Text) -> Text:\n Return \"Hello, \" combined with name.",
151 output: Output::Rust("#[inline]\nfn greet(name: String) -> String {\n return format!(\"{}{}\", \"Hello, \", name);\n}"),
152 },
153 Example {
154 label: "Struct",
155 english: "## A Point has:\n An x: Int.\n A y: Int.",
156 output: Output::Rust("#[derive(Default, Debug, Clone, PartialEq)]\npub struct Point {\n pub x: i64,\n pub y: i64,\n}"),
157 },
158 Example {
159 label: "Enum",
160 english: "## A Color is one of:\n A Red.\n A Green.\n A Blue.",
161 output: Output::Rust("#[derive(Debug, Clone, PartialEq)]\npub enum Color {\n Red,\n Green,\n Blue,\n}"),
162 },
163 ],
164 },
165 Milestone {
166 title: "Type System",
167 status: Status::Complete,
168 description: "Refinement types, generics, sum types, and type inference, with constraints expressed in English. Escape, ownership, and liveness analysis run ahead of codegen and reject use-after-move.",
169 features: &[
170 "Refinement types",
171 "Generics",
172 "Sum types",
173 "Type inference",
174 "Ownership & escape analysis",
175 ],
176 examples: &[
177 Example {
178 label: "Refinement",
179 english: "## Main\nLet age: Int where it > 0 be 25.\nShow age.",
180 output: Output::Rust("let age: i64 = 25;\ndebug_assert!(age > 0);\nshow(&age);"),
181 },
182 Example {
183 label: "Generic",
184 english: "## A Box of [T] has:\n A value, which is T.",
185 output: Output::Rust("#[derive(Default, Debug, Clone, PartialEq)]\npub struct Box<T> {\n pub value: T,\n}"),
186 },
187 ],
188 },
189 Milestone {
190 title: "Concurrency & Actors",
191 status: Status::Complete,
192 description: "Channels, agents, structured parallelism, and select with timeout, lowering to async/await. Go-style concurrency written in English.",
193 features: &[
194 "Channels",
195 "Agents",
196 "Structured parallelism",
197 "Select with timeout",
198 "async / await",
199 ],
200 examples: &[
201 Example {
202 label: "Spawn a task",
203 english: "## To worker:\n Show \"worker done\".\n\n## Main\n Launch a task to worker.\n Show \"main continues\".",
204 output: Output::Rust("#[tokio::main]\nasync fn main() {\n tokio::spawn(async move { worker(); });\n show(&String::from(\"main continues\"));\n}"),
205 },
206 ],
207 },
208 Milestone {
209 title: "Distributed Systems",
210 status: Status::Complete,
211 description: "CRDTs, P2P gossip, and persistent storage for local-first applications with automatic conflict resolution.",
212 features: &[
213 "CRDTs",
214 "P2P gossip",
215 "Persistence",
216 "Convergent counters",
217 "Automatic merge",
218 ],
219 examples: &[
220 Example {
221 label: "CRDT counter",
222 english: "## Definition\nA Counter is Shared and has:\n points: ConvergentCount.\n\n## Main\nLet mutable c be a new Counter.\nIncrease c's points by 10.\nShow c's points.",
223 output: Output::Rust("pub struct Counter {\n pub points: GCounter,\n}\n\nimpl Merge for Counter {\n fn merge(&mut self, other: &Self) {\n self.points.merge(&other.points);\n }\n}"),
224 },
225 ],
226 },
227 Milestone {
228 title: "Security & Policies",
229 status: Status::Complete,
230 description: "Capability-based security with policy blocks and check guards: who can do what, stated in English and lowered to predicate checks.",
231 features: &[
232 "Policy blocks",
233 "Capabilities",
234 "Check guards",
235 "Predicates",
236 ],
237 examples: &[
238 Example {
239 label: "Policy",
240 english: "## Definition\nA User has:\n a role, which is Text.\n\n## Policy\nA User is admin if the user's role equals \"admin\".\n\n## Main\nLet u be a new User with role \"admin\".\nCheck that the u is admin.\nShow \"passed\".",
241 output: Output::Rust("impl User {\n pub fn is_admin(&self) -> bool {\n self.role == \"admin\"\n }\n}\n\n// at the check site:\nif !u.is_admin() {\n panic_with(\"Security Check Failed: u is admin\");\n}"),
242 },
243 ],
244 },
245 Milestone {
246 title: "Proof Assistant",
247 status: Status::Complete,
248 description: "A Calculus of Inductive Constructions kernel as the trusted core: a bidirectional type checker over which propositions are types and proofs are terms. A backward-chaining search engine proposes derivations; the kernel re-checks every one. Certificate-producing arithmetic, a finite-domain grid solver, and a CDCL SAT core with an independent RUP checker sit outside the trusted base; an optional Z3 oracle never bypasses kernel certification.",
249 features: &[
250 "CIC kernel",
251 "Backward-chaining search",
252 "Kernel-certified proofs",
253 "Certificate-producing arithmetic",
254 "CDCL + RUP",
255 "Grid solver",
256 "Z3 oracle (optional)",
257 ],
258 examples: &[
259 Example {
260 label: "Termination",
261 english: "## Main\nLet x be 10.\nWhile x > 0 (decreasing x):\n Set x to x - 1.",
262 output: Output::Rust("// `decreasing x` proves the metric falls each iteration\nlet mut x = 10;\nwhile x > 0 {\n x = x - 1;\n}"),
263 },
264 Example {
265 label: "Trust",
266 english: "## Main\nLet x be 10.\nTrust that x is greater than 0 because \"I set it to 10\".",
267 output: Output::Rust("let x = 10;\n// TRUST: I set it to 10\ndebug_assert!(x > 0);"),
268 },
269 ],
270 },
271 Milestone {
272 title: "Native Compilation Tier",
273 status: Status::Complete,
274 description: "Three execution tiers below the front end: generated Rust source, a register-bytecode VM with optimizer (oracle facts, GVN, LICM, DCE, scalarization, loop-split), and a native AOT/JIT path. The VM profiles hot integer/float regions and recursive functions and tiers them down through a copy-and-patch JIT — stencils stamped out by memcpy and patched at relocations — to EXODIA, a contiguous register-allocating x86-64 backend. Anything outside the supported subset declines and stays on bytecode (the deopt contract). The benchmark suite measures the codegen path against ten languages with hyperfine; runtime parity with V8/Node, and head-to-head comparison against C. Beyond Rust, the same bytecode lowers straight to WebAssembly, C, RISC-V and NVIDIA GPUs through CUDA, each backend held to the VM's behaviour by its own lock.",
275 features: &[
276 "Bytecode VM",
277 "Optimizer (GVN / LICM / DCE)",
278 "Copy-and-patch JIT",
279 "EXODIA register-allocating x86-64",
280 "Auto-memoization",
281 "WebAssembly / C / RISC-V / CUDA",
282 "SIMD reductions",
283 "IR peephole",
284 "10-language benchmarks",
285 "V8 / Node parity",
286 ],
287 examples: &[
288 Example {
289 label: "Hot loop",
290 english: "## Main\nLet total be 0.\nRepeat for i from 1 to 100:\n Set total to total + i.\nShow total.",
291 output: Output::Rust("let mut total = 0;\nfor i in 1..=100 {\n total = total + i;\n}\nshow(&total);"),
292 },
293 Example {
294 label: "Recursion",
295 english: "## To fib (n: Int) -> Int:\n If n is less than 2:\n Return n.\n Return fib(n - 1) + fib(n - 2).\n\n## Main\nShow fib(35).",
296 output: Output::Rust("fn fib(n: i64) -> i64 {\n // pure recursion → auto-memoized\n if n < 2 {\n return n;\n }\n fib(n - 1) + fib(n - 2)\n}"),
297 },
298 ],
299 },
300 Milestone {
301 title: "Hardware Verification",
302 status: Status::Complete,
303 description: "SystemVerilog Assertions synthesized from English specifications, with IEEE 1800-2017 and 1800-2023 coverage: property connectives, LTL temporal operators, sequence composition, abort operators, and real-valued checker variables. The model-checking engine runs bounded model checking, IC3/PDR, k-induction, Craig interpolation, and predicate-abstraction CEGAR over Z3's bitvector theory, with vacuity analysis, assume-guarantee composition, and SMT-LIB2 export.",
304 features: &[
305 "English → SVA",
306 "IEEE 1800-2017 / 1800-2023",
307 "Bounded model checking",
308 "IC3 / PDR",
309 "K-induction",
310 "Craig interpolation",
311 "Bitvector theory",
312 ],
313 examples: &[
314 Example {
315 label: "Liveness",
316 english: "Always, if req holds, then eventually ack holds.",
317 output: Output::Sva("assert property (@(posedge clk) Hold_req_ |-> s_eventually(Hold_ack_));"),
318 },
319 ],
320 },
321 Milestone {
322 title: "Full-Stack Web",
323 status: Status::Complete,
324 description: "Websites written in LOGOS, end to end. Typed routes answer on the server and components with reactive signals render in the browser; sessions, CSRF protection, static files, JSON and a PostgreSQL client written in LOGOS come in the standard library. largo build --static makes a folder for any static host, or the project builds into one server binary that shuts down gracefully, answers health checks, times out slow requests and sheds load, all set by environment variables.",
325 features: &[
326 "Typed routes",
327 "Components & signals",
328 "Sessions & CSRF",
329 "PostgreSQL client",
330 "Static export",
331 "Production lifecycle",
332 "Four example sites",
333 ],
334 examples: &[
335 Example {
336 label: "Typed route",
337 english: "## Route GET /posts/:id (id: Int) -> Text:\n Return \"post {id}\".\n\n## Main\n\nShow route(\"GET\", \"/posts/7\").",
338 output: Output::Rust("#[inline]\nfn __route_GET__posts__id(id: i64) -> String {\n return format!(\"post {}\", logicaffeine_system::io::show_string(&(id)));\n}\n\n// the router answers 400 unless the :id slot holds an Int,\n// 405 for another method on the path, 404 for any other path"),
339 },
340 ],
341 },
342 Milestone {
343 title: "Translation Validation",
344 status: Status::InProgress,
345 description: "Proving the compiler's output matches its input. The logicaffeine-tv crate symbolically executes the LOGOS source into the shared verification domain and discharges equivalence with Z3 (rung 3–4: the trust boundary is the encoder, Z3, and rustc). The source-side executor and its meta-soundness oracle — cross-validating the encoder against the tree-walking interpreter — are in place, and cover deterministic concurrency too: channels and spawned tasks, and Select checked by seeded replay. The Rust-emitter-side executor that closes full source-to-Rust equivalence is the remaining work.",
346 features: &[
347 "Symbolic execution",
348 "Z3 equivalence",
349 "Encoder soundness oracle",
350 "Concurrency (seeded replay)",
351 "Out-of-fragment exclusion",
352 ],
353 examples: &[],
354 },
355 Milestone {
356 title: "Silicon",
357 status: Status::InProgress,
358 description: "The LOGOS chip. The first pieces exist: the compiler prints any program in the Silicon ISA, a soft core executes the whole ISA on a Nexys A7 FPGA with every Show compared against the VM, and a whole-program dataflow engine runs the core algorithms of every benchmark identically to the VM on its model. Hardened sky130 blocks close signoff at every corner, and two Caravel user projects, the certified DRAM command player and the whole-program engine, pass all 19 of the foundry's MPW precheck checks. The goal is a full-custom SoC where the register-VM ops are the native ISA, the copy-and-patch stencils become hardwired functional units, and the Futamura specializer configures a spatial dataflow fabric, so the compiled program is the circuit. Memory is scheduled onto scratchpads instead of guessed by a speculative cache, the crypto and codec kernels already written in LOGOS (Keccak-f[1600], the ML-KEM and ML-DSA NTTs, group-varint) get dedicated accelerators, and energy goes only to the computation that runs, toward the Landauer limit and, with reversible logic, past it. The chip is designed and checked in LOGOS itself: the same substrate emits SVA, extracts Verilog and proves BitVec(n) properties across every bus width.",
359 features: &[
360 "Program → circuit",
361 "Three-way equivalence checking",
362 "Signoff-clean Sky130 layout",
363 "LOGOS-ISA cores",
364 "Stencils → functional units",
365 "Futamura dataflow fabric",
366 "No cache hierarchy",
367 "PQC accelerators",
368 ],
369 examples: &[],
370 },
371 Milestone {
372 title: "Quantum Backend",
373 status: Status::Planned,
374 description: "A Cirq backend on the path that already takes an English specification to SystemVerilog Assertions, taking it to quantum circuits instead: the same FOL-to-target synthesis, a different target.",
375 features: &[
376 "Cirq v2",
377 "Circuit synthesis",
378 "FOL-to-quantum",
379 ],
380 examples: &[],
381 },
382];
383
384#[cfg(test)]
385#[path = "../../../../../crates/logicaffeine_tests/unit/logicaffeine_web/ui/pages/roadmap_data/tests.rs"]
386mod tests;