XRel History:
-------------

v0.12: 19/11
- final release

v0.11c: 18/11
- type inference works
- added label normalization to difference algorithm
- removed -d option, now debugging information must be required for each
  piece of code explicitly: --dpt (parse tree), --dst (symbol table),
  --hdst (heavy debug symbol table), --da (element automata), 
  --dsc (semantic checks), --drt (run-time) 
  (it remains again -a to test product and difference)
- signal semantic problems also without -v option
- add type errors and warnings for semantic checks

v0.11b: 15-17/11
- implemented, tested and debugged difference algorithm (conceived 
  in 2 days: 13-14/11)
- completely changed SemanticChecks
- added TAUnion
- refined output
- irredundancy and exhaustivity checks seem work

v0.11: 3-12/11
- product algorithm fixed (12/11)
- written, implemented, tested and debugged emptyness test (12/11)
- fixed the normalization algorithm. Here's a list of solved problems:
  - "string" in a case statement caused an internal bug
  - simple inside (document) has operator + without children!
  - mutualRec2.xre crashes the normalization algorithm
  - the pattern "Any,a[]" locks the normalizing algorithm 
  - AddrBook.xre crashes when there is ambiguity check turned on, fix it!
- "case a[]?:" was bad desugared. This was because the operator "?"
  set its pointer to the case node. Fixed
- removeGroundTypes() and desugar have been merged now
- renamed prepareInternalForm() to desugar()
- renamed desugar() to desugarExpression()
- removing of operators and ground types algorithms have been completely
  rewritten
- fixed a bug! when there was P* P was not desugared!
- added a check for desugaring
- second argument is optional now. If you omit it, only the static part will
  be executed
- changed the names of the subautomata in transitions.
  Now the subautomata names are keys for the hashing table
- created the folder to examples\tests (in examples\debug only main 
  debugging and special cases)

v0.10c: 28-30/10
- bug fix: can output/export an empty variable value
- code that exports the symbol table to an XML format has been commented out
- first attempts to build type inference / ambiguity check algorithms
- the symbol table now has a set of automata
- added a special handling of the String internal pattern (_#S)
- renamed the empty pattern to _#E (from _Empty)
- bug fix: the empty pattern now has a null parent (as the new string pattern)
- finest separation of phases
v0.10b: 17,20-23,27/10
- changed symtab.Values in symtab.expressions
- also changed Types, Patterns, Variables in types, patterns, variables
- binary trees completely removed!
- output and time computing refined: now with the "-v" option turned on
  we have each phase separately monitorized with relative times
- some bug fixes (the output of Recursion.xre was wrong because the use
  of eraseSubAnnotations() instead of eraseAnnotations())
- evaluation (output of the value) added
- tree writers changed
- now export the XML format with the "-o" option
v0.10: 13-17/10
- I work on the grammar:
  - introduced optional statement "export <T>;" (after import and 
    before typeswitch)
  - now clause bodies are sequences of ValueExpr instead of ValueTerm
  - add the "printf" statement for output in clause bodies
  - "typedef" instead of "type"
  - "clause <P>:" instead of "clause(<P>):" (removed parentheses)
  - the body is a single istruction or  { (istruction)* }
  - "default: " added to the typeswitch instruction
  - typeswitch can have 0 clauses now
- Bug fixed: in body clauses only the first value was inserted in the
  symbol table. Now I have a statement list
- Bugs fixed: 
  - out of stack when import is not included
  - loop when ";" doesn't follow import
  - a strange message error when found "type" instead of "typedef"
    (search "export" instead of "import", "typedef")
  - strange message errore when I've replaced "]" with ")"
  - "... as x as y" has a strange error message
  These bugs are disappeared when I removed the euristhics that tries to skip 
  the wrong statement searching the next ";" (the function error_skipto())
- Bug fixed: "case()" (i.e. the empty pattern) gaves a parsing error
  (I've obtained this fix as side effect when I removed parentheses in 
  the grammar :)
- ASTInteger, ASTFloat removed from the code
- refinement of Javadoc documentation
- Now it's forbidden to redefine Any (this is that I use Any for the
  implementation of the "else" clause)
- removedGroundTypes() moved back from BinaryTree to Translate
- I remove the class BinaryTree! binary trees killed!

v0.9: 6-10/10
- detect error design: variables bound in different alternative need no to
  be distinct
- detect error design: there is the need for label classes (~\{l1|..|ln} and
  String\{s1|..|sn})
- detect a problem with the difference algorithm: A = "a[_1] | b[_2]", 
  B = "a[_3]" -> A\B = "a[_1\_3] | b[_2]" but the algorithm computes
  "b[_2]": so the classical algorithm for string automata doesn't work 
  well.
  Solution: DON'T invert final states in B but set the dwell states as
  final. Only empty subtrees can delete transitions on tree automata

v0.8c: 2-3/10
- merge together xrel.analyzer and xrel.matcher
- completed the difference algorithm between automata for the top-level only. 
  The algorithm to compute A\B is:
  1) determinize B
  2) complement B (invert final states and add the dwell state)
  3) compute the product between A and the complement of B
  There is a problem in complementing B, as we don't have a finite alphabet,
  so that I need to find an algorithm that computes directly the difference
  without substeps.
v0.8b: 23/9 - 2/10
- I'm separating the static phase from the run-time phase in the code
  - xrel.matcher package created
  - PatternMatching and TreeAutomaton moved to the new package
  - I move the automata stuff from xrel.analyzer.Translate to
    xrel.matcher.PatternMatching
  - I've moved removeGroundTypes from Translate to BinaryTree because it's
    used both in static and dynamic phases (for the XML document), as the 
    other routines of BinaryTree. If I confirm this change BinaryTree should
    become Transform and Translate should become ExpandPatterns or something
    similar
- removed 3rd argument
- completed the product algorithm between automata for the top-level only.
v0.8: 15-18,22/9/03
- changed the pattern matching algorithm!!
  Now I use a depth-first algorithm instead of a breadth-first algorithm
  This solved all the bugs of the pattern matching algorithm (I hope!)
- fixed a bug: when the typeswitch was omitted pattern matching returned 
  an error
- xrel.parser.SymTable.clean_table() now cleans only types and patterns and
  no more variables: this fixed a bug
- I'm trying to write a Java version of prepareDistribution (in the source
  folder and outside xrel now there is also tools.SetDistrib with a Swing
  GUI)
- don't show the epsilon closures anymore
- removed code that exports the symbol table in an XML file
- changed the output of the program. Now the static phase and the dynamic 
  phase are clearly separated!
- xrel.analyzer.TA_State now becomes an internal class of 
  xrel.analyzer.PatternMatching (and change name to State)

v0.7c: 4,5,11/9/03
(Note that the distribution file is that of the 0.8 because I've made a 
mistake)
- completed useless_states_elimination. This resolved the pattern matching bug 
  (I don't know why)
- new option -t for execution times
- now first load the program and then load the document
v0.7b: 22,25/8/03
- begin to write code for useless_states_elimination
- I've worked on Javadoc documentation (it's almost complete)
- temporally disabled execution times
v0.7: 4-9/8/03
- cleaning of the code
  - removed DumpParseTreeVisitor from the code (it was unused)
  - symtab.ShowBindings(out) and symtab.ShowVariables(out) merged together 
    in the method symtab.ShowBoundVariables(PrintStream out,boolean debug)
  - I throw away Parser.java and Writer.java in the package xml.
    Now I first convert the DOM tree in the internal format and then I
    show it
  - made the following changes to the tree:
    1) AstAS now has one only child! The bound variable is saved on a 
       field of the class
    2) I've made the same change for ASTTypeDecl (1 only child)
    3) AstTag has one only child! The label is saved on a string field of 
       the class. 
       N.B.: if in the future there will be a more complex semantics 
       for the labels this field could become a reference to 
       an object or to a list of objects
    4) Now the pointer to the defined identifier in ASTAs and ASTTypeDecl
       is saved both as string identifier (for error handling) and as
       pointer to the SymElement object. This is to avoid to search 
       the identifier in the symbol table with name conflicts possibilities
- there was an error with columns in the linearity broken errors: fixed
- also I solved a false bug: when there is a tabulation is counted as
  8 characters (tabulations removed and replaced with spaces in the
  examples)
- I've written "prepareDistribution", a script that prepares 3 distribution 
  files: one put in public_html that contains everything, one that contains
  eveything but the Xerces files put in XRel archive file and one with only 
  binaries and examples also put in public_html (used setvar for folders).
  Before to create the zip files it creates the Jar file (I suppose that the 
  grammar is already updated).
  This script is for productivity so that I can use my own settings
  (assure that neither setvar.bat neither other files that use my settings
  go in the public binary distribution)

v0.6e: 31/07/03
- clean of the distribution files:
  - updated todo / history files
  - updated XRel.readme file
  - renamed XRel.html to XRel_grammar.html
  - created a folder "personal" inside "doc" and moved "PersonalNotes.txt",
    "Algorithms.txt" and "TreeAutomata.txt" inside it
- changed the help string of the program
- added time calculations
- changed the meaning of the options: now --verbose gives a few more
  details while --debug gives many internal details; more, to have
  full information now you must specify both
v0.6d: 30/07/03
- first pattern matching algorithm ready 
- now linearity errors are not more signaled as syntax errors: this 
  change fixed the bug of the following row
- "P1 as X | P2 as X" gave error ("identifier redeclared" for
  the second instance of X) - fixed
... (I've forgotten the many other changes)
v0.6c: 30/07/03
- automata are correctly build (build algorithm completed and debugged)
- "Any" bug fixed (when I used Any without define it the compiler gave error)
- removed the Windows script "ex.bat" from the distribution
... (I've forgotten the many other changes)
v0.6b: 24-29/07/03
- redesigned the SymbolTable. Now the tree is discarded in favour of the
  symbol table (previously I taken both).
- desugar and addPredefined moved from BinaryTree (where they were
  public) to Translate (where they're private and they're called by 
  internalizePatterns)
- P+ --> P,P* I copy references of P twice instead of duplicate
  the root of the subtree as before
v0.6a: 21-24/07/03
- I'm writing all the comments Javadoc
- I begin to build the automaton

v0.5b: 18/7/03
- I'm moving Windows scripts inside a Windows folder
- Linearity and NoRec integrated inside normal error checking 
v0.5a: 14-17/7/03
- I write a new package xrel.analyzer (it will contain the parts of 
  the compiler after the parser) with 2 classes: BynaryTree and 
  WellFormedness
- WellFormedness.disconnectedness makes a check to see that all the 
  type declarations in the program don't have top-level recursion
  (e.g. type X = a[], X | ()) 
- WellFormedness.checkLinearity checks the linearity of the patterns 
  (variables need to bind exactly once)
- BynaryTree.Convert converts the syntax tree to a binary tree, here's the
  name (it substantially changes comma and choice sequences to binary trees,
  e.g. comma[a b c] becomes comma[a comma[b c]])
- BinaryTree.Desugar desugar the tree, i.e. it makes the following 
  substitutions:
  "P?" --> "P | ()"
  "P+" --> "P,P*"
- in main code added support for options (now only -d/--debug)
- the example FirstExample.xre has been upgraded to show the new error
  checks

v0.4b: 29/6/03
- some bugs fixed with scoping
- more accurate checks on types and variables
v0.4a: 23-28/6/03
- xml-apis.jar and xercesImpl.jar of Xerces included in the
  distribution
- (Eclipse) colored syntax
- jar created, now you can execute with
  java -jar XRel.jar <arguments>
  (xml-apis.jar and xercesImpl.jar need to be in the same folder)
- now collect and show all the errors at last
- now SymTable.put_var() and SymTable.put_type() take
  2 arguments: the identifier and the value
- correctly show the token(s) with the error
- the execution stops when errors are found
- a more clean output: 
  - XML tree (written with the XDuce syntax)
  - program syntax tree (decorated with the names of the identifiers)
  - identifiers (types and variables)
  - errors
- decorate the program syntax tree
- write the XML tree as the internal syntax
- allow "~[..]" for any label
- handle lexer/parser errors
- allow literals in type declarations and patterns (Strings only)
- remove int, float from the grammar
- disallow type = variable
- allow l[] instead of l[()]
- allow values in blocks
- removed ";" after blocks ( {...} ) in cases
- I change the standard name of the output file from 
  <xre filename>_out.xml to <xre filename>_symtab.xml
  This is because its function is different now (I've introduced
  output values)
- structure of file in output is changed:
  - now it has an external tag "SymTab" and an internal "Variables"
  - <scope> tag added for each variable (document or case n, where n is the num. of case)
  - empty <value> tag added for each variable
- implemented scoping inside case statements
- created method symtab.export(String filename) to export the symbol table to a
  XML file

v0.3a: 16-18/6/03
- XML parsing integrated
- now the program takes 3 parameters: an XML file, the xre language file and an
  optional argument for the name of the output

v0.2d: 12/6/03
- removed naif variable detection inside grammar
- added SymTable, SymElement classes (I begin to implement a symbol table)
v0.2c:
7 files: XRel.jjt, XRel.java, SimpleNode.java, XRelDumpVisitor.java
         ASTLabel.java, ASTIdentifier.java, ASTOperator.java,
- tree correctly builded
- separated main from the grammar (XRel.java)
- personalize ASTLabel, ASTIdentifier
- I play with visitors
v0.2b:
3 files: Grammar.jjt, ASTLabel.java, ASTIdentifier.java
- new name: XRel
- merged type expressions and type patterns
- now labels & identifier dump its own names
v0.2a: 9-10/6/03
1 only file: Grammar.jjt
- first support for JJTree

v0.1:  5/6/03
1 only file: Grammatica.jj
- first release (it uses only JavaCC)
