7.1 Introduction

CSI(C&F) is not a general-purpose programming language like C++ or JAVA. In a few words, the aim of CSI(C&F) is the evaluation of (fuzzy) constraints, and for this purpose it was developed at the Technical University of Vienna, Austria. Later we will see, what this constraints are and look like. But beside the wish to state constraints and to evaluate them with respect to the domain of their variables, we want to formulate when and how this constraints should be evaluated, or how single constraints and variables of constraints relate to other constraints and variables.

In most cases, the values of variables are the result of mathematical or logical expressions, or aggregations of other variables. In this sense CSI(C&F) has to provide a bit more functionality than simple constraint stating and evaluating. In this sense, CSI(C&F) comes quite close to traditional programming languages.

CSI(C&F) is a procedural programming language that has some similarity to BASIC, but a reduced functionality of the latter and some restrictions on data types. On the other hand CSI(C&F) includes features like recursive procedures as well as the ability to handle and operate on fuzzy data types. From this point of view CSI(C&F) can be seen as complete command-shell for the functionality of FLIP++.

In addition to this, CSI(C&F) provides an expression interpreter for mathematical and logical expressions, that is able to work on lists of arguments, even when the number of arguments is not known before runtime or may vary when used within a loop. Because of further functionality like the use of conditional operators and other features, the expression interpreter can be seen as a stand-alone-module for simple "functional" programming (but not in the common sense as for example LISP). So CSI(C&F) is neither a subset of classical BASIC, nor is BASIC a subset of CSI(C&F).

Traditional programming languages like C++ or Pascal provide a variety of data types. In contrast, CSI(C&F) is a language based only on few data types that can be divided into two classes:

According to this distinction we have

The crisp data type class includes floating point numbers and strings. Booleans are floating point numbers where zero has the truth value FALSE and a value different from zero has the truth value TRUE. Integers are treated as a subset of floating point numbers. A detailed discussion on fuzzy data types will be given later.

One important fact is that CSI(C&F) knows only global data, that means that all variables are visible to the entire program. This has to be considered when procedures or function calls are invoked; CSI(C&F) has a global namespace and only one scope of domain. "Local" variables taking the same name as a global one may disturb the desired behavior of a program, even when this type of "error" is a semantically one and no error or warning message will be generated. The programmer has to take care not to change variables that are still used in an other part of the program. In this sense all variables are typically "static", as long as not removed explicitly with the DELETE statement (explicit garbage collection).

CSI(C&F) provides the fundamental control-flow constructions required for wellstructured programs: decision making (IF - THEN - ELSE), looping with the termination test at the top, the middle or the bottom (FOR, LOOP), early program exit (EXIT), procedure calls (PROCEDURE - RETURN), and labels.

As mentioned above, the main goal of CSI(C&F) consists in stating and evaluating crisp or fuzzy constraints. For this purpose CSI(C&F) provides fuzzy variables (FUZZYVAR), objects for parameter descriptions (PARAMETERSET), operators (OPERATORSET), rules for the fuzzy inference (RULESET), and a hierarchical evaluation structure (EVALTREE) for the fuzzy conjunction or disjunction of evaluated constraints.

Finally, CSI(C&F) provides some basic input/output facilities for the IMPORT and EXPORT of data. So far, a CSI(C&F) program may not exist in separate source files. Similarly, CSI(C&F) offers only straightforward, single-thread control flow.

CSI(C&F), like other languages, has its blemishes. Some parts of the syntax could be better, some extensions to the functionality of CSI(C&F) may be desirable, and some faults might not be eliminated while testing CSI(C&F). Future versions should eliminate most of the actual weak points.

The following chapters will be organized as follows. First of all a tutorial part with the purpose to get the reader started as quick as possible is given in section 7.2. Section 7.3 through 7.5 discuss various aspects of CSI(C&F) in more detail and rather more formally than does section 7.2. Section 7.3 deals with the basic data types, operators and expressions. Section 7.4 provides a formal language description by regular expressions. Section 7.5 covers fuzzy data types and operators as well as constraints and evaluation mechanisms. Section 7.6 gives a complete overview of the keywords used in CSI(C&F).