#!/bin/bash

################################################################################
# $Id: generate_objs_bsmv.bash.in,v 1.1 2006/05/24 00:13:01 schuppan Exp $
#
# Name:    generate_objs_bsmv.bash
# Version: 0.1
# Date:    08.10.2002
#
# Author:  Viktor Schuppan, ETH Zuerich
#
# Description:
#
# Generates modules for models of the FireWire TIP protocol with various numbers
# of nodes and ports and different determinism in the CMU SMV language. Modules
# need to be preprocessed by a C-preprocessor.
#
# Command-line
#
# generate_objs_bsmv.bash
#
################################################################################



#
# configurable parameters
#
SED=/bin/sed



cmd="./bin/genall"

for n in 2 3 4 5 6; do 
  for p in 2 3 4; do
    ${cmd} -n ${n} -p ${p} -cfn;
  done;
done;
for n in 2 3 4 5 6; do
  for p in 2 3 4; do
    ${cmd} -n ${n} -p ${p} -cfn -frn;
  done;
done;
for n in 2 3 5 10; do
  for p in 3; do
    ${cmd} -n ${n} -p ${p};
  done;
done;
for n in 2 3 5 10; do
  for p in 3; do
    ${cmd} -n ${n} -p ${p} -frn;
  done;
done;
${cmd} -n 6 -p 4;
${cmd} -n 6 -p 4 -frn;
${SED} -e "s/nodes_6_4_0\.smv/nodes_6nc_4_0\.smv/
           s/#include \"\.\.\/lib\/config_6_4_0\.smv\"/#include \"\.\.\/lib\/config_6nc_4_0\.smv\"/
           " obj/nodes_6_4_0.smv >obj/nodes_6nc_4_0.smv
${SED} -e "s/nodes_6_4_1\.smv/nodes_6nc_4_1\.smv/
           s/#include \"\.\.\/lib\/config_6_4_1\.smv\"/#include \"\.\.\/lib\/config_6nc_4_1\.smv\"/
           " obj/nodes_6_4_1.smv >obj/nodes_6nc_4_1.smv
