<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>An Attribute Grammar Specification of IIS*Case PIM Concepts</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ivan Luković</string-name>
          <email>ivan@uns.ac.rs</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maria João Varanda Pereira</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nuno Oliveira</string-name>
          <email>nunooliveira@di.uminho.pt</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniela da Cruz</string-name>
          <email>danieladacruz@di.uminho.pt</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Pedro Rangel Henriques</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Politechnique Institute of Bragança, Escola Superior de Tecnologia e Gestão</institution>
          ,
          <addr-line>Campus de Santa Apolónia - Apartado 1134 5301-857 Bragança</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universisty of Minho, Department of Computer Science</institution>
          ,
          <addr-line>Campus de Gualtar - 4710-057 Braga</addr-line>
          ,
          <country country="PT">Portugal</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Novi Sad, Faculty of Technical Sciences</institution>
          ,
          <addr-line>Trg D. Obradovića 6, 21000 Novi Sad</addr-line>
          ,
          <country country="RS">Serbia</country>
        </aff>
      </contrib-group>
      <fpage>110</fpage>
      <lpage>124</lpage>
      <abstract>
        <p>IIS*Case is a model driven software tool that provides information system modeling and prototype generation. It comprises visual and repository based tools for creating various platform independent model (PIM) specifications that are latter transformed into the other, platform specific specifications, and finally to executable programs. Apart from having PIMs stored as repository definitions, we need to have their equivalent representation in the form of a domain specific language. One of the main reasons for this is to allow for checking the formal correctness of PIMs being created. In the paper, we present such a meta-language, named IIS*CDesLang. IIS*CDesLang is specified by an attribute grammar (AG), created under a visual programming environment for AG specifications, named VisualLISA.</p>
      </abstract>
      <kwd-group>
        <kwd>Information System Modeling</kwd>
        <kwd>Model-Driven Approaches</kwd>
        <kwd>Domain Specific Languages</kwd>
        <kwd>Domain Specific Modeling</kwd>
        <kwd>Attribute Grammars</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        In this paper we present a textual language aimed at modeling platform independent
model (PIM) specifications of an information system (IS). Our research goals are to
create such a language and couple it with Integrated Information Systems CASE Tool
(IIS*Case). IIS*Case is a model driven software tool that provides IS modeling and
prototype generation. At the level of PIM specifications, IIS*Case provides
conceptual modeling of database schemas and business applications. Starting from
such PIM models as a source, a chain of model-to-model and model-to-code
transformations is performed in IIS*Case so as to obtain executable program code of
software applications and database scripts for a selected target platform. One of the
main motives for developing IIS*Case is in the following. For many years, the most
favorable conceptual data model is Entity-Relationship (ER) data model. A typical
scenario of a database schema design process provided by majority of existing CASE
tools is to create an ER database schema first and then transform it into the relational
database schema. Such a scenario has many advantages, but also there are serious
disadvantages [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. We overcome them by creating an alternative approach and related
techniques that are mainly based on the usage of model driven software development
(MDSD) and Domain Specific Language (DSL) paradigms. The main idea was to
provide the necessary PIM meta-level concepts to IS designers, so that they can easily
model semantics in an application domain. After that, they may utilize a number of
formal methods and complex algorithms to produce database schema specifications
and IS executable code, without any expert knowledge.
      </p>
      <p>In order to provide design of various PIM models by IIS*Case, we created a
number of modeling, meta-level concepts and formal rules that are used in the design
process. Besides, we also developed and embedded into IIS*Case visual and
repository based tools that apply such concepts and rules. They assist designers in
creating formally valid models and their storing as repository definitions in a guided
way.</p>
      <p>
        Apart from having created PIM models stored as repository definitions, there is a
strong need to have their equivalent representation given in a form of a textual
language, for the following reasons. (i) Firstly, despite that we may expect that
average users prefer to use visually oriented tools for creating PIM specifications, we
should provide more experienced users with a textual language and a tool for creating
PIM specifications more efficiently. (ii) Secondly, we need to have PIM meta-level
concepts specified formally in a platform independent way, i.e. to be fully
independent of repository based specifications that typically may include some
implementation details. (iii) The third, but not less important, by this we create a basis
for the development of various algorithms for checking the formal correctness of the
models being created, as well as for the implementation of some semantic analysis.
Therefore, we need a grammar specification of our meta-level concepts and rules. By
such a grammar, we specify a DSL [
        <xref ref-type="bibr" rid="ref3 ref9">3, 9</xref>
        ] that recognizes problem domain concepts
and rules that are applied in the conceptual IS design provided by IIS*Case. In the
paper, we present a specification of such meta-language, named IIS*CDesLang.
IIS*CDesLang is used to create PIM project specifications that may be latter
transformed into the other specifications, and finally to programs.
      </p>
      <p>
        There are a number of meta-modeling approaches and tools suitable for the
purpose of creating IIS*CDesLang, as well as many other applications in various
problem domains like it is, for example, [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. One of them is the Meta-Object Facility
[
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] proposed by the OMG, where the meta-model is created by means of UML class
diagrams and Object Constraint Language (OCL). The Generic Modeling
Environment (GME) [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] is a configurable toolkit for domain-specific modeling and
program synthesis. In MetaEdit+ [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] models are created through a graphical editor
and a proprietary Report Definition Language is used to create code from models. The
Eclipse Modeling framework (EMF) [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] is also a commonly used meta-modeling
framework, where meta-meta-model named Ecore is used to create meta-models, or to
import them from UML tools or textual notations like one presented in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ].
      </p>
      <p>
        To create IIS*CDesLang, a visual programming environment (VPE) for attribute
grammar specifications, named VisualLISA [
        <xref ref-type="bibr" rid="ref11 ref13">11, 13</xref>
        ] is selected. In the paper, we
focus on the following application PIM concepts: project, application system, form
type, component type, application, call type, and basilar concepts as attribute and
domain. We applied VisualLISA Syntactic and Semantic Validators to check the
correctness of the specified grammar.
      </p>
      <p>A benefit of introducing IIS*CDesLang is to use VisualLISA attribute grammar
(AG) specifications and generate a parser aimed at checking the formal correctness of
created project models. In this way, we may help designers in raising the quality of
created IS specifications. Currently, we developed an AG specification of
IIS*CDesLang. The main goal of this paper is to present a part of such specification
and address main future research directions. Apart from having the AG specification
of IIS*CDesLang, we also need the appropriate design and syntax checker tools. They
are still under development. Therefore, we were not able so far to test the efficiency
of the concept as a whole. It remains to be one of our next research tasks.</p>
      <p>Apart from Introduction and Conclusion, the paper is organized in four sections. In
Section 2, we give a short presentation of IIS*Case. Preliminaries about VisualLISA
programming environment are given in Section 3. Selected IIS*CDesLang PIM
concepts are briefly described in Section 4. In Section 5 we present an attribute
grammar specification of IIS*CDesLang, created by VisualLISA.</p>
    </sec>
    <sec id="sec-2">
      <title>2 IIS*Case and Conceptual Modeling</title>
      <p>IIS*Case, as a software tool assisting in IS design and generating executable
application prototypes, currently provides:
 Conceptual modeling of database schemas, transaction programs, and business
applications of an IS;
 Automated design of relational database subschemas in the 3rd normal form
(3NF);
 Automated integration of subschemas into a unified database schema in the 3NF;
 Automated generation of SQL/DDL code for various database management
systems (DBMSs);
 Conceptual design of common user-interface (UI) models; and
 Automated generation of executable prototypes of business applications.</p>
      <p>
        Apart from the tool, we also define a methodological approach to the application of
IIS*Case in the software development process [
        <xref ref-type="bibr" rid="ref6 ref8">6, 8</xref>
        ]. By this approach, the software
development process provided by IIS*Case is, in general, evolutive and incremental.
It enables an efficient and continuous development of a software system, as well as an
early delivery of software prototypes that can be easily upgraded or amended
according to the new or changed users' requirements. In our approach we strictly
differentiate between the specification of a system and its implementation on a
particular platform. Therefore, modeling is performed at the high abstraction level,
because a designer creates an IS model without specifying any implementation
details. Besides, IIS*Case provides some model-to-model transformations from PIM
to Platform-Specific Models (PSM) and model-to-code transformations from PSMs to
the executable program code.
      </p>
      <p>
        Detailed information about IIS*Case may be found in several authors' references
and we do not intend to repeat them here. A case study illustrating main features of
IIS*Case and the methodological aspects of its usage is given in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. The
methodological approach to the application of IIS*Case is presented in more details in
[
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. At the abstraction level of PIMs, IIS*Case provides conceptual modeling of
database schemas that include specifications of various database constraints, such as
domain, not null, key and unique constraints, as well as various kinds of inclusion
dependencies. Such a model is automatically transformed into a model of relational
database schema, which is still technology independent specification. It is an example
of model-to-model transformations provided by IIS*Case. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] we present basic features of SQL Generator that are already implemented into
IIS*Case, and aspects of its application. We also present methods for implementation of
a selected database constraint, using mechanisms provided by a relational DBMS. It is
an example of model-to-code transformations provided by IIS*Case.
      </p>
      <p>
        At the abstraction level of PIMs, IIS*Case also provides conceptual modeling of
business applications that include specifications of: (i) UI, (ii) structures of
transaction programs aimed to execute over a database, and (iii) basic application
functionality that includes the following "standard" operations: data retrieval, inserts,
updates, and deletes. Also, a PIM model of business applications is automatically
transformed into the program code. In this way, fully executable application
prototypes are generated. Such a generator is also an example of model-to-code
transformations provided by IIS*Case and its development is almost finished. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
      </p>
    </sec>
    <sec id="sec-3">
      <title>3 Designing DSLs using VisualLISA</title>
      <p>
        As it follows from the definition of AGs [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] they are not as easy to specify as people
would desire because there is a gap between the language description and the
grammar meta-language that must be interpreted. The user must take care about
choosing the appropriate attributes and their evaluation rules. Since the beginning, the
literature concerned with the formal approach to compiler development presents AGs
drawing syntax trees decorated with attributes. So it is usual to sketch up on paper
attributed trees with semantic rules to describe an AG, avoiding spending time with
syntactic details. However, such informal drawings must be translated manually (by
language experts) into the specific input notation of a compiler generator. This
inconvenience discourages language designers to use AGs. Such an attitude prevents
them of resorting to systematic ways to implement the languages and their supporting
tools [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
      </p>
      <p>
        For modeling the new DSL we use here a Visual Language (VL) and its respective
programming environment (VPE) called VisualLISA, as it is proposed in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], and
conceived in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The idea of introducing VL is not only about having a nice visual
depiction that will be translated into a target notation latter on, but also having a
possibility of checking syntactic and semantic consistency.
      </p>
      <p>
        VisualLISA environment offers a visually oriented and non-errorprone way for AG
modeling and an easy translation of AG models into a target language. Three main
features of VisualLISA are: (i) syntax validation, (ii) semantics verification and (iii)
code generation. The syntax validation restricts some spatial combinations among the
icons of the language. In order to avoid syntactic mistakes, the model edition is
syntax-directed. The semantics verification copes with the static and dynamic
semantics of the attribute grammar meta-language. Finally, the code generation
produces code from the drawings sketched up. The target code would be LISA
specification language (LISAsl) - the meta-language for AG description under LISA
generator - or XAGra specification [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. LISAsl specification is passed to the LISA
system [
        <xref ref-type="bibr" rid="ref14 ref4">4, 14</xref>
        ] in a straightforward step. XAGra [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] textual language was conceived
with the aim of giving to VisualLISA development environment more versatility and
further usage perspectives.
      </p>
      <p>In our case, we are specifying IIS*CDesLang, a new DSL for IIS*Case tool, using
VisualLISA; the target code will be LISAsl in order to implement IIS*CDesLang
interpreter in LISA system. This specification is further detailed in Section 5.</p>
    </sec>
    <sec id="sec-4">
      <title>4 PIM Concepts and IIS*CDesLang</title>
      <p>
        IIS*CDesLang is a meta-language aimed at formal specification of all the concepts
embedded into IIS*Case repository definitions. In this paper, we focus on the PIM
concepts only. Hereby, we give a brief overview of the following concepts covered by
IIS*CDesLang: project, application system, form type, component type, application,
call type, as well as fundamental concepts: attribute and domain. In this section we
present the PIM concepts only from the technical point of view. Additional and
detailed information may be found in several authors' references, as well as in [
        <xref ref-type="bibr" rid="ref6 ref8">6, 8</xref>
        ].
      </p>
      <p>A work in IIS*Case is organized through projects. Everything that exists in the
IIS*Case repository is always stored in the context of a project. A designer may create
as many projects as he or she likes. One project is one IS specification and has a
structure represented by the project tree. Each project has its (i) name, (ii)
fundamental concepts or fundamentals for short, and (iii) application systems. A
designer may also define various types of application systems – application types for
short, and introduce a classification of application systems by associating each
application system to a selected application type. At the level of a project there is a
possibility to generate various reports that present the current state of the IIS*Case
repository. IIS*Case provides various types of repository reports.</p>
      <p>Application systems are organizational parts, i.e. segments of a project. We
suppose that each application system is designed by one, or possibly more than one
designer. Fundamental concepts are formally independent of any application system.
They are created at the level of a project and may be used in various application
systems latter on. Fundamental concepts are: domains, attributes, inclusion
dependencies and program units. In the paper, we focus on domains, attributes, and
functions as a category of program units.</p>
      <p>In the following text, we use a notion of domain with a meaning that is common in
the area of databases. It denotes a specification of allowed values of some database
attributes. We classify domains as (i) primitive and (ii) user defined. Primitive
domains exist "per se", like primitive data types in various formal languages. We have
a small set of primitive domains already defined, but we allow a designer to create his
or her own primitive domains, according to the project needs. User defined domains
are created by referencing primitive or previously created user defined domains.
Domains are referenced latter from attribute specifications. A list of all project
attributes created in IIS*Case belongs to fundamentals. Attributes are used in various
form type specifications of an application system.</p>
      <p>A concept of a function is used to specify any complex functionality that may be
used in other project specifications. Each function has its name as a unique identifier,
a description, a list of formal parameters and a return value type. Besides, it
encompasses a formal specification of function body that is created by the Function
Editor tool of IIS*Case.</p>
      <sec id="sec-4-1">
        <title>4.1 Domains and Attributes</title>
        <p>A specification of a primitive domain includes: name, description, default value, and a
"length required" item specifying if a numeric length: a) not to be, b) may be or c)
must be given. User defined domains are to be associated with attributes. A user
defined domain specification includes: a domain name, description (like all other
objects in IIS*Case repository), default value, domain type, and check condition.</p>
        <p>We distinguish the following domain types: (i) domains created by the inheritance
rule and (ii) complex domains that may be created by the: a) tuple rule, b) choice rule
or c) set rule. Inheritance rule means that a domain is created by inheriting a
specification of a primitive domain or a previously defined user defined domain. It
inherits all the rules of a superordinated domain and may be "stronger" than the
original one.</p>
        <p>A domain created by the tuple rule is called a tuple domain. It represents a tuple
(record) of values. For such a complex domain, we need to select some attributes as
items of a tuple domain. Therefore, we may have a recursive usage of attributes and
domains, because we need some already created attributes to use in a tuple domain
specification. A domain created by the choice rule – choice domain is technically
specified in the same way as tuple domain. Choice domain is the same as choice type
of XML Schema Language. Each value of such a domain must correspond to exactly
one attribute which is an item in the choice domain. A set domain represents sets
(collections) of values over a selected domain. To create it, we only need to reference
an existing domain as a set member domain. Each value of this domain will be a set
of values, each of them from a set member domain.</p>
        <p>Check condition, or the domain check expression is a regular expression that
further constrains possible values of a domain. We have a formal syntax developed
and the Expression Editor tool that assists in creating such expressions. We also have
a parser for checking syntax correctness.</p>
        <p>Currently we do not have a possibility to define allowed operators over a domain in
IIS*Case repository. It is a matter of our future work.</p>
        <p>
          Each attribute in an IIS*Case project is identified only by its name. Therefore, we
obey to the Universal Relation Scheme Assumption (URSA) [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], well known in the
relational data model. The same assumption is also applicable in many other data
models. Apart from the name and description, we specify if an attribute is included
into database schema, derived, or renamed.
        </p>
        <p>Most of the project attributes are to be included into the future database schema.
However, we may have attributes that will present some calculated values in reports
or screen forms that are not included into database schema. They derive their values
on the basis of other attributes by some function, representing a calculation.
Therefore, we classify attributes in IIS*Case as a) included or b) non-included in
database schema. Also we introduce another classification of attributes, by which we
may have: a) elementary or non-derived and b) derived attributes. If an attribute is
specified as non-derived, it obtains its values directly by the end users. Otherwise,
values are dervied by a function that may represent a calculation formula or any
algorithm. Any attribute specified as non-included in database schema must be
declared as derived one.</p>
        <p>A derived attribute may reference an IIS*Case repository function as a query
function. Query function is used to calculate attribute values on queries. Only a
derived attribute may additionally reference three IIS*Case repository functions
specifying how to calculate the attribute values on the following database operations:
insert, update and delete.</p>
        <p>In IIS*Case we have a notion of renamed attribute. A renamed attribute references
a previously defined attribute and has to be included in the database schema. It has its
origin in the referenced attribute, but with a slightly different semantics. Renaming is
a concept that is analogous to the renaming that is applied in mapping
EntityRelationship (ER) database schemas into relational data model. If a designer specifies
that an attribute A1 is renamed from A, actually he or she introduces an inclusion
dependency of the form [A1]  [A] at the level of a universal relation scheme.</p>
        <p>Each attribute specification also includes: a reference to a user defined domain,
default value and check condition. Check condition, or the attribute check expression
is a regular expression that further constrains possible values of the attribute. It is
defined and used in a similar way as it is for domain check expressions. If the
attribute check expression and domain check expression are both defined, they will be
connected by the logical AND.</p>
        <p>Both user defined domain and attribute specifications also provide for specifying a
number of display properties of screen items that correspond to the attributes and their
domains. Such display properties are used by the IIS*Case Application Generator
aimed at generating executable application prototypes. Display properties of an
attribute may inherit display properties of the associated domain or may override
them.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2 Application Systems, Form Types and Applications</title>
        <p>Apart from name, type and description, each application system may have many child
application systems. In this way, a designer may create application system hierarchies
in an IIS*Case project. An application system may comprise various kinds
of IIS*Case repository objects. For PIM specifications, only two kinds of objects are
important: a) form types and b) business applications, or applications, for short.</p>
        <p>A form type is the main modeling concept in IIS*Case. It generalizes document
types, i.e. screen forms or reports by means of users communicate with an IS. It is a
structure defined at the abstraction level of schema. Using the form type concept, a
designer specifies a set of screen or report forms of transaction programs and,
indirectly, specifies database schema attributes and constraints. Each particular
business document is an instance of a form type.</p>
        <p>Form types may be (i) owned, if they are created just in the application system
observed, or (ii) referenced, if they are "borrowed" from another application system,
regardless if it is referenced as a child application system. If a form type is referenced
it is a read-only object in the application system.</p>
        <p>Business applications are structures of form types. Each application has its name,
description, and a reference to exactly one form type that is the entry form type of the
application. To exist, each application must contain at least the entry form type. The
execution of a generated application always starts from the entry form type. Form
types in an application are related by form type calls. A form type call always relates
two form types: a calling form type and a called form type. By a form type call, a
designer may formally specify how values are passed between the forms during the
call execution. There are also other properties specifying details of a call execution.
Business Application Designer is a visually oriented tool for modeling business
applications in IIS*Case.</p>
        <p>Each form type has the following properties: name, title, frequency of usage,
response time and usage type or usage for short. By the usage property form types are
classified as menus or programs. Menu form types are used to generate just menus
without any data items. Program form types specify transaction programs with the UI.
They have a complex structure and may be designated as (i) considered or (ii) not
considered in database schema design. The first option is used for all form types
aimed at updating database, as well as for some report form types. Only the form
types that are "considered in database schema design" participate latter on in
generating database schema. The former option is used for report form types only.</p>
        <p>Each program form type is a tree structure of component types. It must have at
least one component type. A component type has a name, reference to the parent
component type (always empty for the root component type only), title, number of
occurrences, and operations allowed. Number of occurrences may be specified as (i)
0-N or (ii) 1-N. 0-N means that for each instance of the parent component type, zero
or more instances of the subordinated component type are allowed. 1-N means that
for each instance of the parent component type, we require the existence of at least
one instance of the subordinated component type. By operations allowed a designer
may specify the following "standard" database operations over the component types:
query, insert, delete, and update instances of the component type.</p>
        <p>Each component type has a set of attributes included from IIS*Case repository. An
attribute may be included in a form type at most once. Consequently, if a designer
includes an attribute into a component type, it cannot be included in any other
component type of the same form type. Each attribute included in a component type
may be declared as: (i) mandatory or optional, and (ii) modifiable, query only or
display only. Also, a set of allowed operations over an attribute in a component type
is specified. It is a subset of the set of operations {query, insert, nullify, update}. A
designer may also specify "List of Values" (LOV) functionality of a component type
attribute by referencing a LOV form type and specifying various LOV properties.</p>
        <p>Each component type must have at least one key. A component type key consists
of at least one component type attribute. Each component type key provides
identification of each component instance, but only in the scope of its superordinated
component instance. Also, a component type may have uniqueness constraints, each
of them consisting of at least one component type attribute. A uniqueness constraint
provides an identification of each component instance, but only if it has a non-null
value. On the contrary to keys, attributes in a uniqueness constraint may be optional.
Finally, a component type may have a check constraint defined. It is a logical
expression constraining values of each component type instance. Like domain check
expressions, they are specified and parsed by Expression Editor.</p>
        <p>Both component type and form type attribute specifications provide for specifying
a vast number of display properties of generated screen forms, windows, components,
groups, tabs, context and overflow areas, and items that correspond to the form type
attributes. There is also the Layout Manager tool that assists designers in specifying
component type display properties, and a tool UI*Modeler that is aimed at designing
templates of various common UI models. All of these display properties combined
with a selected common UI model are used by the IIS*Case Application Generator.</p>
        <p>A presentation of the whole IIS*CDesLang syntax is out of scope of this paper.
However, in the following example, we illustrate a form type created in an IIS*Case
project named FacultyIS, and the corresponding IIS*CDesLang program. Figure 1
presents a form type defined in the child application system Student Service of a
parent application system Faculty Organization. It refers to information about
student's grades (STG). It has two component types: STUDENT representing
instances of students, and GRADES, representing instances of grades for each
student. By the form type STG, we allow having students with zero or more grades.
Component type attributes are presented in italic letters. StudentId is the key of the
component type STUDENT, while CourseShortName is the key of GRADES. By
this, each grade is uniquely identified by CourseShortName within the scope of a
given student. Allowed database operation for STUDENT is only read (shown in a
small rectangle on the top of the rectangle representing the component type), while
the allowed database operations for GRADES are read, insert, modify and delete.</p>
        <p>Figure 2 presents a fragment of IIS*CDesLang program that corresponds to the
form type specification from Figure 1.</p>
      </sec>
      <sec id="sec-4-3">
        <title>APPLICATION SYSTEM</title>
        <sec id="sec-4-3-1">
          <title>Student Service</title>
        </sec>
      </sec>
      <sec id="sec-4-4">
        <title>PARENT APPLICATION</title>
      </sec>
      <sec id="sec-4-5">
        <title>SYSTEM</title>
        <sec id="sec-4-5-1">
          <title>Faculty Organization</title>
        </sec>
      </sec>
      <sec id="sec-4-6">
        <title>STG - STUDENT GRADES</title>
      </sec>
      <sec id="sec-4-7">
        <title>STUDENT</title>
      </sec>
      <sec id="sec-4-8">
        <title>GRADES</title>
        <sec id="sec-4-8-1">
          <title>StudentId, StudentName, Year</title>
        </sec>
        <sec id="sec-4-8-2">
          <title>CourseShortName, Date, Grade r r, i, m, d</title>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5 The Attribute Grammar Specification of IIS*CDesLang</title>
      <p>In this section, we discuss how VisualLISA (whose principles and functionalities
were introduced in section 3) is used to create IIS*CDesLang. Due to space
limitations, we only present a small set of productions and semantic calculations, just
to show how we use the visual editor to model the language. Before that we present a
short description of VisualLISA look and feel, and main usage.</p>
      <p>Figure 3 shows the editor look and feel; it exhibits its main screen with four
subwindows. To specify an attribute grammar a user starts by declaring the productions
(in rootView – bottom-left sub-window) and rigging them up by dragging the symbols
from the dock to the editing area (in prodsView – upper-left sub-window), as
commonly done in VPEs. The composition of the symbols is almost automatic, since
the editing is syntax-directed. When the production is specified, and the attributes are
attached to the symbols, the next step is to define the attribute evaluation rules. Once
again, the user drags the symbols from the dock, in rulesView (upper-right
subwindow), to the editing area. To draw the computations links should connect some of
the (input) attributes to an (output) attribute using functions. Functions can be
predefined, but sometimes it is necessary to resort to user-defined functions that should
be described in defsView (bottom-right sub-window). In this sub-window it is also
possible to import packages, define new data-types or define global lexemes.</p>
      <p>In this example of how we use VisualLISA to rapidly develop a formal
specification for IIS*CDesLang, we will show how the following condition is
formalized and verified using the visual editor: “The application types associated to
an application system should be previously defined”.</p>
      <p>Figure 4 shows the first production of IIS*CDesLang (the one having the grammar
axiom as the tree root). As can be observed the root (Project) derives in three other
non-terminal symbols (ApplicationTypes, ApplicationSystems, and Fundamentals)
and two terminals. Apart from that structural description, the production shown in
Figure 4.a states that the attribute verify of the root symbol has the same value as the
synthesized attribute verify (green triangle) of the non-terminal ApplicationSystems.
In Figure 4.b it is presented a detail of the same production, specifying that the
inherited attribute setof_types (red inverted-triangle) of non-terminal ApplicationSystems,
inherits the value of the attribute setof_types of the non-terminal ApplicationTypes.</p>
      <p>In Figure 5, we present how the attribute setof_types of the non-terminal
AplicationTypes, is computed. First notice that the production for this non-terminal has two
options: (i) a non-recursive one, where AplicationTypes derives only one
AplicationType (Figure 5.a) and (ii) a recursive case, where the left-hand side (LHS)
non-terminal derives into an AplicationType and recursively calls itself.</p>
      <p>In this production, we are interested in collecting the application type names that
can be associated to the application systems, as explained before. To describe this in
VisualLISA we created a function that adds a string to a list, and this function is used
to collect the types that are synthesized from each non-terminal ApplicationType. The
blue explosion symbol denotes the function, the dashed-arrows define the arguments
of these functions, and the straight blue arrows denote to which attribute the output of
the function is assigned. The numbers in the dashed-arrows indicate the order of the
arguments in the function, which are then used as ‘$i’ in the function body.</p>
      <p>Recall Figure 4.b, where an inherited attribute is assigned the value of the attribute
we just compute in Figure 5. The reason why we need to inherit this attribute is in the
fact that we must check whether the type of each application system is in this list.
Otherwise the language is not correct according to the contextual condition that we try
to verify in this example. Figure 6 presents the recursive option of the production with
the ApplicationSystems as LHS symbol.
(b)
(b)</p>
      <p>From each application system we synthesize its application type (attribute
app_type). Then, we use the inherited attribute setof_types and the value that results
from applying this computation to the rest of the application systems in the language,
to inject these three arguments in a function that tests if the setof_types ($1 in the
operation description of Figure 6) contains the value of the synthesized attribute
app_type ($2 in the operation description). As this operation returns a boolean value,
we check using the logic and operation, if this value and the value of the attribute
verify ($3 in the operation description) are both true. The output of the function is also
a Boolean and is assigned to attribute verify of the LHS symbol.</p>
      <p>The non-recursive option of this production is similar, but the computation of the
final attribute is only based on the list of types and the type that comes from the</p>
      <sec id="sec-5-1">
        <title>ApplicationType symbol.</title>
        <p>Although the drawings presented in Figures 4 to 6 have been formally constructed,
for those that read the visual grammar it is not necessary to know if attributes are
synthesized or inherited, neither the way evaluation rules are built – it is enough to
understand the way they are connected to understand the new language semantics.
The remaining parts of the formalization follows the same structure as the one
presented in this section.</p>
        <p>With VisuaLISA we defined a model of IIS*CDesLang PIM concepts. This model
can be turned into a valid attribute grammar, and in a straightforward step, we have
not only a new language, but also a compiler for the language.
6</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>Attribute Grammars (AG) are widely used to specify the syntax (by the underlying
Context Free Grammar) and the semantics (by the set of attributes and theirs
computation rules and contextual conditions) of computer languages. This formalism
is well defined and so its usage is completely disciplined; but, more than that, it has
the unique property of supporting the specification of syntax and semantics under the
same framework. Moreover, an AG can be automatically transformed into a program
to process the sentences of the language it defines. AG can also be used to give
semantics to other systems, if we look them following that grammar approach.</p>
      <p>The research presented in this paper resulted from the collaborative research
project between Serbia and Portugal. To formally describe the Integrated Information
Systems CASE Tool (IIS*Case) – a model driven software tool that provides IS
modeling and prototype generation developed at University of Novi Sad – we define a
DSL, named IIS*CDesLang, that encompasses problem domain concepts and rules
that are applied in the conceptual IS design provided by IIS*Case. In the paper, we
present such a meta-language resorting to a visual programming environment for
attribute grammar specifications, named VisualLISA, developed at University of
Minho. VisualLISA makes the process of AG development easier and safer; it allows
the drawing of the AG productions (grammar rules) in the form of attributed trees
decorated with attribute evaluation rules. These visual productions are syntactically
and semantically checked for correctness.</p>
      <p>As future work, we plan to complete the specification to cover all the IIS*Case and
then use the compiler generator system LISA to produce a compiler for IIS*DesLang.
On the basis of the grammar specifications and the problem domain knowledge, it is
also possible to design tools providing some semantic analyses of the designed
specifications and further assist designers in raising the quality of their work. Two
characteristic examples are domain compatibility analysis and check constraint
equivalence analysis. Finally, we plan to embed a textual editor for IIS*DesLang into
IIS*Case and couple the language and generated compiler with IIS*Case repository.
Acknowledgments. A part of the research presented in this paper was supported by
Ministry of Science and Technological Development of Republic of Serbia, Grant</p>
      <sec id="sec-6-1">
        <title>TR-13029, Title: A Development of an Intelligent Environment for the Design and</title>
      </sec>
      <sec id="sec-6-2">
        <title>Implementation of Information Systems.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Aleksić</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luković</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mogin</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Govedarica</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A Generator of SQL Schema Specifications</article-title>
          .
          <source>Computer Science and Information Systems (ComSIS)</source>
          ,
          <source>Consortium of Faculties of Serbia and Montenegro</source>
          , Novi Sad, Serbia, ISSN:
          <fpage>1820</fpage>
          -
          <lpage>0214</lpage>
          , Vol.
          <volume>4</volume>
          , No.
          <volume>2</volume>
          ,
          <fpage>79</fpage>
          -
          <lpage>98</lpage>
          . (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Banović</surname>
            <given-names>J.:</given-names>
          </string-name>
          <article-title>An Approach to Generating Executable Software Specifications of an Information System</article-title>
          .
          <source>Ph.D. Thesis (currently in final stage)</source>
          . University of Novi Sad. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Deursen</surname>
            <given-names>van</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Klint</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Visser</surname>
          </string-name>
          , J.:
          <string-name>
            <surname>Domain-Specific Languages</surname>
          </string-name>
          :
          <article-title>An Annotated Bibliography</article-title>
          .
          <source>ACM SIGPLAN Notices</source>
          ,
          <article-title>Association for Computing Machinery</article-title>
          , USA, Vol.
          <volume>35</volume>
          , No.
          <volume>6</volume>
          ,
          <fpage>26</fpage>
          -
          <lpage>36</lpage>
          . (
          <year>2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>João</surname>
            , Mernik,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cruz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rangel</surname>
            <given-names>Henriques</given-names>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          :
          <article-title>Program Comprehension for Domain-Specific Languages</article-title>
          .
          <source>Computer Science and Information Systems (ComSIS)</source>
          ,
          <source>ISSN:1820-0214</source>
          , Vol.
          <volume>5</volume>
          , No.
          <issue>2</issue>
          ,
          <fpage>1</fpage>
          -
          <lpage>17</lpage>
          . (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Luković</surname>
            <given-names>I.</given-names>
          </string-name>
          :
          <article-title>From the Synthesis Algorithm to the Model Driven Transformations in Database Design"</article-title>
          ,
          <source>In: Proceedings of 10th International Scientific Conference on Informatics (Informatics</source>
          <year>2009</year>
          ), Herlany, Slovakia,
          <source>ISBN 978-80-8086-126-1</source>
          ,
          <fpage>9</fpage>
          -
          <lpage>18</lpage>
          (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Luković</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mogin</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pavićević</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ristić</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>An Approach to Developing Complex Database Schemas Using Form Types</article-title>
          .
          <source>Software: Practice and Experience</source>
          , John Wiley &amp; Sons Inc, Hoboken, USA, DOI: 10.1002/spe.820, Vol.
          <volume>37</volume>
          , No.
          <volume>15</volume>
          ,
          <fpage>1621</fpage>
          -
          <lpage>1656</lpage>
          . (
          <year>2007</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Luković</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ristić</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Aleksic</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Popović</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>An Application of the MDSE Principles in IIS*Case</article-title>
          .
          <source>In: Proceedings of III Workshop on Model Driven Software Engineering (MDSE</source>
          <year>2008</year>
          ), Berlin, Germany, TFH, University of Applied Sciences Berlin,
          <fpage>53</fpage>
          -
          <lpage>62</lpage>
          . (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Luković</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ristić</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mogin</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pavicević</surname>
            ,
            <given-names>J.: Database</given-names>
          </string-name>
          <string-name>
            <surname>Schema Integration Process - A Methodology</surname>
          </string-name>
          and
          <article-title>Aspects of Its Applying</article-title>
          .
          <source>Novi Sad Journal of Mathematics</source>
          , Serbia, ISSN:
          <fpage>1450</fpage>
          -
          <lpage>5444</lpage>
          , Vol.
          <volume>36</volume>
          , No.
          <volume>1</volume>
          ,
          <fpage>115</fpage>
          -
          <lpage>150</lpage>
          . (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Mernik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Heering</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sloane</surname>
            ,
            <given-names>M. A.</given-names>
          </string-name>
          :
          <article-title>When and How to Develop Domain-Specific Languages. ACM Computing Surveys (CSUR), Association for Computing Machinery</article-title>
          , USA, Vol.
          <volume>37</volume>
          , No.
          <volume>4</volume>
          ,
          <fpage>316</fpage>
          -
          <lpage>344</lpage>
          . (
          <year>2005</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Rangel</surname>
            <given-names>Henriques</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            ,
            <surname>Pereira</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>João</surname>
          </string-name>
          , Mernik,
          <string-name>
            <given-names>M.</given-names>
            ,
            <surname>Lenič</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          :
          <article-title>Automatic Generation of Language-based Tools</article-title>
          . Workshop on Language, Descriptions, Tools and Applications under ETAPS'
          <volume>02</volume>
          (
          <issue>LDTA2002</issue>
          ), Grenoble, France,
          <year>April 2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>João</surname>
            , Mernik,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cruz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rangel</surname>
            <given-names>Henriques</given-names>
          </string-name>
          ,
          <string-name>
            <surname>P.:</surname>
          </string-name>
          <article-title>VisualLISA: a Visual Interface for an Attribute Grammar based Compiler-Compiler</article-title>
          ,
          <source>In proceedings of 2nd Conference on Compilers, Related Technologies and Applications (CoRTA08)</source>
          , IPB, Bragança,
          <year>July 2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>N. Rangel</given-names>
          </string-name>
          <string-name>
            <surname>Henriques</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Cruz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <article-title>João: XAGra - An XML Dialect for Attribute Grammars</article-title>
          ,
          <source>In Proceedings of Conferene on XML and Associated Technologies and Applications</source>
          (XATA09) under INForum'
          <fpage>09</fpage>
          - Simpósio de Informática, FCT-UL. (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Oliveira</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Pereira</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>João</surname>
            , Rangel Henriques,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Cruz</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Kramer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>VisualLISA: A Visual Environment to Develop Attribute Grammars</article-title>
          .
          <source>Computer Science an Information Systems Journal</source>
          , Special Issue on Compilers,
          <source>Related Technologies and Applications</source>
          (ComSIS), Lukovic,
          <string-name>
            <given-names>I.</given-names>
            and
            <surname>Leitão</surname>
          </string-name>
          <string-name>
            <given-names>A</given-names>
            ,
            <surname>Slivnik</surname>
          </string-name>
          <string-name>
            <surname>B.</surname>
          </string-name>
          (Guest Eds.), ISSN:
          <fpage>1820</fpage>
          -
          <lpage>0214</lpage>
          , Vol.
          <volume>7</volume>
          , No.
          <volume>2</volume>
          ,
          <fpage>265</fpage>
          -
          <lpage>289</lpage>
          . (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Mernik</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lenič</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Avdičaušević</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Žumer</surname>
          </string-name>
          , V.:
          <article-title>LISA: An Interactive Environment for Programming Language Development</article-title>
          .
          <source>Compiler Contruction</source>
          ,
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          . (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Knuth</surname>
            ,
            <given-names>D. E.</given-names>
          </string-name>
          :
          <article-title>Semantics of Context-free Languages</article-title>
          .
          <source>Theory of Computing Systems</source>
          , Vol
          <volume>2</volume>
          , No.
          <volume>2</volume>
          ,
          <fpage>127</fpage>
          -
          <lpage>145</lpage>
          . (
          <year>1968</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Krahn</surname>
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rumpe</surname>
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Völkel</surname>
            <given-names>S.:</given-names>
          </string-name>
          <article-title>Roles in Software Development using Domain Specific Modelling Languages</article-title>
          ,
          <source>In Proceedings of 6th OOPSLA Workshop on Domain-Specific Modeling</source>
          , Portland, USA,
          <fpage>150</fpage>
          -
          <lpage>158</lpage>
          . (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Jouault</surname>
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bézivin</surname>
            <given-names>J.:</given-names>
          </string-name>
          <article-title>KM3: a DSL for Metamodel Specification</article-title>
          ,
          <source>In Proceedings of 8th IFIP International Conference on Formal Methods for Open Object-Based Distributed Systems</source>
          , Bologna, Italy, Springer LNCS 4037,
          <fpage>171</fpage>
          -
          <lpage>185</lpage>
          . (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Meta-Object Facilty</surname>
          </string-name>
          : http://www.omg.org/mof/
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>19. The Generic Modeling Environment: http://www.isis.vanderbilt.edu/Projects/gme/</mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>20. MetaCase Metaedit+: http://www.metacase.com/</mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>21. Eclipse Modeling Framework: http://www.eclipse.org/modeling/emf/</mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>