• 请不要在回答技术问题时复制粘贴 AI 生成的内容
microxiaoxiao
V2EX  ›  程序员

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

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