[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNU-COBOL] Ramblings: You asked for it.





The following email, is random, incoherent thoughts.
Nothing specific. Dont assume this is a commandment from Satan,
like you are the rest of my emails. ;) 
*for those that dont know : the last sentence is a poke at Laura*

Anyways, this is the first installment of my ramblings. An attempt
to get what I am thinking out to others or more specifically out of my
head and on to paper.
Its not really meant to be read, in fact it may be hazardous to read.
Nothing in here is final and its open to discussion inso far as what is
here is the totality of the information available. Do NOT assume or
attempt to inferior anything from any of this.

I wont be held responsible for the consequences.

This goes for all subsequence ramblings, that are marked as such. I wont
put this disclaimer on all of them.

jferg- you can put these on the web pages if you like. =)

I just typed this in, I didnt read it and only very half heartedly
tired to clarify.

Is that enough warnings?

Chad


===========================================================

Below are the ideas I have had about the structure of the Cobol runtime system.

Recently I made an interesting observation about the relationship
between OO frameworks and language development. It was interesting only
to me, as I had not made the connection before. =)

To understand the relationship you'd have to one understand how languages 
are developed. and two how OO frameworks are evolved. Put the two together
and you have a new way to look at language and framework development.

So instead of building a Cobol2c code generator with runtime support.
We'll be building a Cobol application framework with code generator support.

Its subtle, but I think an important distinction.

Also we are looking to approach the compiler using the 
blackboard arch. pattern as opposed to the traditional pipes and filter
approach. initcially, there will be no difference in the writing of the code.
As with the above framework, its a way to look at the problem, that is
more helpful. its not so much a method of implementation.
understand the difference I am shooting for. if you dont I'll clarify.

On to how this effects the code.
one..most of the code of the system(read runtime system) will be in 
the framework.
The code generator will basically choose the components from the framework
and glue them together for each Cobol program.  

<chad talking to himself again>
If I hear the word efficiency uttered. I will kill! It'll work just fine, 
trust me! =)
</chad talking to himself again>

Furthermore, Cobol has no concept of dynamic memory. The framework will help
garrentee this is continued.

The alphabet thing...
The key is that you can modify the alphabet that is used to 
determine collate sequence.
well this is no problem we will have a default library "collate" function 
that will use the default alphabet(read std: native). if the alphabet 
is modified a new collate function will be generated and linked to the 
final executable instead of the default one. 
The new function will understand the modified alphabet and 
convert it under the covers to the main manipulation alphabet of the program.
ie ASCII.

-- Below are some random notes that I wrote down while reading parts of
-- standard. one thing we might try to do is setup an annotated web page
-- where we make comments, clarifications, assumptions, pass on knowledge 
-- about our interpretation of the std. 

Certain things are configuratable at certain times. in the whole process
of our program. Hers is alist of the times.

Compiler compile time.  -- compiler build time
Runtime(need a better word) lib/framework compile time. - runtime build time.

Compiler runtime. (run by use to compile program) -- compile time.

Program(user) runtime.  -- prog execution time
Runtime lib/framework runtime. -- runtime library execution time.

-- I guess a glossary of shared terms and terminology.
-- so we can be more expressive in our email without having to 
-- clarify every point, every time.
-- note: need to lookup web pages with arch. patterns on it.
-- somebody remind me, if i forget.

=======================

Debug, Printing, Compiling, Linking, Running.
listing
debug command

     Cobol
    /    \
   |      \
 .h, .c    libs
  |
 .o
  |
 .a 

template main....

=======================

input validation, input/output

read_rec(ptr number, ptr string)
read_first_field(length x)
validate(1st field(ptr))               cobol
stick into struct                      structure validation
 vaild(struct)      

   -------------------
   |                 |    ascii IO
   -------------------
   |                 |    stdio   
   -------------------

=====================================

sequential IO
fixed length ascii field & record
reads & writes

<assume newline record separator>
-read & write field
-read & write multi fields/record
-read & write multi recs
-change rec separator char.
-compile runtime  <something I cant read or understand here>
   emit specific fucntiuon to return (sep char)  
   yyeof();
  I think this has to do with dynamically figure out what the separator char
  is at "compile time" and have the runtime use a specific functions to 
  figure it out...but not sure.

Record separator
fixed length.
variable records w/ a record separator function.
in file structure.

seq i/o error module - defined by the std.


-- 
Chad Slaughter  -- slaught at umr.edu
<PGP public key available upon request>

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to gnu-cobol@acm.cs.umr.edu with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@acm.cs.umr.edu.