tcas implemented in C#

Tcas is a aircraft collision avoidance algorithm that was
originally developed by the Siemens research group.  This
version reflects porting that original C implementation into
C# (C Sharp) along with most of the faulted versions
produced by the Siemens effort.

This package is made to be compatible with LINUX systems but can
be adapted to running in other operating system environments.
This package depends on having Mono installed (a minimum
version is not known, the subject was prepared using 2.6.7.0)


How to install:
We have provided an install.sh script that will install any
of the versions (the original unfaulted version or any of
the 41 faulted versions) by simply providing the fault number
as an argument to the install.sh command, e.g. install.sh 3
would copy faulted version 3 into the source directory and
compile it using the Mono compiler (gmcs).  If porting to
another OS you may wish to reimplement this script in a native
script for your OS (e.g. powerShell).  To select the original
version using install.sh specify version 0 (install.sh 0)

Running the test suite:
We have prepared two shell script files runall.sh and runall-diff.sh
that can be used to execute all tests in the suite using a single
command.  Alternatively, the test suite is presented in the
testplans.alt/universe file with each line in that file representing
a set of inputs to tcas and implementing a test case scenario.
A companion file, tcas.universe.tsl, is provided which is compatible
with the monomts tool (which is a new component of the 'mts' tool
package on the SIR) which will create a LINUX shell script containing
all tests in the tcas.universe.tsl file.  The other files in
testplans.alt describe alternate formulations of test suites
that the Siemens group produced by their research.

Some versions of LINUX will allow running the compiled C# executables
without specifying 'mono' as the execution engine.  The runall scripts
are prepared to specify this execution engine.  These were created
using the monomts tool so you are free to modify the scripts or the
tool to your needs.

Notes:
Versions 33 and 38 implement the original bug in the C version of
tcas which will always fail because type-safety in C# prevents
that kind of error pattern.  A similar situation exists for the
Java version of tcas (jtcas) in the SIR but in the case of jtcas
the author chose to eliminate those versions and simply provide
an unfaulted version in those two cases.  In either case, versions
33 and 38 are uninteresting in their current form.

Notice that the test inputs presented in tests "t1460 t1461 t1462 t520
t524 t579 t703 t802" will fail throwing a "System.IndexOutOfRangeException"
exception in these C# versions of tcas while the original C version wouldn't.
This is because we use an integer array with the length of 4 to
implement the "Positive_RA_Alt_Thresh". When the index is greater
than 3, an exception would happen due to type safety in C#. For example,
in the test input "t520" ( tcas.exe 694 1 0 631 485 642 9 442 418 0 2 1),
the argv[6] is 9. Later the program would use “Positive_RA_Alt_Thresh[9]”
which would cause the exception.

These tests were intended to cause "wild reads" from the data space
which are valid test inputs in the original C version. In this C#
version, these test inputs would contain an invalid input or an
expectation that C# type safety will catch these types of errors.
We have included an alternative C#tcas version, which would not throw an
exception but instead returns Positive_RA_Alt_Thresh[3] when the index
is greater than 3.  This alternate version in source.alt/source.orig
named tcas_No_Exception.cs .  Faulted versions using this
alternate implementation were not provided by the author but it is
possible to implement the faults in to this alternate version
which may produce more interesting output in some test cases.

