[Next] [Previous] [Top] [Contents]

Logic, Reasoning and A Programming Language for Simulating Economic and Business Processes with Artificially Intelligent Agents

4 Declarative and Imperative Computing Paradigms


These differences correspond to differences in computer programming paradigms. Declarative programming languages such as Prolog are rather like logics in that programs declare statements that are known to be true and relationships between these and other statements. For example, true statements can be asserted to databases, and the inference machinery of the programming language can then "animate" this by making deductions about the truth of other statements. Given an initial state, the rules of the system together with the language's inference mechanism determine the process that will unfold. The programmer can be surprised at this process as well as about the unfolding results.

Imperative programming languages such as Fortran, C or Pascal state what shall be done in given conditions. They start with an initial state and an explicit set of instructions that describe the process that will unfold. Thus there is no possibility here of any surprise about this process, as it was already determined by the programmer. What can be a surprise (and thus informative) is the states that it reaches. In conventional economic modelling, for example, utility or profit maximization are often the representations of the behavioural processes of agents. Since the actual processes are not represented, the models relate outcomes to initial states in a predetermined manner. While the outcomes might surprise the programmer, the processes cannot since they are either not directly represented at all or their outcomes are consequent only upon the initial conditions of the system.

It is easier and more natural to implement logic-based programs in declarative languages but easier and more natural to implement programs incorporating Bayesian processes in imperative languages. This is not to say that imperative programming approaches can't be used for logical inference or to examine an unfolding process or that declarative programming approaches cannot be used to calculate imperative programmes of action. It is just each is more suited to a particular task, in terms of ease of programming, interpretation, speed of execution and debugging.

You choose your formalism and hence programming language depending on whether you are interested in final states reached or processes independently of whether or not a final (equilibrium) state is reached.



Figure 1: Imperative vs. Declarative paradigms


Logic, Reasoning and A Programming Language for Simulating Economic and Business Processes with Artificially Intelligent Agents - 12 APR 96
[Next] [Previous] [Top] [Contents]

Generated with CERN WebMaker