生成(p)as t(t)ense(l)inear(t)emporal(l)ogic监视器作为aiger电路的库。
py-aiger-ptltl的Python项目详细描述
PY AIGER过去LTL
生成(p)ast(t)ense(l)inear(t)emporal(l)ogic的库 作为aiger电路的监视器。建立在py-aiger项目的基础上。
目录
安装
如果您只需要使用aiger_ptltl
,您可以运行:
$ pip install py-aiger-ptltl
对于开发人员,请注意此项目使用 poetrypython包/依赖项 管理工具。请熟悉它,然后 运行:
$ poetry install
用法
使用aiger_ptltl
的主要入口点是PTLTLExpr
。
类,它是aiger.BoolExpr
的简单扩展,以支持
时间运算符,历史上,过去(一次),(变化)昨天,
从那以后。
importaiger_ptltlasptltl# Atomic Propositionsx=ptltl.atom('x')y=ptltl.atom('y')z=ptltl.atom('z')# Propositional logicexpr1=~xexpr2=x&(y|z)expr3=(x&y)|~zexpr4=~(x&y&z)# Temporal Logicexpr5=x.historically()# (H x) ≡ x has held for all previous cycles (inclusive).expr6=x.once()# (P x) ≡ x once held in a past cycle (inclusive).expr7=x.vyest()# (Z x) ≡ x held in the previous cycle (true at time = 0).expr8=x.since(y)# [x S y] ≡ x has held since the cycle after y last held.# Compositionexpr9=expr7.since(expr8.vyest().vyest())