Monday, 24 September 2012
Regular Expression Sub-Matching using Partial Derivatives
Here's our paper and the talk presented at PPDP'12.
There's quite a bit of recent interest in the use of derivatives for matching and parsing, e.g. see the works by Owens/Reppy/Turon on "Regular-expression derivatives reexamined" and Might/Darais/Spiewak on "Parsing with derivatives: a functional pearl".
Our use of derivatives and partial derivatives for regular expression sub-matching
is inspired by our own prior where we derive up-cast and down-cast coercions out of a proof system describing regular expression containment based on partial derivatives. See our APLAS'04 and ML Workshop'05 papers.
Friday, 27 July 2012
Model Checking DSL-Generated C Source Code
We report on the application of SPIN for
model-checking C source code which is generated out of
a textual domain-specific language (DSL).
We have built a tool which automatically generates the necessary
SPIN wrapper code using (meta-)information available at the DSL level.
The approach is part of a larger tool-chain
for developing mission critical applications.
The main purpose of SPIN is for bug-finding where
error traces resulting from SPIN
can be automatically replayed at the DSL level and
yield concise explanations in terms of a temporal specification DSL.
The tool-chain is applied in some large scale
industrial applications.
The paper appeared in SPIN'12. Here are links to the paper, talk and implementation.
Labels:
dsl,
haskell,
linear temporal logic,
model-checking
Friday, 8 June 2012
Regular Expression Sub-Matching using Partial Derivatives
Regular expression sub-matching is the problem of finding for
each sub-part of a regular expression a matching sub-string.
Prior work applies Thompson and Glushkov NFA methods for the construction
of the matching automata. We propose the novel use of derivatives and
partial derivatives for regular expression sub-matching.
Our benchmarking results show that the run-time performance is promising
and that our approach can be applied in practice.
Here's a link to the paper and the implementation.
This is the substantially revised and almost completely re-written (paper and implementation) version of our earlier draft.
Labels:
haskell,
partial derivatives,
regular expressions
Monday, 4 June 2012
Constructive Finite Trace Analysis with Linear Temporal Logic
We consider linear temporal logic (LTL) for run-time testing
over limited time periods. The technical challenge
is to check if the finite trace produced by the system
under test matches the LTL property.
We present a constructive solution to this problem.
Our finite trace LTL matching algorithm
yields a proof explaining why a match exists.
We apply our constructive LTL matching
method to check if LTL properties are sufficiently covered
by traces resulting from tests.
The paper appeared in TAP'12. Here's a link to the paper and the talk.
The system has been implemented in Haskell and is applied in some real-world projects. Some of the Haskell source code will be made publicly available (later in the year).
Friday, 28 October 2011
Haskell Actors
There's some recent interest about Actor-style concurrency in the Haskell context, e.g. see
My own work in this context, see actor, is orthogonal to the above mentioned works.
The main point of actor is the ability to pattern match over multiple events (messages) in the message queue. Here's a simple example. Suppose, you write a market-place actor which receives requests from sellers and buyers. The task is to find matching sellers and buyers. In the actor extension this can be elegantly specified as follows (I'm using some pseudo-syntax here):
Try to express the same using standard actors where we can pattern match over a single message only. There's more info about actors with multi-headed receive clauses in some earlier post. Please check out the COORDINATION'08 paper (online) for the details of the matching algorithm which is implemented in actor.
I retrospect, I should have named the package 'multi-headed-actor', what a freaky name :)
The actor approach is built upon concurrent channels but instead we could rely on distributed channels based on haskell-mpi or ErlangInHaskell.
This idea (of receive patterns with multiple heads) has been picked up by others, e.g. see the following works which basically adopt the matching algorithm from actor
My own work in this context, see actor, is orthogonal to the above mentioned works.
The main point of actor is the ability to pattern match over multiple events (messages) in the message queue. Here's a simple example. Suppose, you write a market-place actor which receives requests from sellers and buyers. The task is to find matching sellers and buyers. In the actor extension this can be elegantly specified as follows (I'm using some pseudo-syntax here):
receive Seller item & Buyer item --> ...
Try to express the same using standard actors where we can pattern match over a single message only. There's more info about actors with multi-headed receive clauses in some earlier post. Please check out the COORDINATION'08 paper (online) for the details of the matching algorithm which is implemented in actor.
I retrospect, I should have named the package 'multi-headed-actor', what a freaky name :)
The actor approach is built upon concurrent channels but instead we could rely on distributed channels based on haskell-mpi or ErlangInHaskell.
This idea (of receive patterns with multiple heads) has been picked up by others, e.g. see the following works which basically adopt the matching algorithm from actor
- Hubert Plociniczak and Susan Eisenbach. JErlang: Erlang with Joins
- Scala Joins Library:
Implementing Joins using Extensible Pattern Matching
by Philipp Haller and Tom Van Cutsem
Saturday, 24 April 2010
Regular Expression Matching using Partial Derivatives
Regular expression matching is a classical and well-studied problem.
Prior work applies DFA and Thompson NFA methods for the construction
of the matching automata. We propose the novel use of derivatives and
partial derivatives for regular expression matching.
We show how to obtain algorithms for various
matching policies such as POSIX and greedy left-to-right.
Our benchmarking results show that the run-time performance is promising
and that our approach can be applied in practice.
This is a topic, Kenny and I have pursued for quite a while and we have finally
managed to write up the ideas.
Here's the link to the paper
The implementation is on hackage. See regex-pderiv
[Edit: regex-pderiv replaces xhaskell-library]
Prior work applies DFA and Thompson NFA methods for the construction
of the matching automata. We propose the novel use of derivatives and
partial derivatives for regular expression matching.
We show how to obtain algorithms for various
matching policies such as POSIX and greedy left-to-right.
Our benchmarking results show that the run-time performance is promising
and that our approach can be applied in practice.
This is a topic, Kenny and I have pursued for quite a while and we have finally
managed to write up the ideas.
Here's the link to the paper
The implementation is on hackage. See regex-pderiv
[Edit: regex-pderiv replaces xhaskell-library]
Sunday, 8 November 2009
Tag-free Combinators for Binding-Time Polymorphic Program Generation
Peter Thiemann and I have written a paper on (off-line) partial evaluation for polymorphic languages using GHC's advanced typing features.
The source code of the combinators is available here.
Here's the abstract:
The source code of the combinators is available here.
Here's the abstract:
Binding-time polymorphism enables a highly flexible binding-time analysis for offline partial evaluation. This work provides the tools to translate this flexibility into efficient program specialization in the context of a polymorphic language.
Following the cogen-combinator approach, a set of combinators is defined in Haskell that enables the straightforward transcription of a binding-time polymorphic annotated program into the corresponding program generator. The typing of the combinators mimics the constraints of the binding-time analysis. The resulting program generator is safe, tag-free, and it has no interpretive overhead.
Subscribe to:
Posts (Atom)