anand-bala / signal-temporal-logic

A library for efficiently working with Signal Temporal Logic (STL) and its quantitative semantics. Has Python bindings!
MIT License
37 stars 6 forks source link

timed temporal operators #2

Open yuanzhou-yzhou opened 3 years ago

yuanzhou-yzhou commented 3 years ago

Does the project support timed temporal operators, such as Eventually0, 3, where a = stl.Predicate("a") > 0 ? Thanks!

anand-bala commented 3 years ago

Hey @yuanzhou-yzhou, I think it should (but I haven't tested the python binding for the interval argument yet). You would essentially do

phi = stl.Eventually(a, (0,3))

Where (0,3) is a closed interval.

Let me know if this works 😄 .

P.S. I am currently working on a 0.2.0 version of the library with better internals and bindings, so I will try to make the support a little better there.

yuanzhou-yzhou commented 3 years ago

Hi @anand-bala, thank you for your reply. I tried it, but unfortunately, the program is crashed with the error "Segmentation fault (core dumped)".

anand-bala commented 3 years ago

Ah. I had an inkling this would happen. I've been a little busy lately, but I will try pushing a patch within a few days.