This file contains a demonstration of the use of the import and export
facilities for FC2 in the PSF-Toolkit. FC2 is the common file format
for exchanging specifications in the CONCUR2 project.

First consider the following PSF specification of the process System,
which is a merge of two one-bit buffers and the process TBB which is a
specification of a two-bit buffer. The intention is that they have the
same behaviour.

In this demonstration we will compile this specification into the FC2
format in order to be analysed with the other CONCUR2 tools. Then the
FC2 file is compiled back to TIL, the PSF-Toolkit intermediate file
format, in order to show how FC2 files can be analyzed using the PSF
tools.

process module buf
begin
  exports
    begin
      atoms
        r1,s2,r2,s3,c2
      processes
        System
        TBB
    end
  processes
    Buffer1, Buffer2     -- two One Bit Buffers
    TBB', TBB''          -- one Two Bit Buffer
  sets of atoms
    H = {s2,r2}
    I = {c2}
  communications
    s2 | r2 = c2
  definitions
    Buffer1 = r1 . s2 . Buffer1
    Buffer2 = r2 . s3 . Buffer2
    System = hide(I, encaps(H, Buffer1 || Buffer2))

    TBB = r1 . TBB' 
    TBB' = s3 . TBB + r1 . TBB''
    TBB'' = s3 . TBB'
end buf


1) Save the specification above in the file "buf".
2) Compile the specification into the TIL-format. This creates the
   file "buf.til".

example% psf buf

3) Compile the TIL file into a labeled transition system in
   TIL-format. This creates the file "buf.lts".

example% trans buf.til

4) Compile the labeled transition system into FC2 format. This creates
   the file "buf.fc".

example% lts_fc buf.lts > buf.fc

5) Perform your analysis with other tools that require the FC2 format.

example% ...

6) Consider the file "buf.fc" as a file created by some FC2 generating
   tool. Compile it to TIL format.

example% fc_lts buf.fc > new.lts

7) View and analyse the specification with the PSF-Toolkit.

example% til_psf -u new.lts
example% sim new.lts
example% equiv -d -t System TBB < new.lts --This gives problems!
