V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
microxiaoxiao
V2EX  ›  程序员

有没有这种轻量级的逻辑表达式库(C/C++)?比如我输入 A>2 && B < 1 表达式; 然后设置 A =2,B=0, 判定表达式结果为 false。

  •  
  •   microxiaoxiao · Oct 11, 2022 · 2763 views
    This topic created in 1302 days ago, the information mentioned may be changed or developed.
    13 replies    2022-10-12 19:04:18 +08:00
    potatowish
        1
    potatowish  
       Oct 11, 2022 via iPhone
    aviator script 不错
    L4Linux
        2
    L4Linux  
       Oct 11, 2022 via Android
    SMT solver 了解一下。
    star9029
        3
    star9029  
       Oct 11, 2022
    直接 constexpr (
    microxiaoxiao
        4
    microxiaoxiao  
    OP
       Oct 11, 2022
    @star9029 这个应该不得行,参数要在运行过程中设置值。
    SakuraSa
        5
    SakuraSa  
       Oct 11, 2022
    感觉这种似乎可以?
    tt0411
        7
    tt0411  
       Oct 11, 2022
    内嵌个脚本引擎, 比如 lua
    Skybrim
        8
    Skybrim  
       Oct 11, 2022
    https://beltoforion.de/en/muparser/features.php
    这种吗?先设置公式,然后带入值
    pwrliang
        9
    pwrliang  
       Oct 12, 2022
    masterclock
        10
    masterclock  
       Oct 12, 2022   ❤️ 1
    PythonYXY
        11
    PythonYXY  
       Oct 12, 2022
    z3 可以的,smt 语法看一会就能掌握
    vone
        12
    vone  
       Oct 12, 2022 via iPhone
    内嵌 JavaScript 运行时就可以了,比如 QuickJS 。
    microxiaoxiao
        13
    microxiaoxiao  
    OP
       Oct 12, 2022
    @PythonYXY @pwrliang 感谢哟。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   816 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 19:18 · PVG 03:18 · LAX 12:18 · JFK 15:18
    ♥ Do have faith in what you're doing.