Atelier B
Atelier B
Administrator Manual
version 3.7
ATELIER B
Atelier B Administrator Manual
version 3.7
Document made by CLEARSY.
This document is the property of CLEARSY and shall not be copied, duplicated or
distributed, partially or totally, without prior written consent.
All products names are trademarks of their respective authors.
CLEARSY
ATELIER B maintenance
Parc de la Duranne
320 avenue Archimède
Les Pléiades III - Bât.A
13857 Aix-en-Provence Cedex 3
France
Tél 33 (0)4 42 37 12 99
Fax 33 (0)4 42 37 12 71
email : maintenance.atelierb@clearsy.com
Contents
1 Introduction
1
2 Preparing the installation
3
2.1
Resources required before installation . . . . . . . . . . . . . . . . . . . . .
3
2.1.1
Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2.1.2
Distribution Media . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2.1.3
Memory Requirements . . . . . . . . . . . . . . . . . . . . . . . . . .
3
2.1.4
Disk Space Requirements . . . . . . . . . . . . . . . . . . . . . . . .
4
2.1.5
Dynamic Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.1.6
Displaying systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.1.7
External tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
2.2
Using Atelier B on a multi-platform network
. . . . . . . . . . . . . . . . .
5
2.3
Creating the Atelier B manager account . . . . . . . . . . . . . . . . . . . .
5
2.4
Choosing the Installation Directory . . . . . . . . . . . . . . . . . . . . . . .
6
2.4.1
Users of Previous Version . . . . . . . . . . . . . . . . . . . . . . . .
6
2.4.2
Creating the Directory . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.4.3
UNIX Directory Rights . . . . . . . . . . . . . . . . . . . . . . . . .
7
2.4.4
Installation on a Read-only Partition . . . . . . . . . . . . . . . . . .
7
3 Installing Files
3.1
9
Choosing the Files to Install . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
3.1.1
Choosing the Options to Install . . . . . . . . . . . . . . . . . . . . .
9
3.2
Media Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9
3.3
Installation from the CD-ROM . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.3.1
Loading from a Local Drive . . . . . . . . . . . . . . . . . . . . . . . 11
3.3.2
Loading from a Remote Drive . . . . . . . . . . . . . . . . . . . . . . 11
3.3.3
Copying Files from the CD-ROM . . . . . . . . . . . . . . . . . . . . 12
4 Using licences
4.1
15
Obtaining Licence Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1
ii
CONTENTS
4.2
Creating the Licence File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
4.3
Licence file description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.4
Installing a Licence Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5
4.4.1
Starting the licence server manually . . . . . . . . . . . . . . . . . . 18
4.4.2
Starting the licence server automatically . . . . . . . . . . . . . . . . 18
Displaying information on licence use . . . . . . . . . . . . . . . . . . . . . . 18
4.5.1
Using the licence.log file . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.5.2
Using the licence.sta file . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.6
Retrieving Lost Licences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.7
Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
5 Installing Atelier B
25
5.1
Configuring Atelier B and its options . . . . . . . . . . . . . . . . . . . . . . 25
5.2
User environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.3
Using a remote Atelier B data base . . . . . . . . . . . . . . . . . . . . . . . 28
5.4
Starting Atelier B
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
6 Customizing Atelier B
29
6.1
Configuring your Window manager . . . . . . . . . . . . . . . . . . . . . . . 29
6.2
Modifying Atelier B parameters . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2.1
Presentation of the customization system . . . . . . . . . . . . . . . 29
6.2.2
Modifying Motif resources
6.2.3
Modifying the external tool paths
6.2.4
Modifying memory allocation
. . . . . . . . . . . . . . . . . . . . . . . 30
. . . . . . . . . . . . . . . . . . . 31
. . . . . . . . . . . . . . . . . . . . . 31
Configuring the Logic Solver . . . . . . . . . . . . . . . . . . . . . . 31
Configuring the K parser . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2.5
Configuring Atelier B internal tools
6.2.6
Configuring the printing script . . . . . . . . . . . . . . . . . . . . . 32
7 Previous versions of Atelier B
. . . . . . . . . . . . . . . . . . 32
33
2
Chapter 1
Introduction
This document describes the procedures to follow to:
• Install Atelier B.
• Install and use the Atelier B licence management system.
• Configure and parameter Atelier B.
We recommend that you read the entire document before starting the Atelier B installation
procedure.
The installation must be performed by the system administrator, as some operations must
be performed by the “super-user” (creating login accounts, etc.).
The next chapter contains all the information necessary for selecting the machine and the
filesystem where Atelier B will be installed. It also contains explanation on how to use
Atelier B on a network.
Chapter 3 provides a detailed description of the procedure to follow in order to read the
Atelier B files supplied on CD-ROM.
Chapter 4 explains how to install and use the Atelier B floating licence system.
After performing the operations described above, Atelier B and its user accounts must be
configured. These operations are described in chapter 5.
Chapter 6 contains all the information necessary for customizing Atelier B.
The last chapter explains the procedure to follow so as to ease the port of B projects
developed with a previous version of Atelier B.
1
2
Atelier B - Administrator Manual
Chapter 2
Preparing the installation
This section explains how to:
• Select the machine to install,
• Use Atelier B on a network,
• Create the Atelier B manager account,
• Select the filesystem where the Atelier B files will be installed.
2.1
2.1.1
Resources required before installation
Operating System
To install and use Atelier B, you must have one of the following operating systems available:
• Linux (with glibc version 2.2 or greater),
• Solaris 6 or greater
2.1.2
Distribution Media
Atelier B is distributed on one CD-ROM, which includes software for all supported platforms.
2.1.3
Memory Requirements
It is recommended to have at least 512 Mo of RAM.
The necessary memory space is strongly dependent of the other applications running on
your workstation and of the size of the developments made with Atelier B.
3
4
Atelier B - Administrator Manual
2.1.4
Disk Space Requirements
To install Atelier B, you need about 500 Mo of disk space.
The disk space occupied by a project developed with Atelier B depends on the size of the
B source files. The disk space occupied by the files generated automatically by Atelier B
equals about 25 times the disk space of all the B source files.
2.1.5
Dynamic Libraries
Dynamic libraries used by Atelier B depend on the type of system.
For Sun Solaris systems and HP, Atelier B uses the standard libraries provided with the
operating system.
For Linux systems, Atelier B requires the following libraries so as to work correctly :
Libraries
libXt
libXext
libX11
libSM
libICE
glibc
Minimum version required
6.0
6.4
6.2
6.0
6.3
2.4
If you do not have at least these versions for the libraries, you must update your system so
as to be able to use Atelier B. These library versions are generally available on distribution
web sites.
2.1.6
Displaying systems
Atelier B supports a variety of hardware configurations for displaying via the X Window
System. These includes workstations and X-terminals.
Atelier B operates correctly with the following window managers: olwm, mwm, CDE, KDE,
GNOME, XFCE, vuewm, fvwm2, Afterstep, Enlightenment, WindowMaker and blackbox.
2.1.7
External tools
To use the on-line help and Atelier B source navigator, you need an HTML browser
(Mosaic, Netscape, Arena, etc.).
Atelier B also produces files that can be worked on with the following tools:
Tool
VCG
DaVinci
Version
3.0
2.1
Type
Graph visualization
Graph visualisation
LATEX
Word
2ε
7
Word processor
Word processor
Vendor
Free software
M.Froehlich and M. Werner
at Bremen University (Germany)
Free software
Microsoft
You can use Atelier B without these tools, they are only used by the Atelier B documentation tools. The DaVinci tool is also used in a function of the interactive prover, but this
one is not essential.
PREPARING THE INSTALLATION
5
Machine Server
Disk Server
Disk server
AB/bbin/
Licence server
linux
solaris
Machine with
Machine with
Linux
Solaris
Terminal X
Figure 2.1: Example of a network system
The vcg tool is available on the Atelier B CD-ROM.
The DaVinci tool is free for non-commercial use. You can download this tool at the
following address :
http://www.informatik.uni-bremen.de/~davinci.
2.2
Using Atelier B on a multi-platform network
You can install Atelier B on a network of machines that use a common file server. All the
users of systems supported by Atelier B can share an installation directory. This manual
contains instructions for installing Atelier B on a multi-platform network.
Figure 2.1 on page 5, shows an example of a network installation.
In this example, Atelier B is installed on a server machine.
Several machines, with various operating systems use Atelier B. The routing according to
the type of system used is performed automatically by the Atelier B start-up scripts.
2.3
Creating the Atelier B manager account
Atelier B can be used simultaneously by several users. The users can share projects and
work on the same project at the same time.
The sharing of projects by several users means that the UNIX files must be shared between
these users and therefore causes the usual problems of access rights between the users.
To avoid compromising system security, Atelier B uses a specific Unix user and group
named atelierb.
6
Atelier B - Administrator Manual
Before installing Atelier B, you must therefore create an atelierb account and a group with
the same name.
This user and this group must be defined on all the machines where Atelier B is likely to
run.
The user atelierb has privileged rights on all the projects created via Atelier B. All intermediate files generated by Atelier B during a development will belong to the atelierb
group.
The two Atelier B user interfaces are executable files with the “set-group-id” bit. Regardless of the user who executes them, Atelier B will have the rights of the atelierb group.
On the other hand, the user source files (B sources, proof rules files) will have the rights
assigned by the users. They can therefore be protected with the standard UNIX access
rights.
We recommend that you follow the procedures defined by the constructors for creating
this account and this group:
• use admintool for SUN systems,
• use sam for HP-UX systems,
• use adduser or linuxconf for Linux systems.
We recommend using the directory selected in the sub-section below as the home directory
of this account.
2.4
Choosing the Installation Directory
If you install Atelier B for several users, you must choose a directory where the users will
have read and execute access. This directory must also be visible to all machines that are
likely to run Atelier B.
To install the Atelier B files, you must have the write access to this directory.
We recommend that you install the Atelier B files in a directory named atelierb in the disk
partition where you normally install applications.
To install Atelier B you will need 40 Mbytes.
2.4.1
Users of Previous Version
If you already have a previous version of Atelier B installed, you must install the new
version in a different directory or in a different sub-directory of the previous directory.
Please refer to chapter 7 of this document.
2.4.2
Creating the Directory
Use the mkdir command to create the directory. For example, type the command:
mkdir /usr/atelierb
PREPARING THE INSTALLATION
7
Warning: In the rest of this document the directory that you have just created will
always be named atelierb directory. Type the full path for this directory when you will
encounter atelierb directory in a command.
2.4.3
UNIX Directory Rights
The installation directory must belong to the atelierb user and to the atelierb group created
in the previous section. If this is not the case, change its owner and its group by typing
the following commands:
chown atelierb atelierb_directory
chgrp atelierb atelierb_directory
2.4.4
Installation on a Read-only Partition
If for greater security you choose a disk partition that is ”mounted” on other machines in
read-only mode, you must follow a specific procedure when installing Atelier B.
By default, Atelier B uses a directory where the users must be able to write files. These
files contain information on the projects created by the users.
This directory named bdb represents the Atelier B data base.
By default, this directory is located in the Atelier B installation directory. If the installation partition is read-only, you will have to use an Atelier B data base on another disk
partition (refer to sub-section 5.3).
8
Atelier B - Administrator Manual
Chapter 3
Installing Files
This section describes the Atelier B installation procedure and its options, for a workstation or a server.
After installing the files, you will need to install the user licences and configure the operating environments for Atelier B users. These operations are described in section 4 and
in sub-section 5.2.
3.1
Choosing the Files to Install
As Atelier B is available for several systems with various options, the distribution media
may contain a number of files that you will not need; you can therefore save space on disk
by not installing these files.
You should copy the options that you wish to install to your
atelierb_directory directory.
3.1.1
Choosing the Options to Install
Choose the options that you have purchased a licence for.
You can also install the options that you do not have a licence for, you will be able to
purchase and install these licences later.
You can install, in the same directory, Atelier B software for several operating systems.
Read carefully sub-section 2.2 before performing this kind of installation.
3.2
Media Contents
The CD-ROM contains compressed tar format files.
There is one file for each option and type of system.
The following files are present:
9
10
Atelier B - Administrator Manual
File
tarExeAB.sun5.6.Z
tarTRADCPP.sun5.6.Z
tarTRADADA.sun5.6.Z
tarTRADHIA.sun5.6.Z
tarOPR.sun5.6.Z
tarExeAB.lin.tgz
tarTRADCPP.lin.tgz
tarTRADADA.lin.tgz
tarTRADHIA.lin.tgz
tarOPR.lin.tgz
Description
Complete Atelier B for Solaris 6 or greater
C/C++ translator for Solaris 6 or greater
ADA translator for Solaris 6 or greater
HIA translator for Solaris 6 or greater
User rules proof tools for Solaris 6 or greater
Complete Atelier B for Linux
C/C++ translator for Linux
ADA translator for Linux
HIA translator for Linux
User rules proof tools for Linux
A README file may also be present. This file contains “last minute” information that have
not been written in thsi document.
3.3
Installation from the CD-ROM
This sub-section explains how to:
• ”mount” the CD-ROM from a local or a remote drive,
• copy the files to your hard disk.
You can install from a local CD-ROM drive or one present in another machine accessible
via your network.
Warning: some of the operations described in the following sections must be performed in
super-user mode.
INSTALLING FILES
3.3.1
11
Loading from a Local Drive
The following operations must be performed on the machine where Atelier B has to be
installed (on a local file management system). If this machine does not have a CD-ROM
drive, proceed to sub-section 3.3.2.
1. Login as root.
2. Insert the CD-ROM in the drive.
3. “Mount” the CD-ROM.
The table below provides an example for each type of system:
Platform
Command
Solaris
mount -F hsfs -r /dev/sr0 /cdrom
Linux
mount -t iso9660 -o ro /dev/cdrom /cdrom
For more information refer to the documentation supplied with your system.
4. Exit by typing: exit.
Now you can proceed to sub-section 3.3.3, page 12 to copy the program to your hard disk.
3.3.2
Loading from a Remote Drive
When you use a remote drive, the installation starts on the machine with the drive and is
completed on the machine where Atelier B has to be installed.
Go to the machine with the drive and perform the following operations:
1. Login as root.
2. Insert the CD-ROM in the drive.
3. “Mount” the CD-ROM following the instructions provided in the previous subsection.
4. Check that the /cdrom directory is visible from the other machines.
The table below gives an example for each type of system:
Platform
File ...
must contain ...
Solaris
/etc/dfs/dfstab
share -F nfs -o ro /cdrom
Linux
/etc/exports
/cdrom (ro)
5. If the file listed in the table above does not exist, create it.
If the command is not present, add the line.
In both cases, must type the following command so that your system takes your
modification into account:
Platform
Command
Solaris
/usr/sbin/shareall
Linux
re-start the nfs server or the machine
12
Atelier B - Administrator Manual
Move to the machine where you wish to install Atelier B and perform the following operations:
1. Login as root.
2. “Mount” the /cdrom partition on this machine by typing the following command:
mount -r host:/cdrom /cdrom
where host is the name of the machine with the drive.
3. Exit by typing the command: exit.
3.3.3
Copying Files from the CD-ROM
To install files from the CD-ROM the procedure below must be followed:
1. Log in as atelierb
2. Go to the directory atelierb_directory
cd atelierb_directory
3. Start the installation script of Atelier B : /cdrom/install_atelierb
The following screen is displayed :
---------------------------------------------------------------------
ATELIERB Installation Procedure
Machine : machine_name
Operating System : Linux 2.6.17
Most of the questions that you will be asked have a default answer
enclosed in brackets, for instance:
Do you understand [yes]?
To use the default answer, just type ‘‘return’’.
-------------------------------------------------------------------Would you like to continue [yes]?
Type “return” or “yes” to continue.
4. The following menu is then displayed :
Installation procedure steps :
INSTALLING FILES
1
2
3
q
-
13
Read files from CDROM
Install licence management system
Configure and parameter Atelier B products
Quit installation procedure
Go to step number :
[1]?
Type “return” or “1” to go to step 1.
5. Type the full path of the directory where the distribution for Atelier B is. By default
it is the /cdrom directory.
6. Type the full path of the directory where Atelier B has to be installed. By default,
it is the directory where the script has been launched.
You can give the path of a subdirectory that doesn’t exist, the script will then create
it automatically.
7. The product selection menu is displayed:
Choose products :
[
[
[
[
[
[
]
]
]
]
]
]
0
1
2
3
4
5
p
-
All products
Atelier B basic version
ADA Translator
C/C++ Translator
High Integrity ADA Translator
User rules proof tools
proceed
Select/Deselect product number :
[0]?
In this menu, select the products you wish to install, by giving their number. Each
time a product is selected a “*” character appears next to its name.
To select the products to install, refer to section 3.1.1.
8. After selecting the products, type “p” to install the files corresponding to the selected
products.
The script uncompresses and reads the selected files on the CD-ROM, and messages
of the following kind are displayed:
./AB/AtelierB
./AB/bbin/Xdefault_atelierb
./AB/bbin/bprint
./AB/bbin/linux/benv
./AB/bbin/linux/bbatch
./AB/bbin/linux/BBeautifuler
./AB/bbin/linux/pk
./AB/bbin/linux/krt
./AB/bbin/linux/PO.kin
...
14
Atelier B - Administrator Manual
You can also install the files without using the Atelier B installation script. For that, the
procedure below must be followed:
1. Log in as atelierb
2. Go to atelierb_directory
cd atelierb_directory
3. “List” the contents of the CD-ROM
ls /cdrom
4. To install the tar file,
• For Sun, type the command : zcat /cdrom/tarxxx.Z | tar xvf • For Linux, type the command : tar xzvf /cdrom/tarxxx.tgz
The files in tarfile are written in atelierb_directory.
5. Repeat the above operation for each tar file that you wish to install.
You should then:
• install the Atelier B licence management system (refer to section 4) then,
• configure Atelier B (refer to sub-section 5.1)
Chapter 4
Using licences
To use Atelier B, you must install the licences supplied by ClearSy.
The installation procedure contains three steps:
1. obtaining licence numbers,
2. creating the licence file,
3. installing the Atelier B licence server.
These three steps are described in this section.
This section also explains how to:
• display information on Atelier B usage,
• analyze error messages related to the use of the licences,
• retrieve a lost licence.
4.1
Obtaining Licence Numbers
To obtain one or more Atelier B licences, you must send the licence request form found
in the Appendix. You can do this by fax (+33 (0)4 42 37 12 71) or by email (maintenance.atelierb@clearsy.com).
In this form, you must specify the characteristics of the machine that will be used as the
licence server. This machine is not necessarily the machine that Atelier B will be run on,
but it must be visible to all the machines that will run Atelier B.
For a licence server under Solaris, you must provide the “hostid” of the machine. The
“hostid” is obtained by typing the command: hostid
For a licence server under Linux, you must provide the Identifiant of the machine. This
Identifiant is obtained by typing the commmand: /etc/hosts from the root of the
CDROM.
15
16
Atelier B - Administrator Manual
4.2
Creating the Licence File
To create the licence file with the help of the Atelier B script installation, you must follow
the following procedure:
1. If the Atelier B installation script has already been started up, go directly to step 4.
2. Log in as atelierb
3. Start the Atelier B installation script:
/cdrom/install_atelierb or
atelierb_directory/install_atelierb
4. Select step 2 : “Install the licence management system ”
5. Answer ”yes” to the question : “ Do you wish to create a licence file ”.
6. Type the full path of the directory where the licence file has to be created. We
recommend the use of the directory atelierb_directory/AB/bbin.
7. Type each of the passwords which are on the licence form which we will have been
sent back to you (refer to section 4.1).
8. After typing the last password, type “q”. The script will create the licence file, refer
to section 4.7 if it displays an error message.
If there is no error, the script displays the contents of the licence file. Refer to section
4.3 for a description of the licence file.
The script then automatically launches the Atelier B licence server. Follow the
instructions in section 4.4.2 so that the licence server is automatically launched
every time the machine is started up.
You can also create the licence file “manually”, with the program named licence provided
with Atelier B.
It is used in the following way:
1. Choose, and if necessary create, the directory where the licence file will be located.
We recommend using atelierb_directory/AB/bbin.
2. Set the environment variable LICENCE_PATH.
For example with csh:
setenv LICENCE_PATH <licence file directory> and with sh:
LICENCE_PATH=<licence file directory> export LICENCE_PATH
3. Log-on to the machine that will be the licence server (the one specified on the licence
request form).
4. Go to the directory of Atelier B executables:
cd atelierb_directory/AB/bbin/<system> with
<system> = sun5.6 for a machine with Solaris 6 or greater,
<system> = hp10 for a machine with HP-UX,
<system> = linux for a machine with LINUX.
USING LICENCES
17
5. Execute the licence program: licence <password>
where <password> is the number given by CLEARSY. This program creates a
licence.dat file in the $LICENCE_PATH directory.
6. If there is an error refer to section 4.7.
4.3
Licence file description
The licence.dat file contains all the information on the available licences.
In this file, lines that start with # are comments.
The information comprises:
• The name of the server machine. For example:
Server name: SERVER
• The number of the port used by Atelier B for communication with the licence server.
You can change this number if it is already used by another application.
Communication port number: 5010
• For each available licence:
– the application name,
– the application identifier (internal),
– the number of available licences,
– the licence deadline, or “Unlimited” if the licence does not have a deadline.
– The “All” indicator showing that the licence can be used on all the machines
in the network,
– The licence password.
Example of a licence file:
# Atelier B licence file
Server name: MARION
Communication port number: 5010
# Fields in lines below:
# Application name - Application number - Number of licences - Expiration date
# HostId - licence number
Atelier B 3.7 - 1 - 30 - Unlimited - All - JDGEBAEGSBKAGREC
C Translator - 4 - 30 - Unlimited - All - JDMANHMRJBGACLSS
4.4
Installing a Licence Server
The licence server is an executable program named lic_manager that reads the licence
file created during the previous step.
This program is queried by Atelier B each time it is used.
You can therefore:
18
Atelier B - Administrator Manual
1. start the program before the first use of Atelier B, or
2. configure your server machine so that the program is started automatically upon
startup.
4.4.1
Starting the licence server manually
To manually start the Atelier B licence server, simply type the following command in a
UNIX window:
atelierb_directory/AB/bbin/<system>/lic_manager &
You must first have positioned the LICENCE_PATH environment variable to the licence file
directory.
You can then check the server operation by accessing the trace file named licence.log
present in the $LICENCE_PATH directory.
4.4.2
Starting the licence server automatically
You can also configure your system so that the licence server will be run automatically
when the system is started.
Warning: this configuration must be performed by the system administrator as super-user
provilege is required.
1. Log-on as super-user,
2. Edit the configuration file:
For Solaris: atelierb_directory/AB/INSTALL/etc/solaris/rc.atb
For Linux: atelierb_directory/AB/INSTALL/etc/other/rc.atb
3. In this file, change the values of the following variables:
ATELIERB_HOME : Atelier B installation directory.
LICENCE_PATH : directory containing the licence file.
4. Save the changes made.
5. Then set the system parameters as follows, for:
Solaris type the following commands:
cd atelierb_directory/AB/INSTALL/etc/solaris
./rc.atb install
This command creates the necessary files in the init.d, rc*.d directories.
Linux add the contents of the file at the end of the /etc/rc.local file.
4.5
Displaying information on licence use
The Atelier B licence server creates two files used to obtain information on licence use:
• the licence.log file, and
• the licence.sta file.
USING LICENCES
4.5.1
19
Using the licence.log file
The licence.log file in the $LICENCE_PATH directory is updated each time the licence
server assigns or releases a licence. For each operation, it displays:
• the date and the time,
• the type of operation performed: BEGIN for assigning a licence, END for releasing a
licence.
The IN and OUT codes correspond to assigning or releasing a licence for a separate
executable program.
• The type of licence assigned or released,
• The user characteristics (login name, machine name, X11 display).
Example:
When user user1 starts Atelier B on machine mach_name, the following messages will be
printed in the licence.log file:
04/12/1996
04/12/1996
04/12/1996
04/12/1996
10:10
10:11
10:12
10:12
BEGIN: <Atelier B 3.7 - Principal> by user1@mach_name(:0)
IN: <Atelier B 3.7 - logic_solver> by user1@mach_name(:0)
OUT: <Atelier B 3.7 - logic_solver> by user1@mach_name(:0)
END: <Atelier B 3.7 - Principal> by user1@mach_name(:0)
The IN and OUT messages correspond to the opening of a project.
4.5.2
Using the licence.sta file
The licence.sta file present in the $LICENCE_PATH directory contains the list of Atelier B
users.
This file is updated each time a user starts or quits Atelier B.
It contains:
• The date and time of the last update,
• For each type of licence:
– the type of licence,
– the user’s characteristics (login name, machine, X11 display, ...),
– the number of unused licences available.
Example:
04/10/2006 10:25
----------------------ADA Translator
10 free licences
C Translator
10 free licences
Atelier B 3.6
20
Atelier B - Administrator Manual
user1@machine1(machine1:0.0) [gpid = 15847]
‘‘Atelier B’’ ‘‘Principal’’ user1 machine1 machine1:0.0 15847
‘‘Atelier B’’ ‘‘krt’’ user1 machine1 machine1:0.0 15847
user2@server(terminal1:0.0) [gpid = 10998]
‘‘Atelier B’’ ‘‘Principal’’ user2 server terminal1:0 10998
8 free licences
4.6
Retrieving Lost Licences
It is possible that Atelier B licences may not be released correctly; for example, when
Atelier B is suddenly stopped (e.g., with the kill -9 command).
In this case, there are two methods available for retrieving licences that have not been
released:
1. The first solution is to manually stop, then re-start the licence server:
(a) Ask all Atelier B users to quit the application.
(b) Identify the process number of the licence server:
ps -ef | grep lic_manager
(c) Stop the licence server by “killing” the process:
kill <num_process>
(d) Re-start the licence server by following the instructions in sub-section 4.4.1.
2. The second solution uses the lic_retrieve program supplied with Atelier B:
(a) Determine the characteristics of the licence to retrieve by referring to the
licence.sta and licence.log files.
(b) Go to the directory of Atelier B executables:
cd atelierb_directory/AB/bbin/<type>
(c) Run the lic_retrieve program giving the characteristics of the licence to
retrieve as parameters, e.g.:
lic_retrieve ‘‘Atelier B’’ ‘‘Principal’’ user1 machine machine:0 15847
You can copy the parameters from the file licence.sta.
(d) Check that the licence was correctly released by referring to the licence.sta
and licence.log files.
Warning, if Atelier B was stopped while a project was opened, the licence
corresponding to the krt program must also be released:
lic_retrieve ‘‘Atelier B’’ ‘‘krt’’ user1 machine1 machine1:0
4.7
Error Messages
This sub-section describes the error or warning messages that are caused by incorrect use
or incorrect operation of the Atelier B licence management system.
The messages are sorted in alphabetical order. For each message, the various causes that
triggered the error condition as well as the corrective action required are described.
USING LICENCES
Cannot access LICENCE PATH directory
It is not possible to access the directory specified in the LICENCE PATH
variable.
If this directory does not exist, the value of the
environment variable must be changed.
If this directory exists and is not accessible to all
Atelier B users, then its access mode must be changed.
Cannot access licence file
The directory specified in the LICENCE PATH variable does not contain
a licence.dat file.
The value of the LICENCE PATH variable must be changed or
the licence file must be created using the program named
licence.
Cannot contact licence server
This message is displayed when the tools do not receive any answer from the
licence server.
The licence server is probably not running.
Cannot contact licence server: unknown address
The machine does not know the machine where the licence server is running.
The name of this machine is given in the second line of the licence file.
This machine must be added to the list of machines known by
your machine (for instance, in the /etc/hosts file).
Cannot read licence file
The licence file cannot be read.
The licence.dat file present in the directory specified by the
LICENCE PATH variable is not accessible in read mode.
This file must be accessible in read mode for all
Atelier B users.
Cannot write licence file
This message is only displayed when the program named
licence, is used for updating the licence file.
This program is normally used only when adding new
licences.
The access rights to this file must be changed so that it can be modified
by the user who modifies the licence file.
21
22
Atelier B - Administrator Manual
Communication error: address already used
This error occurs when the port number used by the
licence server is already being used by another
application.
The port number is specified in the licence file.
To change it:
- stop the licence server,
- edit the licence.dat file
- change the port number in the third line
- re-start the licence server
Invalid licence file
The data present in the licence file is incorrect.
The only solution is to re-create the licence file by giving again
all the licence passwords to the licence program.
Invalid licence number
The licence file contains an incorrect licence password.
The licence file must be re-created using the program named
licence and the licence passwords supplied by CLEARSY.
Ensure that the licence passwords in the licence.dat
file do correspond to the passwords supplied by CLEARSY.
If this is the case, contact CLEARSY for new passwords.
No licence available
This is the most frequent message when using Atelier B
or a translator.
If there are licences for this tool, and if they are all
busy, the list of tool users is given in the
following format:
<user name>@<machine name>(<display>)
Example:
No licence available
Users :
jerome@atb(atb:0)
christophe@terre(terminal1:0)
Unknown licence file path
You forgot to set the
LICENCE PATH environment variable to the directory containing the
licence file.
USING LICENCES
Licence has expired
This message is displayed when your licence is no longer valid.
The licence file contains for each licence a deadline or the
“Unlimited” character string if not.
Example:
licence.dat :
=============
# licence available until 01/09/2006
C Translator - 4 - 1 - 01/09/2006 - All - FCKMFDHPRSDSMKNDKCEBLCEBJEEDJFEJ
# Unlimited licence
Atelier B 3.6 - 0 - 1 - Unlimited - All - GEHFFSRFSMCLJPJG
This machine is not allowed
Some licences are restricted to specific machines
(4 different machines max.).
The list of machines allowed is specified in the licence file.
licence.dat :
=============
# unlimited licence
Atelier B 3.7 - 1 - 1 - Unlimited - All - PRNGMDGSJGHSHDBN
# licence available only for hostid :
# - 8030A39D
# - 778A2926
# - 8073FF18
# - 8073DD20
Animator - 8 - 1 - Unlimited - 8030A39D 778A2926 8073FF18 8073DD20 LPLAHEPGEANNARENPAEFMLKNERRMGNKFEEFLNMSBGHAHPJPP
23
24
Atelier B - Administrator Manual
Chapter 5
Installing Atelier B
This section describes the procedures to follow in order to:
• configure Atelier B and its options,
• configure the account of a user of Atelier B,
• start Atelier B.
This section also comprises a sub-section describing the scripts and configuration files used
by Atelier B upon startup.
5.1
Configuring Atelier B and its options
You will need to configure Atelier B so that it can easily access:
• external tools for which it produces files (vcg, LATEX, etc.),
• system resources required for its operation,
• optional tools (translators, etc.)
The installation script will ask you the following questions:
Question
Location of
Location of
Location of
Location of
LAT
EX executables
vcg
a HTML browser
daVinci
Typical location
/usr/local/bin
/usr/local/bin
/usr/local/bin
/usr/local/bin
These tools are optional. Before configuring Atelier B, ask your system administrator
whether these tools are present and where they are located.
In order to configure Atelier B and its options for your system, perform the following
operations :
1. If the Atelier B installation script has already been started up, go directly to 4.
25
26
Atelier B - Administrator Manual
2. Log-on as atelierb
3. Start the Atelier B installation script:
/cdrom/install_atelierb or
atelierb_directory/install_atelierb
4. Select step 3 : “Configure and parameter the Atelier B products”
5. Give the path of the directory where the Atelier B files are installed.
6. The configurable products menu is then displayed:
Select products :
[
[
[
[
[
[
]
]
]
]
]
]
0
1
2
3
4
5
p
-
All products
Atelier B basic version
ADA Translator
C/C++ Translator
High Integrity ADA Translator
User rules proof tools
proceed
Select/Deselect a product number :
[0]?
7. Select the products you wish to configure, then type “p” to start the configuration.
For each product, the script will check that all the files necessary for its functioning
are in present, with correct access mode.
For Atelier B basic version, the script will ask you questions about the location
of external optional tools. From this information, it will construct the Atelier B
starting files, which are described in sub-section 5.4.
For translators and the rule proof tools, the script will parameter Atelier B so that
it can use them.
Warning: If you use Atelier B on a network of heterogeneous machines (refer to subsection 2.2) you must configure Atelier B for each type of system.
You can then start Atelier B using the following start-up scripts:
• atelierb_directory/AB/bbin/startAB for the Motif interface.
• atelierb_directory/AB/bbin/startBB for the command line interface.
5.2
User environment
This sub-section describes all the environment variables required for optimal use of Atelier
B.
INSTALLING ATELIER B
27
• Accessing Atelier B executable programs:
Add to your PATH variable, the path of the directory of Atelier B executable
programs:
setenv PATH ${PATH}:atelierb_directory/AB/bbin
or
PATH=${PATH}:atelierb_directory/AB/bbin export PATH
• Access to the licence file:
The LICENCE_PATH environment variable is used by Atelier B to retrieve the licence
file. If your licence file is present in the usual location, type the following command:
setenv LICENCE_PATH atelierb_directory/AB/bbin
or
LICENCE_PATH=atelierb_directory/AB/bbin export LICENCE_PATH
• Access to Motif dynamic libraries:
Dynamic libraries are automatically loaded by Atelier B. However, you must check
that they are correctly installed in your system (refer to sub-section 2.1.5).
According to the type of installation, you may have to modify the
LD_LIBRARY_PATH environment variable.
• Accessing LATEX executable files
Atelier B uses LATEX for its documentation functions, therefore the user must
configure his environment for using LATEX.
LATEX is usually supplied with a configuration file named texenv.csh or
texenv.sh. It is generally located in the directory /usr/local/lib/texmf/bin.
Therefore, simply type:
source /usr/local/lib/texmf/bin/texenv.csh
or
. /usr/local/lib/texmf/bin/texenv.sh
28
Atelier B - Administrator Manual
5.3
Using a remote Atelier B data base
The Atelier B data base is a directory that contains information on the projects created
by Atelier B users.
By default it is located in the atelierb_directory/AB/press/bdb directory.
This directory must be accessible in write mode for the atelierb group so that users can
create projects.
If you install Atelier B on a read-only filesystem, then you will need to “relocate” this
directory onto another filesystem that is accessible in write mode.
If bdb_dir is the access path to the directory that you have selected.
To configure Atelier B, edit the AtelierB file that is in directory atelierb_directory/AB.
In this file, replace the line :
ATB*ATB*Atelier_Database_Directory: atelierb_directory/AB/press/bdb
with the line :
ATB*ATB*Atelier_Database_Directory: bdb_dir.
5.4
Starting Atelier B
Atelier B is started up by the two (Bourne-shell) scripts below:
• atelierb_directory/AB/bbin/startAB for the Motif interface.
• atelierb_directory/AB/bbin/startBB for the command line interface.
The script determines the type of system where it is started up, using the system command
uname.
machine=‘uname -a | awk ’{print $1}’‘
systeme=‘uname -a | awk ’{print $3}’‘
short_systeme=‘echo $systeme | cut -d’.’ -f1-2‘
if [ "$machine" = "SunOS" ]
then
if [ "$systeme" = "5.6" ]
then
type="sun5.6"
......
elif [ "$machine" = "Linux" ]
then
.....
fi
else
echo "Warning: unknown operating system : $machine"
fi
After this operation, the script starts the user interface passing as parameter the location
of the AtelierB global resource file.
Chapter 6
Customizing Atelier B
This section describes how the user can set Atelier B parameters in order to customize
the:
• appearance of Atelier B (colors, fonts, etc.),
• external tools used by Atelier B (editor, HTML browser, etc ...),
• memory amount used by Atelier B,
• parameters of Atelier B tools,
• printing script used for documents generated by Atelier B,
6.1
Configuring your Window manager
Some window manager characteristics must be changed so that Atelier B can be used in
most favorable conditions.
These characteristics are:
• placing of windows on initialisation,
• size of icons,
• windows selection mode.
File AB/bbin/Xdefault_atelierb contains parameters for some of the supported window
managers (mwm, olwm, fvwm, vuewm).
You must copy the parameters for your window manager to the .Xdefault file present in
your $HOME directory for them to take effect.
6.2
6.2.1
Modifying Atelier B parameters
Presentation of the customization system
Atelier B parameters are, by default, defined in file AB/AtelierB. This file contains parameters shared by all atelierb users. It is also possible to define specific parameters for a
29
30
Atelier B - Administrator Manual
user or a project (refer to Atelier B User Manual)
This file has the following format : Lines beginning with an exclamation mark ! or a hash
sign # are comments; other lines contain the name of a resource followed by its value.
The file contains the following parts :
• Graphical resources :
benv*<resource_name>
• Localisation of internal tools :
ATB*ATB*<resource_name>
• Localisation of optional tools :
ATB*OPT_TOOLS_<system>*<resource_name>
where <system> is LINUX for a Linux machine, HP10 for HP-UX 10.20, SUN5_6 for
Solaris 6 or greater.
• Parameters for internal tools :
ATB*<internal_tool>*<resource_name>.
Examples :
benv*background : gray85
This resource gives the background color of the graphical user interface
ATB*OPT_TOOLS_LINUX*HTML_Viewer_Path: /usr/local/netscape/netscape
This resource gives the path of the HTML browser to be used on a Linux machine.
ATB*POG*Generate_Obvious_PO: FALSE
When the value of this resource is FALSE, Atelier B doesn’t save obvious proof obligations.
To modify a resource for all Atelier B users, the procedure is :
1. Log-in as atelierb,
2. Go to the Atelier B installation directory :
cd atelierb_directory/AB
3. Edit the file named AtelierB
4. Change the line corresponding to the resource with the new value.
5. Save your changes.
6.2.2
Modifying Motif resources
The term resources covers fonts, background and foreground colors, thicknesses and various
graphical attributes for each object of the Atelier B Motif interface.
The user has two options for modifying them:
1. Modification for all Atelier B users:
Modify the resources in the AB/AtelierB file supplied.
CUSTOMIZING ATELIER B
31
2. Modification for a specific user:
Copy the AB/AtelierB file in another place;
modify the resources in this new file;
type the command: xrdb new_file
6.2.3
Modifying the external tool paths
By default, Atelier B uses the external tools selected during installation.
To modify one of these tools for all Atelier B users, you have to modify the value of its
resource :
Outil
Ressource
Text Editor
ATB*OPT_TOOLS_LINUX*Editor_Path
LATEX
ATB*OPT_TOOLS_LINUX*Latex_Binary_Directory
ATB*OPT_TOOLS_LINUX*Latex_Viewer
ATB*OPT_TOOLS_LINUX*Latex_Postcript_Translator
VCG
ATB*OPT_TOOLS_LINUX*VCG_Path
DaVinci
ATB*OPT_TOOLS_LINUX*DaVinci_Path
HTML browser ATB*OPT_TOOLS_LINUX*HTML_Viewer_Path
You can also write arguments to the command, for example :
ATB*OPT_TOOLS_<SYSTEM>*Editor_Path: /usr/openwin/bin/textedit -bg black -fg white
for an editor with a white foreground and a black background.
If a user wants to have a different resource from the ones used by the other users, he has
to follow the procedure described in Atelier B - User Manual.
6.2.4
Modifying memory allocation
Configuring the Logic Solver
Modifications of the Logic Solver parameters are required in the following cases:
• Your machine does not have enough memory to execute Atelier B.
Message type:
Cannot launch the Logic Solver
(check if there is enough memory)
• The complexity of your B project, forces you to increase the memory size.
Message types:
Compiler Memory Full
SEQUENCE ID NUMBERS OVERFLOW
SEQUENCE MEMORY OVERFLOW
SEQUENCE _chn ID NUMBERS OVERFLOW
SEQUENCE _chn MEMORY OVERFLOW
stopping forward because ...
OBJECTS OVERFLOW
MAXIMUM NUMBER OF THEORIES xx REACHED
GOAL STACKS OVERFLOW
SYMBOLS OVERFLOW at <symb>
32
Atelier B - Administrator Manual
To set Logic Solver parameters for all Atelier B users, it is necessary to modify the value
of the resource named ATB*ATB*Logic_Solver_Command in file AB/AtelierB (Refer to
section 6.2.1).
Depending on the size you need, you have to replace the line
ATB*ATB*Logic_Solver_Command: krt
with one of the following ones:
• for a small Logic Solver :
ATB*ATB*Logic_Solver_Command: krt -a m700000e40
• for a medium Logic Solver :
ATB*ATB*Logic_Solver_Command: krt -a m1000000e40
• for a large Logic Solver :
ATB*ATB*Logic_Solver_Command: krt -a m4000000e40
• for an extra-large Logic Solver :
ATB*ATB*Logic_Solver_Command: krt -a m6000000e40
If a user wants a Logic Solver with another size (different from the size used by all Atelier B
users), he must write its value for the resource ATB*ATB*Logic_Solver_Command in a file
named .AtelierB in his home directory. The procedure for creating this file is described
in Atelier B - User Manual.
Configuring the K parser
Modification of the K parser parameters must be performed if your B source files are very
large or if these files contain a large number identifiers:
Messages like:
SEQUENCE ID NUMBERS OVERFLOW
SEQUENCE MEMORY OVERFLOW
SEQUENCE _chn ID NUMBERS OVERFLOW
SEQUENCE _chn MEMORY OVERFLOW
SYMBOLS OVERFLOW at <symb>
To modify the K parser parameter settings, please follow the same procedures as above,
using the resource named ATB*ATB*KParser_Command.
6.2.5
Configuring Atelier B internal tools
Resources for configuring Atelier B internal tools are described in the document Atelier B
- User Manual. These resources can also be added to the file AB/AtelierB to be shared
by all Atelier B users.
6.2.6
Configuring the printing script
By default, the printing script used by Atelier B is the script named
atelierb_directory/AB/bbin/bprint
To use another printing script:
CUSTOMIZING ATELIER B
33
1. create a new script file
2. modify the value of the resource ATB*ATB*Print_Command in the file AB/AtelierB
with the full path of the new script file.
34
Atelier B - Administrator Manual
Chapter 7
Previous versions of Atelier B
This section describes the procedure to follow so as to retrieve the projects developed with
the previous version of Atelier B (versions 3.6.x).
The procedure to follow is:
1. Archiving projects: With the previous version of Atelier B, you must archive the
projects you wish to retrieve. To do this, use the “Archive project” function described in the “User Manual”. You need only archive B source files and proof files.
2. Installing the new version of Atelier B: Follow the instructions of this manual to
fully install the new version of Atelier B.
3. Restoring projects: With the new version of Atelier B, restore the projects which
were archived previously using the “Restore Project” function as described in the
user’s manual.
Warning, licences for version 3.4 are different from licences for the previous versions. You
have to install the new licence server to use this version.
For Linux platforms, this version of Atelier B is now compatible with the dynamic libraries
present in current Linux distribution. It is not necessary anymore to install specific C
library files in order to use Atelier B.
35
Download PDF