copilot-libraries-4.6.1: Libraries for the Copilot language.

Copyright | (c) 2011 National Institute of Aerospace / Galois Inc.
Safe Haskell | Safe-Inferred
Language | Haskell2010

Copilot.Library.RegExp

Description

A regular expression library.

For an example, see https://github.com/Copilot-Language/examplesForACSL/blob/master/example15/main.hs

Synopsis

- copilotRegexp :: (Typed t, SymbolParser t, Eq t) => Stream t -> SourceName -> Stream Bool -> Stream Bool
- copilotRegexpB :: SourceName -> [(StreamName, Stream Bool)] -> Stream Bool -> Stream Bool

# Documentation

copilotRegexp Source #

Arguments

:: (Typed t, SymbolParser t, Eq t) |
=> Stream t | The stream to monitor.
-> SourceName | The regular expression.
-> Stream Bool | A stream indicating when to reset the monitor.
-> Stream Bool |

Regular expression matching over an arbitrary stream

copilotRegexpB Source #

Arguments

:: SourceName | Regular expression
-> [(StreamName, Stream Bool)] | A table with the stream associated to each symbol.
-> Stream Bool | A stream indicating when to reset the monitor.
-> Stream Bool |

Regular expression matching over a collection of boolean streams.

Regular expressions can contain symbols, which are expanded to match specific streams.

For example, the regular expression:

    "<s0>(<s1>)+"

would match if you provide a map (association list) that assigns, to the symbol `"s0"`, a stream that is true at the first sample, and to `"s1"`, a stream that is true at every sample after the first sample.