NAME

        COGITO - parses valid OCL constraints based on OCL 1.3 and
	generates a Symbol Table based on the constraints and
	UML data provided


SYNOPSIS

        cogito < <ocl constraint>


DESCRIPTION

	COGITO       

       	parses OCL constraints passed in as ASCII code and generates an
       	abstract syntax tree containing the information from the 
	constraints. In addition, a Symbol Table containing the data
	from the constraints and UML data from file data.txt os created


OPTIONS

        none


MAKEFILE OPTIONS
	
	make cogito
		produces cogito.exe from the provided files

	make clean
		removes all files generated


EXAMPLE

        ./cogito < c2f.txt

              Parses the OCL constraints of file c2f.txt and generates
	      a Symbol Table


SYMBOL TABLE
	
	The Symbol Table for COGITO contains the name of the symbol as string,
	the OCL type of the symbol as string, the owner of the symbol
	as string, and an unisigned integer array of the location of
	the symbol in the AST. Global classes that are symbols
	have "Global Component" as the owner.  Variables inside
	of classes are owner by the class and have the name of
	the class as the owner


DATA FILE

	COGITO takes in UML data from the data file titled "data.txt".
	This file contains the names of all variables and classes included
	int the OCL constraint in the following format:

	Types:
  	  NameOfClass.NameOfVariable TypeOfVariable
          NameOfClass2.NameOfVariable2 TypeOfVariable2

	example:
	
		Types:
 		  F.f int
		  C.c int

		for constraints

		context F inv:
  			self.f = (C.c * 1.8) + 32
  

ERROR MESSAGES

	COGITO outputs an error if it cannot parse given input

	example:	

		1: syntax error, unexpected t_DIVIDE, expecting t_CONTEXT at /

	COGITO outputs errors if it cannot open the data file or of the data file
	is of incorrect format. For correct data file format please see above
	

STATUS

	Currently, COGITO is able to parse any valid OCL 1.3 constraint and
	generate a valid Symbol Table based on the data in the constraint and 
	the data file. COGITO is used to generate files for the DYNAMO project
	and can therefore be used in any project6 that requires a Symbol Table
	to be generated from and OCL constraint


FUTURE WORK

	COGITO is used in the DYNAMO project to generate C++ wrapper files based
	upon the OCL constraints provided. Please see the DYNAMO project for 
	further specifications


AUTHOR

        Written by Jonathan Gdalevich using the poclc OCL parser from Jude 
	Nagurney with changes by Jonathan Gdalevich (lordebon@cc.gatech.edu)


BUGS

        The parser only supports OCL 1.3


GLOSSARY

        pwan -  project without a name, the original project 
		for which this program was built.

        OCL -   Object Constraint Language, part of UNL since UML 1.1. 
		It is used to represent constraints in class diagrams.  
		See http://www.klasse.nl/ocl/ or the OCL manual at www.omg.org 
		for further details. 

	AST -   abstract syntax tree, data structure representing something 
	      	which has been parsed. In poclc, the AST is used to 
		represent parsed OCL constraints. 

	flex -  lexical analyser generator that generates C lexical analyzer.

	bison - free parser generator computer program written for the GNU project,
		and available for virtually all common operating systems. It is 
		mostly compatible with yacc, and offers several improvements over
		the earlier program. It is commonly used in conjunction with flex. 
		(from Wikipedia)


COPYRIGHT

	Copyright (C) 2005 Jonathan Gdalevich (lordebon@cc.gatech.edu) and
	Jude Nagurney

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2, or (at your option)
	any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 

	The original author can be contacted at ocl_parser@pwan.org, 
	Jude Nagurney, 1001 North Randolph Street, #622, Arlington, 
	VA, 22201-5607, USA.

                         March 21, 2005

