Introduction to Grok Scripts

By Ric Holt - Last updated November 6, 1997

The Grok language and processor are introduced in a separate document. Grok is a tool that can help you manipulate facts, such as those generated using cfx and fbgen, i.e., tuples of the form:

        relation source target
For example, this tuple means that procedure P calls procedure Q:
        call P Q
This form of tuple is called RSF (for Rigi Standard Form).

Grok can be used to do these three things for you:

  1. Read facts and sets
  2. Create new facts and sets
  3. Write fact bases and sets

Basic Grok Scripts used for Creating Landscapes

We will describe three basic Grok scripts that can be used in creating landscapes. You can, of course, modify these scripts or write your own scripts.

Shell Scripts to Run Grok Scripts

The grok script distribution contains shell scripts which handle the execution of grok to generate landscape TA. In particular, the shell script fact2ta runs these steps:

  1. fileLevelFacts.grok creates file fileLevelFacts.rsf.
  2. createHighLevel.grok creates files usevar.rsf, useproc.rsf and implementby.rsf.
  3. makeSStupFiles (a shell script) which runs createSSgraph.grok repeatedly for each subsystem to create the .tup TA files.

Also supplied are two other shell scripts: