Experiments for Formal Methods and System Design 2017 
Title: Tightening the Contract Refinements of a System Architecture 
Authors: A. Cimatti, R. Demasi, and S. Tonetta
======

BASICS
======

System Requirements:
- 64bit Linux with GLIBC 2.14/GLIBC 2.15

All benchmarks have been performed with a time limit of 10 min 
on a Linux machine Red Hat Enterprise Linux Workstation 6.7 
with 8 CPU of 3.40 Ghz Intel Xeon, with a memory of 15Gb.

Folders:
========
README.txt This document

experiments: contains the experiments for the 
different tightening cases: single, parallel, duplication tightening, 
and also for the example of applying tightening on a system architecture
(see README.txt in this directory for more details)

bin: Contains the ocra executable for GNU/Linux 64 bit

New Command ocra_tighten_contract_refinement on OCRA tool
===============

To run the new command:

./bin/ocra -int
ocra > ocra_tighten_contract_refinement -h
usage: ocra_tighten_contract_refinement -C <string> [-h] [-O <string>] 
       [-a <string>] [-s <string>] [-q] [-i <file>] [-f <string>] [-o <file>]
 -C <string> Tighten the specified contract refinement
 -h          Print the command usage
 -O <string> Component name where is defined the given contract [default=system]
 -a <string> force search algorithm type [default=encode]
             Valid values are: encode, compos
 -s <string> Select approach to tighten a contract refinement with shared 
             subcontracts
             Valid values: 'parallel' and 'duplicate'
 -q          Generate one ocra spec for each tightening result
 -i <file>   Read the specification from the specified file [default=stdin]
 -f <string>  select output format [default=text]
              Valid values are: text, xml, xml_no_text
 -o <file>    Set the output file [default=stdout]


The command takes as  that takes as input an OCRA specification, 
a contract's name, a component's name, and produces as output a number of OCRA 
specifications containing the tightened versions of the given contract and its 
subcontracts. Moreover, the user can also see the tightening results 
on the standard output (stdout) including which subcontracts 
are relevant.
The command has an option to allow the user to select the 
approach to the multiple synthesis problem (see Section 4.4 of 
the article), either the compositional approach (option -a compos) or the 
encoding approach (option -a encode). 
Other options in the command deal with the problem of sharing contracts: 
the user can choose to perform a parallel tightening (option -s parallel) 
or duplicate (option -s duplicate) which duplicate the contracts and run a 
single top-down tightening. 
By default, the command run single tightening for the given contract refinement.

