#!/bin/bash

IDIR=`dirname $0`
#echo $IDIR
source "$IDIR"/cnt_utils.sh

## TOOL / USAGE / OPTION
TOOL=cnt
VERSION=0.1

HELP="
version: $VERSION
usage:   $TOOL <command> [<command-options>]
command:
   init     initialize a work dir
   bounds   build loop bounds infos
   pagai    search counter invariants with pagai
   (o)wcet  build|solve ilp problem with owcet
   lp       compute and compare wcet with/without pagai   
   all      do all the steps
options:
   type '$TOOL <command> -h'
"

function usage {
   echo -e "$HELP"
}

COMMAND=$1
case $1 in
	-h|--help) usage ; exit 0;;
	init) ;;
	bounds) ;;
	pagai) ;;
	wcet|owcet) COMMAND=owcet ;;
	lp) ;;
	all) ;;
	*) usage ; exit 0;;
esac
shift

cnt_$COMMAND "$@"
