Index


1.0 Introduction

Top

The GAEMY preprocessor creates a new mutation of the Yacc grammar metaprogram by translating the pure grammar into an augmented grammar containing action predicates consisting of calls to action functions. Then it creates the action function template (stubs) files corresponding to those calls, and stores them into a newly created archive tree.

This "current" archive tree, maintained in the GAEMY home tree, becomes the head of the archive assembly line of such date-stamped trees, and is paired which the permanent baseline tree in the home directory of the GAEMY-produced translator source, which is maintained under version control via Subversion. All permanent results of semantic surgery editing are stored in this baseline tree.

Note: Variables are denoted below with leading '$' as per Perl usage. They are populated by the GAEMY Project GUI (GAEMYP) which controls editing of the pure Yacc grammer ($infile) and invokes this preprocessor as one of its Perl scripts. As part of its processing, this script generates and builds the $project-data specific "current" GUI (GAEMYC), which controls surgical editing via project-specific menus.

1.1 Configuration File: in_home_out in $project directory

$infile:
Input - pure Yacc canonical grammar file (in $project directory)
$ghome:
Home directory of output grammar and baseline action tree where make will access them for Yacc processing
$yfile:
Output (augmented) grammar to reside in $ghome

1.2 Mutation Stage of Evolution Processing

Each time this script is invoked, it creates a mutation in the evolution of the application translator source code, resulting from a change to the pure Yacc (BNF) grammar input file $infile. It reads the $infile grammar (which must be in Yacc cononical form, where each grammar subrule must be on a separate line) and creates an augmented grammar ($yfile) with action predicates in the forms of function calls. This file represents a system architecture mutation of the final translator, and will not change until replaced by a new mutation.

1.2.1 Surgical Evolution of Mutation Action Code

This script adds a new archive tree for the new grammar mutation to the archive-trees assembly line, and updates the baseline tree resident in $ghome, to set up the surgical evolution of the action code design.

Baseline source trees and archive-trees contain action function stubs in c-module files and header files containing function prototypes and macros. The generated action function stub output mirrors the parsed input for the parse sub-rule it is the semantic action of.

1.2.2 Surgery Tools

At any mutation stage of evolution, GAEMY generates the following subsystems to aid in the surgical phase of evolution:

Website:
A generated website with nonterminal symbol links for execution-flow navigation of the pure Yacc grammar, its action-predicate enhanced augmented grammar, and all of the semantic action functions called \E in the action predicates;
GUI:
A generated GUI (GAEMYC) for preloaded gang editing and comparative-meld editing with a choice of editors and checkbox menus to select grammar and action semantic files. The assembly-line archives are employed as repositories for automatically loaded comparative-meld editing to simplify reconciliation of regenerated action-stubs caused by pure-grammar (mutation) changes to prior (surgically) modified action functions.

2.0 GAEMY 1 Home Tree Architecture:

Top

$HOME/GAEMY GAEMY home root.
Subdirectories:
/Projects
Assembly-Lines root directory, contains project trees organized as follows:
/$project
project assembly-line of archive trees:
/$project_yymmdd[A-Z]
Date-stamped archive tree containing:
/semantics
Container for all action semantic function module files generated by the GAEMY preprocessor, each module file corresponding to a Yacc grammar rule.

/SurgeryWeb
Container of the Yacc code website for this archive, containing an html file for the augmented grammar, each of its rules, and each semantic action function module in the semantics subdirectory.
/actionfiles
Container for html files corresponding to surgically modified versions of the action semantics function module files corresponding to each grammar rule.

/actionstubs
Container for html files corresponding to the preprocessor generated stub versions of the action semantics function module files corresponding to each grammar rule.

/treeview
Javascript and html files for the menu of this website
/bin    
Executable Perl scripts

/doc    
Documentation

/EDITS
Current directory for active editing

/GAEMYC
Current archive semantic surgery menu GUI, adaptive to current project grammar rules and semantic files.
/GUIbuild
Output directory for EverGlade generated GAEMYC GUI source code (staging directory for make), contains EverGlade meta-source module and C-source files produced from it for building gaemyc GUI executable.
/archive
Repository of GUIbuild content preceding initial make trial, as baseline for meld comparison of final changes made during make cycle.
/GAEMYP
Project grammar editing and preprocessor run GUI
/GUIbuild
Output directory for EverGlade generated GAEMYP GUI source code (staging directory for make), contains EverGlade meta-source module and C-source files produced from it for building gaemyp GUI executable.
/archive
Repository of GUIbuild content preceding initial make trial, as baseline for meld comparison of final changes made during make cycle.
/Treeview
JavaScript menu root

3.0 GAEMY 1 Project Architecture

Top

The following project tree is updated and created in each project directory:

$HOME/$project
Project root directory maintained under version control as a subversion working directory
/$project_action
Baseline tree accessed by make and subversion (updated, never replicated)
$project.y
Augmented grammar file (replaced in this directory)
$project_actmacros.h
Action macros header file (replaced in this directory)
$project_actprotos.h
Action prototypes header file (replaced in this directory)

/semantics
Baseline subdirectory containing action function module .c files (This is the only subdirectory where manual editing takes place.)

4.0 GAEMY 2 Home Tree Architecture

Top

$HOME/GAEMY GAEMY home root.
Subdirectories:
/Projects
projects container
/$project1
container for project named $project1
/YSG
container for $project1 grammar partition files

/$assembly1
container for $assembly1 assembly-line of archive trees:
/$assembly1_yymmdd[A-Z]
Date-stamped archive tree containing:
/YSG
container for $assembly1 grammar partition files

/semantics
Container for all action semantic function module files generated by the GAEMY preprocessor, each module file corresponding to a Yacc grammar rule.

/SurgeryWeb
Container of the Yacc code website for this archive, containing an html file for the augmented grammar, each of its rules, and each semantic action function module in the semantics subdirectory.
/actionfiles
Container for html files corresponding to surgically modified versions of the action semantics function module files corresponding to each grammar rule.

/actionstubs
Container for html files corresponding to the preprocessor generated stub versions of the action semantics function module files corresponding to each grammar rule.

/treeview
Javascript and html files for the menu of this website
/bin
Executable Perl scripts

/doc
Documentation

/EDITS
Current directory for active editing

/GAEMYC
Current archive semantic surgery menu GUI, adaptive to current project grammar rules and semantic files.
/GUIbuild:
Output directory for EverGlade generated GAEMYC GUI source code (staging directory for make), contains EverGlade meta-source module and C-source files produced from it for building gaemyc GUI executable.
/archive
Repository of GUIbuild content preceding initial make trial, as baseline for meld comparison of final changes made during make cycle.
/GAEMYP
Project grammar editing and preprocessor run GUI
/GUIbuild:
Output directory for EverGlade generated GAEMYP GUI source code (staging directory for make), contains EverGlade meta-source module and C-source files produced from it for building gaemyp GUI executable.
/archive
Repository of GUIbuild content preceding initial make trial, as baseline for meld comparison of final changes made during make cycle.

5.0 GAEMY 2 Project Architecture

Top

6.0 Preprocessor Options

Top

GAEMY mutation processing options are specified by the radio buttons so labeled, either "incremental", "comprehensive", or "initialization".

6.1 Default: Incremental Updating

The default mode regenerates the complete action architecture to accommodate an incremental change in the grammar. In this mode the program compares each file in the baseline semantics (project_action/semantics) directory to see if it matches the generated version. If not the file in the baseline directory is copied to the current archive semantics directory, instead of the generated version, presuming that it has been manually updated;

6.2 Comprehensive Updating

This option is used for replacing all un-edited (generated) files in the baseline semantics (project_action/semantics) subdirectory with newly generated files, which are also written to the newly created archive semantics subdirectory. All edited files from the baseline semantics are copied to the datestamped archive so that the archive can be used to reconcile the altered stubs of the baseline for that update. To achieve this, a generated-time in epoch seconds is stored in each archive subdirectory in a file called gentimes.dat, along with the names of all files generated at that time. Later when this option is invoked, that file is accessed, and all formerly generated files listed in the gentime file are stat'd to get their last modify times. If modify time for a give file is greater than the epoch-seconds taken from the gentime file then that file has been edited, consequently, it is not replaced in baseline, but is copied from the baseline to the newly generated archive.

6.3 Initialization

This option is used for a full generation of a new standalone datestamped archive (project_yymmdd[A-Z]) and its action module stub files in its semantics subdirectory without any comparison to youtfile_action files. This option also creates a new baseline, with identical semantical as the initial archive.