ProLinga-Validate Project

ProLinga-Validate is a tool that parses, validates and transforms ProLinga 4GL logic into an XML document. This result XML document, called a RunControl, is used at run-time by the ProLinga-Run binaries. It can further validate the physical presence of Objects, there where Objects are used as member Objects. For instance, if a record contains a Data Dictionary called order_no, ProLinga-Validate can check if this Data Dictionary exists in a specified application Repository.

ProLinga-Validate works according the Request-Response mechanism. A request can be for instance to validate 4GL Logic called "Main". ProLinga-Validate will send out a request to get the logic from the ProLinga-Repository, transforms it into an XML document, validates the data references, writes the transformed results back as a response to the remote repository and returns a response to the caller.

ProLinga-Validate can be configured as a Web Service (daemon) on the machine. A sophisticated SOAP layer on top controls the flow and processing of incoming and outgoing requests/responses over the TCP/IP network. Using this concept, programs can run locally on a machine while accessing a remote validate engine centrally located in an intranet environment or anywhere in the world via the internet.

Main purpose for the creation of this project, is to provide an easy way to transform user readable 4GL code into XML documents that can be processed by the interpreter at run-time and to provide presence checks of member Objects. The current implementation is specifically written for the ProLinga 4GL logic and ProLinga environment. Therefore it can not directly be used in other non-ProLinga related projects at the moment, however the concept and portions of code can maybe help out there. Future releases maybe more configurable using language and grammer documents etc so make it a 4GL language independent tool.

ProLinga-Validate has been built and tested on various popular GNU/Linux platforms as RedHat Fedora, Mandriva Linux, Debian, openSUSE and Ubuntu. Since all code is written in C++, it can be ported to all modern UNIX systems, Linux variants as well as MS-Windows and Mac O/S platforms.

Transformation

The 4GL logic produced by the developer-user, needs to be transformed to an XML format which can be used by the interpreter at runtime. These documents contain information about the logic commands as well about the program flow. The validate rules and formats are explained further on this page.

The validate output documents have the following format:

<?xml version="1.0"?>
<ProLinga>
  <Runner Version="1.0">
    <Statements>
      <Statement SequenceNo="seqno" NextTrue="nextstep_if_true" NextFalse="nextstep_if_false" Command="cmdno" LogicLineNo="lineno_4GL">
        <Arguments>
          <Argument>argument</Argument>
          . . .
          . . .
        </Arguments>
      </Statement>
      . . .
      . . .
    </Statements>
  </Runner>
</ProLinga>

Example:

<?xml version="1.0"?>
<ProLinga>
  <Runner Version="1.0">
    <Statements>
      <Statement SequenceNo="1" NextTrue="2" NextFalse="2" Command="2" LogicLineNo="1">
        <Arguments>
          <Argument>TITLE</Argument>
          <Argument>"Variable -  untitled"</Argument>
        </Arguments>
      </Statement>
      <Statement SequenceNo="2" NextTrue="3" NextFalse="3" Command="3" LogicLineNo="2">
        <Arguments>
          <Argument>"Created new variable."</Argument>
        </Arguments>
      </Statement>
      <Statement SequenceNo="3" NextTrue="4" NextFalse="4" Command="4" LogicLineNo="3">
        <Arguments>
          <Argument>Record</Argument>
          <Argument>Variable.Variable</Argument>
        </Arguments>
      </Statement>
      <Statement SequenceNo="4" NextTrue="5" NextFalse="5" Command="5" LogicLineNo="4">
        <Arguments>
          <Argument>F-EditCode.Variable</Argument>
          <Argument>=</Argument>
          <Argument>P-EditCode(1)</Argument>
        </Arguments>
      </Statement>
      <Statement SequenceNo="5" NextTrue="0" NextFalse="0" Command="8" LogicLineNo="5">
        <Arguments>
          <Argument>ALL</Argument>
        </Arguments>
      </Statement>
    </Statements>
  </Runner>
</ProLinga>

This document is transformed from the following 4GL logic.

SCREEN TITLE "Variable - untitled"
MESSAGE "Created new variable."
CLEAR RECORD Variable.Variable
LET F-EditCode.Variable = P-EditCode(1)
DISPLAY ALL