From 2d1ce4bf1333b4eded92ee7159aae4169f2aab62 Mon Sep 17 00:00:00 2001 From: Marcell Vazquez-Chanlatte Date: Wed, 4 Jan 2017 13:33:22 -0800 Subject: [PATCH] added until utility function --- stl/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/stl/utils.py b/stl/utils.py index d5e9365..a5ccb31 100644 --- a/stl/utils.py +++ b/stl/utils.py @@ -131,14 +131,16 @@ def from_mtl(phi:MTL, ap_map:Dict[AtomicPred, LinEq]) -> STL: return focus.modify(ap_map.get) +# EDSL + def alw(phi, *, lo, hi): return G(Interval(lo, hi), phi) def env(phi, *, lo, hi): return F(Interval(lo, hi), phi) -def until(phi, *, lo, hi): - raise NotImplementedError +def until(phi1, phi2, *, lo, hi): + return stl.ast.Until(Interval(lo, hi), phi1, phi2) def andf(*args): return reduce(op.and_, args, stl.And(tuple()))