Language-based Systems

Background

We call "structured document" any type of content with a clear and well-defined structure. This includes marked-up texts, computer programs, mathematical formulas, diagrams or any other type of content defined by a domain specific language. The specification of the language can be used to build dedicated tools that are aware of the syntax or semantics of the data that are being edited. Some tools are specialized in a given language. Other are generics, in the sense that they adapt themselves to the characteristics of the language specifying the content being edited. This latter kind of tools is sometimes called syntax-directed, language-sensitive or language-based systems.

Active researches are conducted in the fields of language-based systems. Automatic generation of tools from specifications allows to quickly develop environments dedicated to domain-specific languages. These generated systems can include, at minimal cost, additional tools like type-checker, evaluators or compilers. This enhance software quality and maintainability.

Research rationale

My research in language-based systems has focused on several aspects:

I explored the use of software engineering knowledge to define the foundations for representation and handling of structured documents in a project named Bible,

I studied the editing of structured document by using sets of specialized graphical widget in the project keTuK,

I extended this idea by designing a system allowing the distributed editing of structured documents,

I also worked to the design of an Integrated Development Environment for JavaCard built with the SmartTools software factory.

Realisations

The design and management of context-controlled document

During my PhD thesis, I explored the use of software engineering knowledge to define the foundations for representation and handling of structured documents. As documents and programs are different in many aspects, I focused my research on two specific features of documents:

Programs are intended to be runned while documents are intended for multiple purposes: storage, reading, exchange, etc. Each use corresponds to a particular kind of document defined by a document model. Translating a document to another one often requires difficult structure transformations, and the number of document models prevent the development of specific converters. We aimed our study on prototype languages which allow the description of objects by differential copy. We have adapted this principle for the representation of document models. In this way, document models are not longer isolated entities. Each of them have at least one link which another model. By successive linking, we collect the set of transformations to move from a model to another one and we infer the modifications to be done on documents.

The second feature comes from the reading process. Like the execution of a program, the reading of a document causes either an action or a change in the receiver. The singularity of the reading process is that the result depends not only on the content of the document, but also on the reader's profile. Adapting documents to readers, or more generally to a certain context would be desirable. We realize the design of context-controlled documents by breaking the generating process in two stages: the design of a gauge which brought together principles common to the design of a set of documents, and an automatic phase of document generation depending on a client profile. A gauge is represented by an abstract data structure in which some parts can be selected among a set of candidate structures. In order to ensure the correctness of generated documents, we use a gauge model obtained by a semantic extension of the document model [1–3].

XML document editing by specialized graphical widget

XML is well suited for the storage of any kind of structured information but there is a lack of standard implementation allowing input/output of data. This research consists in replacing XML browsers and editors by small software components capable of displaying themselves specific kind of data. Using this paradigm, the visualization of a table may then be delegated to a component specialized in the handling of data structured into rows and columns, a portion of a text may be displayed by another specialized component having text layout facilities, etc. The target software components can be of several different types, available on different platforms and written in different languages. In the project KeTuK, I chose to generate widely deployed Java Beans components based on the platform independent language Java. This allows users either to develop their own dedicated components or to download ready to use ones. Finding an existing component which fulfill their needs is not a difficult task, considering the number of Java Beans available on the market, ranking from standard graphical swing components to very complex objects like graph renderers, text editors or even spreadsheets. This direct mapping between XML elements and graphical widgets allows to easily create dedicated editing environments.

A distributed editing environment for XML documents

The strict separation, allowed by XML, between the information itself (the abstract representation) and the way it is displayed (concrete representation of the data) allows the elaboration of specialized interfaces to visualize or modify data. A lot of developments were made to interact with XML data but the use of these applications in distributed environments was just starting at the time of this study.

This research focused on structured editing over the Internet. The key point of the system is the way user interactions are handled. Selections and modifications made by a user are not directly reflected on the concrete view, they are serialized in XML and transmitted to a server which applies them to the document and broadcasts updates to the views. This organization has several advantages. XML documents coding selection and modification operations are usually smaller than the edited document and can be directly processed with a transformation engine which can adapt them to different representations. In addition, several selections or modifications can be combined into an unique XML document. This allows one to update multiple views with different frequencies and fits the requirement of an asynchronous communication mode like HTTP [4].

An Integrated Development Environment for JavaCard built with the SmartTools software factory

With the Internet and the proliferation of new component and distributive technologies, the design and implementation of complex applications must take into account standards, code distribution, deployment of components and reuse of business know-hows. To cope with these changes, applications need to be more open, adaptable and capable of evolving.

The SmartTools Software Factory, developed at INRIA Sophia-Antipolis, France is a new development approach based on transformations of different business models, each of them related to one possible concern of the application. This approach relies on Generative and Component Programming and on separation of concerns (ASoC) which are adapted for business-model descriptions. SmartTools can be seen as a generator of programming environment dedicated to applications which rely on a data model [5–7].

In the SmartTools team, I studied the use of the software to automatically generate an integrated development environment for JavaCard applications (Java Card technology enable Java technology for use on smart cards. A smart card is identical in size to a typical credit card but includes a microprocessor and can perform calculations on locally-stored data).

2. Pasquier C: BIBLE: a system for Design and Management of Context-Controlled Documents. In proceedings of the first international conference on Principles of Document Processing (PODP’92). Washington D. C., USA; 1992.