展示HN:为什么系统建模应该像代码,而不是PowerPoint

1作者: twopowerX26 天前原帖
系统工程师使用无法进行有效差异比较/合并/版本控制的工具来建模价值数十亿美元的航天器、救生医疗设备和自主车辆,即使在大型昂贵的基础设施下也是如此。<p>我创建了Sylang来解决这个问题。<p>什么是Sylang?<p>一种基于文本的复杂系统建模语言。编写声明式代码,自动生成可视化图表、可追溯性矩阵、FMEA分析和合规报告。与Git、VSCode和AI代码助手兼容。<p>示例:<p><pre><code> def requirement BrakeActivation description "系统应在100毫秒内激活刹车" safetylevel ASIL-D testedby ref testcase EmergencyBrakeTest derivedfrom ref safetygoal PreventCollision allocatedto ref block BrakeController </code></pre> 这将生成:<p>- 架构图(分解图、内部块图) - 可追溯性矩阵(需求 ↔ 测试 ↔ 块 ↔ 安全目标) - 覆盖分析(哪些需求缺少测试?) - 合规报告(功能安全、ASPICE等)<p>为什么基于文本的建模有效:<p>您的AI代码助手(Cursor、GitHub Copilot、Claude、Gemini)可以: - 从安全目标生成需求 - 从需求创建测试用例 - 从架构起草FMEA分析 - 在文件间进行语义理解的重构 - 建议缺失的关系<p>有效的Git工作流程:<p><pre><code> git diff requirements.req # 查看更改内容 git merge feature/new-sensors # 合并架构分支 git blame safety-goals.sgl # 谁定义了这个安全目标? </code></pre> 没有XMI。没有数据库导出。没有PowerPoint。只有可读的文本,生成您所需的一切。<p>您将获得:<p>覆盖整个工程生命周期的23种文件类型: - 产品线和变体 (.ple, .fml, .vml) - 架构 (.blk, .fun, .ifc) - 需求和测试 (.req, .tst) - 行为模型 (.ucd, .seq, .smd) - 安全分析 (.haz, .sgl, .sam, .flr, .fta) - 仪表板和规格 (.dash, .spec) - 自动化 (.agt, .spr)<p>所有自动生成的可视化图表:特征模型、分解图、时序图、状态机、可追溯性矩阵。<p>当前状态:<p>- 语言稳定(v0.9.27) - 可用VSCode扩展(在扩展中搜索“Sylang”) - 与Cursor、GitHub Copilot、Claude、Gemini代码助手兼容 - 图表渲染、可追溯性、覆盖分析正常工作 - 独立开发,兼职,公开构建<p>下载地址:<p><a href="https://marketplace.visualstudio.com/items?itemName=balaji-embedcentrum.sylang" rel="nofollow">https://marketplace.visualstudio.com/items?itemName=balaji-e...</a><p>网站: <a href="https://sylang.dev" rel="nofollow">https://sylang.dev</a><p>GitHub: <a href="https://github.com/balaji-embedcentrum/sylang" rel="nofollow">https://github.com/balaji-embedcentrum/sylang</a><p>欢迎反馈——特别是来自希望他们的建模工具更像代码编辑器的工程师们。
查看原文
Systems engineers model billion-dollar spacecraft, life-saving medical devices, and autonomous vehicles in tools that can&#x27;t even do a proper diff&#x2F;merge&#x2F;version control even with large expensive infrastructure.<p>I built Sylang to address that.<p>What is Sylang?<p>A text-based language for modeling complex systems. Write declarative code, get visual diagrams, traceability matrices, FMEA analyses, and compliance reports automatically. Works with Git, VSCode, and AI code assistants.<p>Example:<p><pre><code> def requirement BrakeActivation description &quot;System shall activate brakes within 100ms&quot; safetylevel ASIL-D testedby ref testcase EmergencyBrakeTest derivedfrom ref safetygoal PreventCollision allocatedto ref block BrakeController </code></pre> This generates:<p>- Architecture diagrams (decomposition, internal block diagrams) - Traceability matrix (requirement ↔ test ↔ block ↔ safety goal) - Coverage analysis (which requirements lack tests?) - Compliance reports (functional safety, ASPICE, etc.)<p>Why text-based modeling works:<p>Your AI code assistant (Cursor, GitHub Copilot, Claude, Gemini) can: - Generate requirements from safety goals - Create test cases from requirements - Draft FMEA analyses from architecture - Refactor across files with semantic understanding - Suggest missing relationships<p>Git workflows that actually work:<p><pre><code> git diff requirements.req # See what changed git merge feature&#x2F;new-sensors # Merge architecture branches git blame safety-goals.sgl # Who defined this safety goal? </code></pre> No XMI. No database exports. No PowerPoint. Just readable text that generates everything you need.<p>What you get:<p>23 file types covering the full engineering lifecycle: - Product lines &amp; variants (.ple, .fml, .vml) - Architecture (.blk, .fun, .ifc) - Requirements &amp; tests (.req, .tst) - Behavioral models (.ucd, .seq, .smd) - Safety analysis (.haz, .sgl, .sam, .flr, .fta) - Dashboards &amp; specs (.dash, .spec) - Automation (.agt, .spr)<p>All auto-generating visual diagrams: feature models, decomposition diagrams, sequence diagrams, state machines, traceability matrices.<p>Current state:<p>- Language stable (v0.9.27) - VSCode extension available (search &quot;Sylang&quot; in Extensions) - Works with Cursor, GitHub Copilot, Claude, Gemini code assistants - Diagram rendering, traceability, coverage analysis working - Solo dev, part-time, building in public<p>Download at:<p><a href="https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=balaji-embedcentrum.sylang" rel="nofollow">https:&#x2F;&#x2F;marketplace.visualstudio.com&#x2F;items?itemName=balaji-e...</a><p>Website: <a href="https:&#x2F;&#x2F;sylang.dev" rel="nofollow">https:&#x2F;&#x2F;sylang.dev</a><p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;balaji-embedcentrum&#x2F;sylang" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;balaji-embedcentrum&#x2F;sylang</a><p>Feedback welcome—especially from engineers who&#x27;ve wished their modeling tools worked more like their code editors.