<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Elon landau</title>
    <description>The latest articles on DEV Community by Elon landau (@reirilain).</description>
    <link>https://dev.to/reirilain</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4073183%2F9c23ff16-5be2-4be1-8b97-57c9e6984ee1.jpg</url>
      <title>DEV Community: Elon landau</title>
      <link>https://dev.to/reirilain</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/reirilain"/>
    <language>en</language>
    <item>
      <title>Generated Verified, Valid Faithful: Why I’m Building Protocol 17</title>
      <dc:creator>Elon landau</dc:creator>
      <pubDate>Tue, 11 Aug 2026 13:23:03 +0000</pubDate>
      <link>https://dev.to/reirilain/generated-verified-valid-faithful-why-im-building-protocol-17-22m0</link>
      <guid>https://dev.to/reirilain/generated-verified-valid-faithful-why-im-building-protocol-17-22m0</guid>
      <description>&lt;p&gt;Protocol 17&lt;/p&gt;

&lt;p&gt;I’ve been building an experimental open-source project called Protocol 17.&lt;/p&gt;

&lt;p&gt;It started from a simple frustration I had with AI-assisted coding:&lt;/p&gt;

&lt;p&gt;If I explicitly write something, why should the model be allowed to silently rewrite it?&lt;/p&gt;

&lt;p&gt;A loop boundary, a variable name, an intermediate operation, or a piece of data flow may look like an implementation detail to an LLM — but it may be something the programmer deliberately chose.&lt;/p&gt;

&lt;p&gt;So Protocol 17 is based on one rule:&lt;/p&gt;

&lt;p&gt;What the programmer explicitly writes is a constraint.&lt;br&gt;
What they leave unspecified is implementation freedom for the AI.&lt;/p&gt;

&lt;p&gt;Or, more simply:&lt;/p&gt;

&lt;p&gt;AI can fill the blanks. It cannot take the pen.&lt;/p&gt;

&lt;p&gt;What does P17 look like?&lt;/p&gt;

&lt;p&gt;A Protocol 17 source file can mix natural language, mathematical notation, familiar programming syntax, and native code.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;int a,b&lt;br&gt;
input(a,b)&lt;br&gt;
输出(a+b)&lt;/p&gt;

&lt;p&gt;The model may translate this into C:&lt;/p&gt;

&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;p&gt;int main(void) {&lt;br&gt;
    int a, b;&lt;br&gt;
    scanf("%d %d", &amp;amp;a, &amp;amp;b);&lt;br&gt;
    printf("%d\n", a + b);&lt;br&gt;
    return 0;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Or Python:&lt;/p&gt;

&lt;p&gt;a = int(input())&lt;br&gt;
b = int(input())&lt;br&gt;
print(a + b)&lt;/p&gt;

&lt;p&gt;The programmer specified the variables, input, operation, and output.&lt;/p&gt;

&lt;p&gt;The model fills in the target-language implementation.&lt;/p&gt;

&lt;p&gt;Generated ≠ Verified&lt;/p&gt;

&lt;p&gt;While testing Protocol 17 with a local Qwen 4B model, I got Rust code similar to this:&lt;/p&gt;

&lt;p&gt;let mut n: i32 = 0;&lt;br&gt;
std::io::stdin().read_line(&amp;amp;mut n).unwrap();&lt;br&gt;
n = n.trim().parse::().unwrap();&lt;/p&gt;

&lt;p&gt;It looks plausible at first glance.&lt;/p&gt;

&lt;p&gt;But it is invalid Rust.&lt;/p&gt;

&lt;p&gt;read_line expects a mutable String, not an i32, and .trim() is not defined on an integer.&lt;/p&gt;

&lt;p&gt;That led me to separate generation from verification:&lt;/p&gt;

&lt;p&gt;P17 source&lt;br&gt;
    ↓&lt;br&gt;
user-selected model&lt;br&gt;
    ↓&lt;br&gt;
generated target code&lt;br&gt;
    ↓&lt;br&gt;
gcc / rustc / Python compile()&lt;br&gt;
    ↓&lt;br&gt;
PASS / FAILED&lt;/p&gt;

&lt;p&gt;Protocol 17 currently performs deterministic target verification:&lt;/p&gt;

&lt;p&gt;C17     → gcc -std=c17 -fsyntax-only&lt;br&gt;
Python  → compile(..., "exec")&lt;br&gt;
Rust    → rustc --emit=metadata&lt;/p&gt;

&lt;p&gt;The important idea is:&lt;/p&gt;

&lt;p&gt;A model returning code does not mean the code has been verified.&lt;/p&gt;

&lt;p&gt;But compilation only catches the easy problem&lt;/p&gt;

&lt;p&gt;The more interesting problem appeared next.&lt;/p&gt;

&lt;p&gt;Suppose the P17 source contains:&lt;/p&gt;

&lt;p&gt;for i in 1..n&lt;/p&gt;

&lt;p&gt;If .. uses borrowed Rust semantics, the upper bound is excluded.&lt;/p&gt;

&lt;p&gt;But a model might translate it into:&lt;/p&gt;

&lt;p&gt;for i in 1..=n&lt;/p&gt;

&lt;p&gt;That code is perfectly valid Rust.&lt;/p&gt;

&lt;p&gt;rustc happily accepts it.&lt;/p&gt;

&lt;p&gt;But the model changed something the programmer explicitly wrote.&lt;/p&gt;

&lt;p&gt;So:&lt;/p&gt;

&lt;p&gt;Valid ≠ faithful.&lt;/p&gt;

&lt;p&gt;Another example:&lt;/p&gt;

&lt;p&gt;s[i] = p;&lt;br&gt;
cnt[s[i]]++;&lt;/p&gt;

&lt;p&gt;A model may notice that s[i] currently equals p and rewrite it as:&lt;/p&gt;

&lt;p&gt;s[i] = p;&lt;br&gt;
cnt[p]++;&lt;/p&gt;

&lt;p&gt;The result may be equivalent in that particular context.&lt;/p&gt;

&lt;p&gt;But it bypasses an explicit intermediate read chosen by the programmer.&lt;/p&gt;

&lt;p&gt;Protocol 17 currently treats that as a fidelity violation.&lt;/p&gt;

&lt;p&gt;Two different verification problems&lt;/p&gt;

&lt;p&gt;I’m therefore thinking about two layers:&lt;/p&gt;

&lt;p&gt;Target verification&lt;/p&gt;

&lt;p&gt;Is the generated target program legal?&lt;/p&gt;

&lt;p&gt;This already exists.&lt;/p&gt;

&lt;p&gt;Fidelity verification&lt;/p&gt;

&lt;p&gt;Did the generated program preserve the programmer’s explicit constraints?&lt;/p&gt;

&lt;p&gt;This does not exist deterministically yet.&lt;/p&gt;

&lt;p&gt;And I think the second problem is much more interesting.&lt;/p&gt;

&lt;p&gt;Bring Your Own Model&lt;/p&gt;

&lt;p&gt;Protocol 17 is not tied to one AI provider.&lt;/p&gt;

&lt;p&gt;The current alpha supports a provider layer for OpenAI-compatible APIs, Anthropic, Gemini, and local OpenAI-compatible servers such as Ollama.&lt;/p&gt;

&lt;p&gt;So the architecture is roughly:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;            Protocol 17
                 │
          Provider adapter
                 │
   ┌─────────────┼─────────────┐
   ↓             ↓             ↓
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;OpenAI-compatible  Anthropic     Gemini&lt;br&gt;
       │&lt;br&gt;
       └── local Ollama / other compatible models&lt;/p&gt;

&lt;p&gt;The model is replaceable.&lt;/p&gt;

&lt;p&gt;The protocol and verification layers are the part I want to keep stable.&lt;/p&gt;

&lt;p&gt;Current state&lt;/p&gt;

&lt;p&gt;Protocol 17 is still an experimental alpha.&lt;/p&gt;

&lt;p&gt;Right now it has C17, Python, and Rust translation; deterministic target verification; a VS Code prototype; reverse code explanation; BYOK/BYOM support; and local-model support.&lt;/p&gt;

&lt;p&gt;There is no formal parser, AST, or IR yet, and deterministic fidelity verification is still an open problem.&lt;/p&gt;

&lt;p&gt;I’m deliberately building small pieces first rather than pretending the protocol is already formally defined.&lt;/p&gt;

&lt;p&gt;The next major milestone is figuring out how much of fidelity verification can be made deterministic without turning P17 into another rigid programming language.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/epsilon-lain/Protocol-17" rel="noopener noreferrer"&gt;https://github.com/epsilon-lain/Protocol-17&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’d be very interested in criticism, related work, or ideas about the distinction between validity and fidelity in AI-generated code.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>opensource</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
