Spot 安装和使用

安装

./configure
make
make install

命令行执行时常见错误

ltl2tgba: error while loading shared libraries: libspot.so.0: cannot open shared object file: No such file or directory

原因
在程序加载期间找不到动态链接库libspot.so(libspot.so.0)

the_sam@sam-PC:/etc$ echo $LD_LIBRARY_PATH
:/home/the_sam/z3/build  

可见,LD_LIBRARY_PATH中确实没有libspot.so

解决
添加libspot.so 的路径到LD_LIBRARY_PATH
libspot.so的路径可通过命令:whereis libspot.so得到

相关知识
PATH可执行文件路径
LIBRARY_PATH是程序编译期间查找动态链接库时指定除了系统默认路径之外的其他路径
LD_LIBRARY_PATH是程序加载运行期间查找动态链接库时指定除了系统默认路径之外的其他路径

[1] Linux中PATH、 LIBRARY_PATH、LD_LIBRARY_PATH的区别
[2] Linux error while loading shared libraries: cannot open shared object file: No such file or directory
[3] linux关于bashrc与profile的区别

ltl2ba

例子Ga

buchi自动机


dot格式

the_sam@sam-PC:/etc$ ltl2tgba 'Ga' -d
digraph "Ga" {
  rankdir=LR
  label="
[Büchi]"
  labelloc="t"
  node [shape="circle"]
  I [label="", style=invis, width=0]
  I -> 0
  0 [label="0", peripheries=2]
  0 -> 0 [label="a"]
}

HOA格式

the_sam@sam-PC:/etc$ ltl2tgba 'Ga' -H
HOA: v1
name: "Ga"
States: 1
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc colored
properties: deterministic stutter-invariant very-weak
--BODY--
State: 0 {0}
[0] 0
--END--
原文地址:https://www.cnblogs.com/TianchiLiu/p/10156290.html