CBClaus Brabrand

Claus Brabrand

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Claus Brabrand has a total of 6 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Dual syntax for XML languages

    by Claus Brabrand, Anders Møller, Michael I. Schwartzbach


  • Open Access

    Analyzing Ambiguity of Context-Free Grammars

    by Claus Brabrand, Robert Giegerich, Anders Møller

    It has been known since 1962 that the ambiguity problem for context-free grammars is undecidable. Ambiguity in context-free grammars is a recurring problem in language design and parser generation, as well as in applications where grammars are used as models of real-world physical structures. We observe that there is a simple linguistic characterization of the grammar ambiguity problem, and we show how to exploit this to conservatively approximate the problem based on local regular approximations and grammar unfoldings. As an application, we consider grammars that occur in RNA analysis in bioinformatics, and we demonstrate that our static analysis of context-free grammars is sufficiently precise and efficient to be practically useful.


  • Open Access

    Static Validation of Dynamically Generated HTML

    by Claus Brabrand, Anders Møller, Michael I. Schwartzbach

    We describe a static analysis of programs that efficientlydecides if all dynamically computed XHTML documents presentedto the client will validate according to the official DTD. We employtwo interprocedural flow analyses to construct a graph summarizingthe possible documents. This graph is subsequently analyzed todetermine validity of those documents.


  • Open Access

    PowerForms: Declarative Client-Side Form Field Validation

    by Claus Brabrand, Anders Møller, Ricky Mikkel Christensen, Michael I. Schwartzbach

    All uses of HTML forms may benefit from validation of the specifiedinput field values. Simple validation matches individual values against specified formats, while more advanced validation may involve interdependencies of form fields.There is currently no standard for specifying or implementing such validation. Today, CGI programmers often use Perl libraries for simple server-side validation or program customized JavaScript solutions for client-side validation.We present PowerForms, which is an add-on to HTML forms thatallows a purely declarative specification of input formats and sophisticated interdependencies of form fields. While our work may be seen as inspiration for a future extension of HTML, it is also available for CGI programmers today through a preprocessor that translates a PowerFormsdocument into a combination of standard HTML and JavaScript that works on all combinations of platforms and browsers.The definitions of PowerForms formats are syntactically disjoint from the form itself, which allows a modular development where the form is perhaps automatically generated by other tools and the formats and interdependencies are added separately.PowerForms has a clean semantics defined through a fixed-point process that resolves the interdependencies between all field values. Text fields are equipped with status icons (by default traffic lights) that continuously reflect the validity of the text that has been entered so far, thus providing immediate feed-back for the user. For other GUI components the available options are dynamically filtered to present only the allowed values. PowerForms are integrated into the system for generating interactive Web services, but is also freely available in an Open Source distribution as a stand-alone package.


  • Growing Languages with Metamorphic Syntax Macros

    by Claus Brabrand, Michael I. Schwartzbach

    "From now on, a main goal in designing a language should be to plan for growth."Guy Steele: Growing a Language, OOPSLA'98 invited talk.We present our experiences with a syntax macro language augmented with a concept of metamorphisms. We claim this forms a general abstraction mechanism forgrowing (domain-specific) extensions of programming languages.Our syntax macros are similar to previous work in that the compiler accepts collections of grammatical rules that extend the syntax in which a subsequent program may be written. We exhibit how almost arbitrary extensions can be defined in a purely declarative manner without resorting to compile-time programming. The macros arethus terminating in that parsing is guaranteed to terminate, hygienic since full-conversion eliminates the risk of name clashes, and transparent such that subsequent phases in the compiler are unaware of them. Error messages from later phases in the compiler are tracked through all macro invocations to pinpoint their sources in the extended syntax. A concept of metamorphic rules allows the arguments of a macro to be definedin an almost arbitrary meta level grammar and then to be morphed into the host language. We show through examples how creative use of metamorphic syntax macros may be used not only to create convenient shorthand notation but also to introduce newlanguage concepts and mechanisms. In fact, whole new languages can be created at surprisingly low cost. The resulting programs are significantly easier to understand and maintain.This work is fully implemented as part of the system for defininginteractive Web services, but could find use in many other languages.