GithubHelp home page GithubHelp logo

doganulus / reelay Goto Github PK

View Code? Open in Web Editor NEW
32.0 3.0 5.0 3.06 MB

A header-only C++ library for system-level verification and declarative testing of real-time systems with Python bindings.

Home Page: https://doganulus.github.io/reelay/

License: Mozilla Public License 2.0

C++ 95.11% Makefile 0.08% Dockerfile 0.47% Python 3.01% Shell 0.17% CMake 1.16%
runtime-verification temporal-logic assertion-library cyber-physical-systems stream-processing header-only formal-methods system-verification verification

reelay's Introduction

Reelay Monitors

Tests Python Docs Coverage Codacy Badge

Reelay is a header-only C++ library and set of tools for system-level verification and testing of real-time systems. Reelay implements state-of-the-art runtime verification techniques to construct runtime monitors that check temporal behaviors of the system against system-level requirements. Hence, Reelay can be used to enhance rigorous systems engineering practices by formalizing and automating the assessment phase.

Main Features

  • Formal specification of temporal properties
  • Provably correct monitor construction from the specification
  • Fast and frugal runtime requirement checking (very low overhead)
  • Simple but non-restrictive user interface
  • Available for C++ and Python

Rye Format

Reelay reads executable specifications written in plain text and verifies that the system does what those specifications say at runtime. In order to construct runtime monitors automatically, those specifications must follow some basic syntax rules, called Reelay Expression (Rye) format. See the reference for the Rye format for more details.

Get Started

The next steps for you are to install Reelay from source and follow through the tutorial to learn how to use Reelay monitors from C++ and Python. Check out the documentation for more details.

Contribute

Currently Reelay does not have a contribution guideline. However, we always welcome bug reports, enhancements, and comments regarding the project. Please use the Issues page if you have a bug report, enhancement, or comment.

Cite

If you are using Reelay in an academic work, please cite

where the main technique has been explained throughtly. Further bits of techniques and motivations can be traced in the following papers.

Please also look at the performance notes if you compare the performance between tools.

reelay's People

Contributors

doganulus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

reelay's Issues

Monitor formula to compare two data values

Hi,
I have a time serie that contains two data, let's say 'x' and 'y'. I want to create a monitor that compares these two data. However, it seems that data comparison is not supported.
I tried the following formulas, each time raising a "syntex error" when creating the (discrete) monitor:

  1. "{x > y}"
  2. "{y: *ref, x > *ref}"
  3. "exists[ref]. ({y: *ref, x > *ref})"

also with "implies" relations, nothing works.

Any suggestion?

Segmentation fault while making monitor with References and Quantifiers

The methode reelay::make_monitor generate segmentation fault when the formula contains a quantifier operator. For example, based on the example given in "apps\tutorial\door_open_warning\cpp\dense_tutorial_main.cpp" and the formula from rye.md

#include <string>
#include <vector>
#include <fstream>
#include <iostream>

#include "reelay/monitors.hpp"

int main(int argc, const char *argv[]) {

  using time_type = double;
  using input_type = reelay::json;
  using output_type = reelay::json;

  if (argc != 2) {
    std::cout << "Error: Program requires a filename argument." << std::endl;
    return -1;
  }

  std::ifstream input_file(argv[1]);

  // Monitor constructions
  auto options = reelay::dense_timed<time_t>::monitor<
      input_type, output_type>::options();

  std::cout << "Before make_monitor.\n";
  auto my_monitor_2 = reelay::make_monitor(
      "exists[refname]. {key1: *refname, key2: *refname}", options);

  std::cout << "After make monitor\n";
  return 0;
}

The output is :

# g++ -o tests tests.cpp -lcudd
# ./test examples/test.jsonl
Before make_monitor.
Segmentation fault (core dumped)

The same issues is happening with ryjson1 when I run it as follow :

# ./bin/ryjson1 'exists[refname]. {key1: *refname, key2: *refname}' ./test.jsonl
Segmentation fault (core dumped)

Installing reelay on mac m1

I'm unable to install reelay on a mac m1. I've attached the output of pip3.

fatma@canatan ~ % pip3 install reelay
Collecting reelay
Using cached reelay-2008.0.tar.gz (1.4 MB)
Requirement already satisfied: pybind11>=2.4 in /opt/homebrew/lib/python3.9/site-packages (from reelay) (2.9.0)
Building wheels for collected packages: reelay
Building wheel for reelay (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"'; file='"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-wheel-hoe6u2ga
cwd: /private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/
Complete output (323 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-11-arm64-3.9
creating build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/init.py -> build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/dense_timed_monitor.py -> build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/discrete_timed_monitor.py -> build/lib.macosx-11-arm64-3.9/reelay
running egg_info
writing python/reelay.egg-info/PKG-INFO
writing dependency_links to python/reelay.egg-info/dependency_links.txt
writing requirements to python/reelay.egg-info/requires.txt
writing top-level names to python/reelay.egg-info/top_level.txt
reading manifest file 'python/reelay.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'python/include'
adding license file 'LICENSE'
writing manifest file 'python/reelay.egg-info/SOURCES.txt'
running build_ext
checking build system type... arm-apple-darwin21.2.0
checking host system type... arm-apple-darwin21.2.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... rm: conftest.dSYM: is a directory
yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... rm: conftest.dSYM: is a directory
BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert arm-apple-darwin21.2.0 file names to arm-apple-darwin21.2.0 format... func_convert_file_noop
checking how to convert arm-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @file support... rm: conftest.dSYM: is a directory
no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... rm: conftest.dSYM: is a directory
ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking for doxygen... no
configure: WARNING: Doxygen not found - continuing without Doxygen support
checking for pdflatex... pdflatex
checking for makeindex... makeindex
checking for library containing pow... none required
checking for pthread_create in -lpthread... yes
checking for library containing WSAStartup... no
checking for library containing GetProcessMemoryInfo... no
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for working C++ thread header... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for ptrdiff_t... yes
checking size of int... 4
checking size of long... 8
checking size of void *... 8
checking size of long double... 8
checking whether we are building for a Win32 host... no
checking whether enough of C++11 is supported... yes
checking for pow... yes
checking for sqrt... yes
checking for strchr... yes
checking for strstr... yes
checking for powl... yes
checking for gethostname... yes
checking for getrlimit... yes
checking for getrusage... yes
checking for sysconf... yes
checking for +Infinity (IEEE 754 floating point)... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating doc/cudd.tex
config.status: creating Makefile
config.status: creating dddmp/exp/test1.sh
config.status: creating dddmp/exp/test2.sh
config.status: creating dddmp/exp/test3.sh
config.status: creating dddmp/exp/test4.sh
config.status: creating dddmp/exp/test5.sh
config.status: creating dddmp/exp/test6.sh
config.status: creating dddmp/exp/test7.sh
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

Configuration summary for cudd 3.0.0

Build system : arm-apple-darwin21.2.0
Host system : arm-apple-darwin21.2.0
Prefix : '/usr/local'
Compilers : 'gcc -Wall -Wextra -g -O3 -fPIC -pthread'
: 'g++ -Wall -Wextra -std=c++0x -g -O3 -fPIC -pthread'
Shared library : no
dddmp enabled : no
obj enabled : yes

/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC cudd/cudd_libcudd_la-cuddAddAbs.lo
CC cudd/cudd_libcudd_la-cuddAddApply.lo
CC cudd/cudd_libcudd_la-cuddAddFind.lo
CC cudd/cudd_libcudd_la-cuddAddInv.lo
CC cudd/cudd_libcudd_la-cuddAddIte.lo
CC cudd/cudd_libcudd_la-cuddAddNeg.lo
CC cudd/cudd_libcudd_la-cuddAddWalsh.lo
CC cudd/cudd_libcudd_la-cuddAndAbs.lo
CC cudd/cudd_libcudd_la-cuddAnneal.lo
CC cudd/cudd_libcudd_la-cuddApa.lo
CC cudd/cudd_libcudd_la-cuddAPI.lo
CC cudd/cudd_libcudd_la-cuddApprox.lo
CC cudd/cudd_libcudd_la-cuddBddAbs.lo
CC cudd/cudd_libcudd_la-cuddBddCorr.lo
CC cudd/cudd_libcudd_la-cuddBddIte.lo
CC cudd/cudd_libcudd_la-cuddBridge.lo
CC cudd/cudd_libcudd_la-cuddCache.lo
CC cudd/cudd_libcudd_la-cuddCheck.lo
CC cudd/cudd_libcudd_la-cuddClip.lo
CC cudd/cudd_libcudd_la-cuddCof.lo
CC cudd/cudd_libcudd_la-cuddCompose.lo
CC cudd/cudd_libcudd_la-cuddDecomp.lo
CC cudd/cudd_libcudd_la-cuddEssent.lo
CC cudd/cudd_libcudd_la-cuddExact.lo
CC cudd/cudd_libcudd_la-cuddExport.lo
CC cudd/cudd_libcudd_la-cuddGenCof.lo
CC cudd/cudd_libcudd_la-cuddGenetic.lo
CC cudd/cudd_libcudd_la-cuddGroup.lo
CC cudd/cudd_libcudd_la-cuddHarwell.lo
CC cudd/cudd_libcudd_la-cuddInit.lo
CC cudd/cudd_libcudd_la-cuddInteract.lo
CC cudd/cudd_libcudd_la-cuddLCache.lo
CC cudd/cudd_libcudd_la-cuddLevelQ.lo
CC cudd/cudd_libcudd_la-cuddLinear.lo
CC cudd/cudd_libcudd_la-cuddLiteral.lo
CC cudd/cudd_libcudd_la-cuddMatMult.lo
CC cudd/cudd_libcudd_la-cuddPriority.lo
CC cudd/cudd_libcudd_la-cuddRead.lo
CC cudd/cudd_libcudd_la-cuddRef.lo
CC cudd/cudd_libcudd_la-cuddReorder.lo
CC cudd/cudd_libcudd_la-cuddSat.lo
CC cudd/cudd_libcudd_la-cuddSign.lo
CC cudd/cudd_libcudd_la-cuddSolve.lo
CC cudd/cudd_libcudd_la-cuddSplit.lo
CC cudd/cudd_libcudd_la-cuddSubsetHB.lo
CC cudd/cudd_libcudd_la-cuddSubsetSP.lo
CC cudd/cudd_libcudd_la-cuddSymmetry.lo
CC cudd/cudd_libcudd_la-cuddTable.lo
CC cudd/cudd_libcudd_la-cuddUtil.lo
CC cudd/cudd_libcudd_la-cuddWindow.lo
CC cudd/cudd_libcudd_la-cuddZddCount.lo
CC cudd/cudd_libcudd_la-cuddZddFuncs.lo
CC cudd/cudd_libcudd_la-cuddZddGroup.lo
CC cudd/cudd_libcudd_la-cuddZddIsop.lo
CC cudd/cudd_libcudd_la-cuddZddLin.lo
CC cudd/cudd_libcudd_la-cuddZddMisc.lo
CC cudd/cudd_libcudd_la-cuddZddPort.lo
CC cudd/cudd_libcudd_la-cuddZddReord.lo
CC cudd/cudd_libcudd_la-cuddZddSetop.lo
CC cudd/cudd_libcudd_la-cuddZddSymm.lo
CC cudd/cudd_libcudd_la-cuddZddUtil.lo
CC util/cudd_libcudd_la-cpu_stats.lo
CC util/cudd_libcudd_la-cpu_time.lo
CC util/cudd_libcudd_la-cstringstream.lo
CC util/cudd_libcudd_la-datalimit.lo
CC util/cudd_libcudd_la-pathsearch.lo
CC util/cudd_libcudd_la-pipefork.lo
CC util/cudd_libcudd_la-prtime.lo
CC util/cudd_libcudd_la-safe_mem.lo
CC util/cudd_libcudd_la-strsav.lo
CC util/cudd_libcudd_la-texpand.lo
CC util/cudd_libcudd_la-ucbqsort.lo
CC st/cudd_libcudd_la-st.lo
CC epd/cudd_libcudd_la-epd.lo
CC mtr/cudd_libcudd_la-mtrBasic.lo
CC mtr/cudd_libcudd_la-mtrGroup.lo
CXX cplusplus/cudd_libcudd_la-cuddObj.lo
CXXLD cudd/libcudd.la
CC dddmp/dddmp_libdddmp_la-dddmpBinary.lo
CC dddmp/dddmp_libdddmp_la-dddmpConvert.lo
CC dddmp/dddmp_libdddmp_la-dddmpDbg.lo
CC dddmp/dddmp_libdddmp_la-dddmpLoad.lo
CC dddmp/dddmp_libdddmp_la-dddmpLoadCnf.lo
CC dddmp/dddmp_libdddmp_la-dddmpNodeAdd.lo
CC dddmp/dddmp_libdddmp_la-dddmpNodeBdd.lo
CC dddmp/dddmp_libdddmp_la-dddmpNodeCnf.lo
CC dddmp/dddmp_libdddmp_la-dddmpStoreAdd.lo
CC dddmp/dddmp_libdddmp_la-dddmpStoreBdd.lo
CC dddmp/dddmp_libdddmp_la-dddmpStoreCnf.lo
CC dddmp/dddmp_libdddmp_la-dddmpStoreMisc.lo
CC dddmp/dddmp_libdddmp_la-dddmpUtil.lo
CCLD dddmp/libdddmp.la
building 'library' extension
creating build/temp.macosx-11-arm64-3.9
creating build/temp.macosx-11-arm64-3.9/python
creating build/temp.macosx-11-arm64-3.9/python/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Iinclude -Ithird_party/cudd/cudd -Ithird_party/cudd/cplusplus -I/opt/homebrew/lib/python3.9/site-packages/pybind11/include -I/opt/homebrew/lib/python3.9/site-packages/pybind11/include -I/opt/homebrew/include -I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c python/src/main.cpp -o build/temp.macosx-11-arm64-3.9/python/src/main.o --std=c++11 -fvisibility=hidden -fsized-deallocation
In file included from python/src/main.cpp:14:
In file included from include/reelay/monitors/dense_timed_data_monitor.hpp:15:
In file included from include/reelay/networks/dense_timed_data_network.hpp:15:
include/reelay/intervals.hpp:11:10: fatal error: 'boost/icl/interval.hpp' file not found
#include "boost/icl/interval.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

ERROR: Failed building wheel for reelay
Running setup.py clean for reelay
Failed to build reelay
Installing collected packages: reelay
Running setup.py install for reelay ... error
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"'; file='"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-record-ez6ri0ft/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/reelay
cwd: /private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/
Complete output (232 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-11-arm64-3.9
creating build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/init.py -> build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/dense_timed_monitor.py -> build/lib.macosx-11-arm64-3.9/reelay
copying python/reelay/discrete_timed_monitor.py -> build/lib.macosx-11-arm64-3.9/reelay
running egg_info
writing python/reelay.egg-info/PKG-INFO
writing dependency_links to python/reelay.egg-info/dependency_links.txt
writing requirements to python/reelay.egg-info/requires.txt
writing top-level names to python/reelay.egg-info/top_level.txt
reading manifest file 'python/reelay.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'python/include'
adding license file 'LICENSE'
writing manifest file 'python/reelay.egg-info/SOURCES.txt'
running build_ext
checking build system type... arm-apple-darwin21.2.0
checking host system type... arm-apple-darwin21.2.0
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... rm: conftest.dSYM: is a directory
yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... rm: conftest.dSYM: is a directory
BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 786432
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert arm-apple-darwin21.2.0 file names to arm-apple-darwin21.2.0 format... func_convert_file_noop
checking how to convert arm-apple-darwin21.2.0 file names to toolchain format... func_convert_file_noop
checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @file support... rm: conftest.dSYM: is a directory
no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... rm: conftest.dSYM: is a directory
ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin21.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether byte ordering is bigendian... no
checking for doxygen... no
configure: WARNING: Doxygen not found - continuing without Doxygen support
checking for pdflatex... pdflatex
checking for makeindex... makeindex
checking for library containing pow... none required
checking for pthread_create in -lpthread... yes
checking for library containing WSAStartup... no
checking for library containing GetProcessMemoryInfo... no
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking for unistd.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking for working C++ thread header... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for size_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for ptrdiff_t... yes
checking size of int... 4
checking size of long... 8
checking size of void *... 8
checking size of long double... 8
checking whether we are building for a Win32 host... no
checking whether enough of C++11 is supported... yes
checking for pow... yes
checking for sqrt... yes
checking for strchr... yes
checking for strstr... yes
checking for powl... yes
checking for gethostname... yes
checking for getrlimit... yes
checking for getrusage... yes
checking for sysconf... yes
checking for +Infinity (IEEE 754 floating point)... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating doc/cudd.tex
config.status: creating Makefile
config.status: creating dddmp/exp/test1.sh
config.status: creating dddmp/exp/test2.sh
config.status: creating dddmp/exp/test3.sh
config.status: creating dddmp/exp/test4.sh
config.status: creating dddmp/exp/test5.sh
config.status: creating dddmp/exp/test6.sh
config.status: creating dddmp/exp/test7.sh
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
--------------------------------------------------
Configuration summary for cudd 3.0.0

Build system   : arm-apple-darwin21.2.0
Host system    : arm-apple-darwin21.2.0
Prefix         : '/usr/local'
Compilers      : 'gcc    -Wall -Wextra -g -O3 -fPIC -pthread'
               : 'g++    -Wall -Wextra -std=c++0x -g -O3 -fPIC -pthread'
Shared library : no
 dddmp enabled : no
 obj enabled   : yes
--------------------------------------------------
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
building 'library' extension
creating build/temp.macosx-11-arm64-3.9
creating build/temp.macosx-11-arm64-3.9/python
creating build/temp.macosx-11-arm64-3.9/python/src
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Iinclude -Ithird_party/cudd/cudd -Ithird_party/cudd/cplusplus -I/opt/homebrew/lib/python3.9/site-packages/pybind11/include -I/opt/homebrew/lib/python3.9/site-packages/pybind11/include -I/opt/homebrew/include -I/opt/homebrew/opt/[email protected]/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c python/src/main.cpp -o build/temp.macosx-11-arm64-3.9/python/src/main.o --std=c++11 -fvisibility=hidden -fsized-deallocation
In file included from python/src/main.cpp:14:
In file included from include/reelay/monitors/dense_timed_data_monitor.hpp:15:
In file included from include/reelay/networks/dense_timed_data_network.hpp:15:
include/reelay/intervals.hpp:11:10: fatal error: 'boost/icl/interval.hpp' file not found
#include "boost/icl/interval.hpp"
         ^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
----------------------------------------

ERROR: Command errored out with exit status 1: /opt/homebrew/opt/[email protected]/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"'; file='"'"'/private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-install-u_pbxpyx/reelay_523429e3a90b41a3adf7f551b85bec48/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/zx/lpp5m4fd0xj508n81lj5_2hh0000gn/T/pip-record-ez6ri0ft/install-record.txt --single-version-externally-managed --compile --install-headers /opt/homebrew/include/python3.9/reelay Check the logs for full command output.
WARNING: You are using pip version 21.1.3; however, version 21.3.1 is available.
You should consider upgrading via the '/opt/homebrew/opt/[email protected]/bin/python3.9 -m pip install --upgrade pip' command.

std::bad cast in python binding when using nested structure

Description

After updating from version 2005 to 2008 I cannot use nested structures (e.g. A:{B}) any more.

I would like to solve it myself, but unfortunately I don't have any experience with pybind11.

Steps to reproduce:

Python 3.8.5 (default, Jul 27 2020, 08:42:51) 
[GCC 10.1.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from reelay import dense_timed_monitor
>>> my_monitor = dense_timed_monitor( pattern="A::{B}", semantics="boolean", piecewise='constant')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jcarrano/source/mtl-tests/env/lib/python3.8/site-packages/reelay/dense_timed_monitor.py", line 29, in __new__
    return reelay.library.dense_monitor.make(pattern, options)
RuntimeError: std::bad_cast

Python API design

Leave your opinions here regarding Python API.

Currently monitors are instantiated by the name of formalism as follows:

reelay.past_ltl.monitor(pattern:str, *args, **kwargs)
reelay.past_mtl.monitor(pattern:str, *args, **kwargs)
reelay.past_stl.monitor(pattern:str, *args, **kwargs)

And there is a single update method to feed the monitor at each step.

Latest Docker image doesn't recognize the "rymtl" command

Can't run examples directly in docker image. Is there some setup involved like setting up the path or compiling the source code inside the docker?

root@da712a2de8c3:/home/reelay# rymtl '{p1} since[18:24] {p2}' reelay/apps/mtl/examples/2.csv --verbose 1
bash: rymtl: command not found

Links in the python getting started need updating

Hi, the links in the python getting started bit (https://github.com/doganulus/reelay/blob/master/docs/gs_python.md) need updating.

Custom predicates from Python

Bring custom predicates feature implemented in C++ to Python as well.

  1. This requires an ability to call an arbitrary Python function from C++.
  2. Investigate pybind11 capabilities for this purpose.

Operator precedence for the PEG parser

Summary: Operator precedence in the parser does not work as intended.

Example: Currently the parser parses a formula not p since q as not(p since q) instead of (not p) since q.

This will be solved when:

  1. The unary operators bind stronger than the binary ones.
  2. The binary temporal operators bind stronger than the binary Boolean operators.
  3. Boolean precedence: Conjunction > Disjunction > Implication (= Equivalence)
  4. Binary temporal and implication operators are not associative (Chaining is not allowed).

Pybind 2.4.3 and Clang and C++17

This combination makes the command CC=clang CXX=clang++ pip install reelay fail. This is particularly important for easier Reelay installation on MacOS machines.

Solution: Add -fsized-deallocation flag to clang for pybind11 2.4.3 and earlier. It is fixed for upcoming releases and will not require setting the flag.

Reference: pybind/pybind11#1957

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.