We consider the problem of integrating XDuce into ML. This is difficult because of incompatible type and value representations. Our solution is a type-driven translation scheme from XDuce to ML based on a structured representation of XDuce values. XDuce type inference guides the insertion of appropriate coercion functions to translate regular expression pattern matching and uses of semantic subtyping. We can extend our translation scheme to include ML function calls and patterns into XDuce. Thus, we can embed XDuce into ML. Our results allow to enrich the ML language with support for dealing with semi-structured data.
Regular expressions are often ambiguous. We present a novel method based on Brzozowski's derivatives to aid the user in diagnosing ambiguous regular expressions. We introduce a derivative-based finite state transducer to generate parse trees and minimal counter-examples. The transducer can be easily customized to either follow the POSIX or Greedy disambiguation policy and based on a finite set of examples it is possible to examine if there are any differences among POSIX and Greedy.
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.