\documentclass{article}

\usepackage[T1]{fontenc}

\title{AGOD -- Attributed Grammars Over Directories}
\author{José João Almeida\\{\footnotesize jj@di.uminho.pt} \and
	Alberto Manuel Simões\\{\footnotesize albie@alfarrabio.di.uminho.pt}}
\begin{document}
\maketitle

\begin{abstract}
	On this document we present a way to look to directories
structures as they were attributed grammars. This way, we can write a
grammar and check if the directory structure is correct with it. It is
even possible to make the grammar and attributed one and create
attributes all over the directory structure constructing anything we
want since a simple navigation scheme to a complete and computable
Internet site.

	To present the idea we will use an example all over the
article as it was a tutorial, showing how to use AGOD to make a full
computable Internet site.
\end{abstract}

\section{Introduction}

	We can look to a tree directory and it's files as a grammar
where directories are non terminals and files the terminal
symbols. Each directory or file has a type and, this type makes the
difference between these symbols.

	To understand better our point of view, let's look to a simple
example: we want to organize a set of books digitalised and catalogued
using XML. These books can be on different shelfs, accordingly with
it's subject. Each one can be on more than one XML file and can
contain images. So, we can organize this library using the following
directory/file structure:

\begin{verbatim}
                 ---------
                | Library |
                 ---------
            _________|__________
           |                    |
     ------------           ---------
    | Technology |         | Theater |
     ------------           ---------
                       __________|_________
                      |                    |
                  ---------       ------------------
                 | Macbeth |     | Romeo and Juliet |
                  ---------       ------------------
          ____________|________________
         |     |         |    |        |
       fileA fileB ... fileN cat   ----------
                                  | Pictures |
                                   ----------
                       ________________|____________
                      |     |     |     |     |     |
                     jpg   jpg   jpg   jpg   jpg   jpg
\end{verbatim}

	This is'nt the best way to catalogue books but it's the ideal
to illustrate the use of Attributed Grammars Over Directories
(AGOD). This structure can be translated to a grammar, and represented
like:

\begin{verbatim}
    Library :: Subject*
    Subject :: Book*
       Book :: xmlfile* cat Pictures?
   Pictures :: jpg*
\end{verbatim}

	This grammar represents non terminal symbols capitalized and
terminals are represented all lower case. So, directories names are
represented capitalized while file names will appear lowercase.

	Now, we want to make this directory/file grammar an attributed
grammar, that is, we need to populate these directories with
attributes. On this context, attributes will be files placed all over
the directory structure and starting with an underscore. The name of
the file will relate the attribute with the corresponding symbol.

\end{document}
