sceptic 4(ID:5398/sce002)


Prolog extension to add forward chaining

Cooper and Farringdon Imperial College 1993

from Sceptic Home Page

"Sceptic is a programming language originally developed at the Imperial Cancer Research Fund (London) (c.f. Hajnal et al., 1989). It has been successfully used to implement complex, time-evolving systems (e.g., biological process simulations (Zicha & Fox, 1991) and logical reasoning mechanisms (Hajnal et al., 1989)), autonomous systems (Fox, 1992), planning systems (O'Neill, 1992) and control processes in image interpretation and medical problem solving (Walker, 1991). It is currently being developed at UCL as a modelling language within the context of a modelling methodology for cognitive psychology. The project, which involves R. Cooper, J. Farringdon, J. Fox and T. Shallice, is aimed at developing a systematic methodology, with appropriate computational support, for computational modelling. Within the bounds of this project Sceptic has been used to develop rational reconstructions of previously implemented theories as well as implementations of theories which previously were only described verbally (see the associated case studies).

The work on cognitive modelling has taken Sceptic as a starting point because:

the language interpreter supports a number of mechanisms that are commonly assumed in cognitive theories (e.g., pattern-directed processing, content addressable memory retrieval/update, sequential processing and parallel data propagation modes); and
it has a simple but expressive syntax which assists clear and succinct representation of data-structures and processes, and its execution model is simple and easily described.
Sceptic runs under several Prologs. The environment currently comprises database facilities (i.e., Prolog's database), a rule interpreter, a set of libraries containing code that we have found useful in a number of modelling applications, and a debugger. It is envisaged that this may be extended to include object oriented facilities and a graphical interface.

The current version of Sceptic retains the distinctive control structure of previous versions of Sceptic (triggered productions, or conditional rewrite rules), as developed at ICRF, but differs from previous versions on a number of counts. A complete list is given in an appendix, but it is worth noting here the altered relation between Sceptic and Prolog. In previous versions, the Sceptic rule interpreter was an extension of Prolog which ran on top of Prolog. It was possible to mix Sceptic and Prolog in an arbitrary manner by escaping to the Prolog interpreter which was running underneath the Sceptic interface. Version 4 attempts to redefine the relation between Sceptic and Prolog in two ways. First, Sceptic rules and standard Prolog predicates are viewed as having very different functions within the system, and to reflect this the mixing of rules and predicates is highly constrained. Second, the interface has been substantially altered such that it differentiates Sceptic rules and Prolog predicates and acts accordingly. In doing this we have attempted to import many aspects of Prolog, as transparently as possible, into Sceptic. Users familiar with Prolog will note many features of Sceptic which have been imported (often without explicit mention) from Prolog. "




Related languages
sceptic 3 => sceptic 4   Evolution of

References:
  • Cooper, R. & Farringdon, J. Sceptic Version 4 User Manual Tech. Rep. UCL-PSY-ADREM-TR6, Department of Psychology, University College London, UK. view details ps Abstract: Preface
    Sceptic is a programming language originally developed at the Imperial Cancer Research Fund (London)
    (c.f. Hajnal et al., 1989). It has been successfully used to implement complex, time-evolving systems
    (e.g., biological process simulations (Zicha & Fox, 1991) and logical reasoning mechanisms (Hajnal et al.,
    1989)), autonomous systems (Fox, 1992), planning systems (O'Neill, 1992) and control processes in image
    interpretation and medical problem solving (Walker, 1991). It is currently being developed at ucl as a
    modelling language within the context of a modelling methodology for cognitive psychology. The project,
    which involves R. Cooper, J. Farringdon, J. Fox and T. Shallice, is aimed at developing a systematic
    methodology, with appropriate computational support, for computational modelling. Within the bounds
    of this project Sceptic has been used to develop rational reconstructions of previously implemented
    theories as well as implementations of theories which previously were only described verbally (see the
    associated case studies).
    The work on cognitive modelling has taken Sceptic as a starting point because:
    a. the language interpreter supports a number of mechanisms that are commonly assumed in cognitive
    theories (e.g., pattern-directed processing, content addressable memory retrieval/update, sequential
    processing and parallel data propagation modes); and
    b. it has a simple but expressive syntax which assists clear and succinct representation of data-
    structures and processes, and its execution model is simple and easily described.
    Sceptic runs under several Prologs. The environment currently comprises database facilities (i.e., Prolog's
    database), a rule interpreter, a set of libraries containing code that we have found useful in a number
    of modelling applications, and a debugger. It is envisaged that this may be extended to include object
    oriented facilities and a graphical interface.
    This version of Sceptic retains the distinctive control structure of previous versions of Sceptic (triggered
    productions, or conditional rewrite rules), as developed at ICRF, but differs from previous versions on a
    number of counts. A complete list is given in an appendix, but it is worth noting here the altered relation
    between Sceptic and Prolog. In previous versions, the Sceptic rule interpreter was an extension of Prolog
    which ran on top of Prolog. It was possible to mix Sceptic and Prolog in an arbitrary manner by escaping
    to the Prolog interpreter which was running underneath the Sceptic interface. Version 4 attempts to
    redefine the relation between Sceptic and Prolog in two ways. First, Sceptic rules and standard Prolog
    predicates are viewed as having very different functions within the system, and to reflect this the mixing
    of rules and predicates is highly constrained. Second, the interface has been substantially altered such
    that it differentiates Sceptic rules and Prolog predicates and acts accordingly. In doing this we have
    attempted to import many aspects of Prolog, as transparently as possible, into Sceptic. Users familiar
    with Prolog will note many features of Sceptic which have been imported (often without explicit mention)
    from Prolog.
    R. Cooper, J. Farringdon
    May 19, 1993 Extract: Introduction
    The Sceptic Language

    Sceptic is a programming language which extends Prolog (see, for example, Clocksin & Mellish, 1981) by the addition of a forward chaining control structure (the 'conditional rewrite rule'). This control structure allows procedural control aspects of a program to be distinguished from purely declarative aspects, which may be expressed in a subset of standard Prolog.

    The Sceptic execution model revolves around a changing database. Rewrite rules test this database and conditionally modify the database or trigger further rewrite rules. A Sceptic program generally consists of a specification of an initial state of the database and a set of rules which specify how the database evolves over time, or how the database changes in response to particular events.

    Sceptic interfaces to its database via two basic kinds of entities:

    Conditions:
    These are similar to Prolog predicates. They are purely logical objects which may query the database but not alter it. Paralleling Prolog predicates, conditions may succeed, instantiating variables contained therein, or fail.

    Actions:
    These explicitly perform what are normally side effects within Prolog. Most importantly, they allow output and database modification. There is no notion of success or failure for actions, and they do not instantiate variables.

    Conditions are either primitive or complex. The primitive conditions are just the Prolog primitives which have no side-effects. Complex conditions may be defined via predicate definitions as in standard Prolog, with the restriction that only conditions (primitive or complex) may be employed in the definition. In particular, Prolog primitives with side-effects (such as those which modify the database) may not be employed in the definition of complex conditions. This ensures that all conditions, primitive or complex, have no side-effects.

    Actions, like conditions, may also be primitive or complex. The primitive actions are those Prolog primitives which have side-effects: most notably, database modification primitives and output primitives. Complex actions (which are sometimes referred to as 'non-terminals') are defined via 'triggered productions', or 'conditional rewrite rules'. These provide declarative definitions of processes in terms of their subprocesses and the conditions which govern their execution.

    The two varieties of statement available in Sceptic allow a division between process control, which is specified in terms of forward chaining rewrite rules, and the declarative specification of conditions implicated in that control. That is, a programming style may be adopted within Sceptic whereby a program consists of a set of conditional rewrite rules which specify the possible control processes, together with a set of predicate definitions which specify the conditions which govern that control.
  • Cooper, R. "Towards an Object-Oriented language for cognitive modeling" pp556-561 view details Abstract: This paper describes work towards an object-oriented language for cognitive modeling. Existing modeling languages (such as C, LISP and Prolog) tend to be far removed from the techniques employed by psychologists in developing their theories. In addition, they encourage the confusion of implementation detail necessary for computational completeness with theoretically motivated aspects. The language described here (OOS) has been designed so as to facilitate this theory/implementation separation, while at the same time simplifying the modeling process for computationally non-sophisticated users by providing a set of classes of basic "cognitive'' objects. The object classes are tailored to the implementation of functionally modular cognitive models in the box/arrow style. The language is described (in terms of its execution model and its basic classes) before a sketch is given of a simple production system which has been implemented within the language. We conclude with a discussion of on-going work aimed at extending the coverage of the language and further simplifying the modeling process.
          in Proceedings of the 17th Annual Conference of the Cognitive Science Society, Pittsburgh, PA, USA 1995 view details
  • Cooper, R., Fox, J., Farringdon, J., & Shallice, T. "A systematic methodology for cognitive modelling" Artificial Intelligence, 85, 3-44. 1996 view details Abstract: The development and testing of computational models of cognition is typically ad hoc: few generally agreed methodological principles guide the process. Consequently computational models often conflate empirically justified mechanisms with pragmatic implementation details, and essential theoretical aspects of theories are frequently hard to identify. We argue that attempts to construct cognitive theories would be considerably assisted by the availability of appropriate languages for specifying cognitive models. Such languages, we contend, should: 1) be syntactically clear and succinct; 2) be operationally well-defined; 3) be executable; and 4) explicitly support the division between theory and implementation detail. In support of our arguments we introduce Sceptic, an executable specification language which goes some way towards satisfying these requirements. Sceptic has been successfully used to implement a number of cognitive models including Soar, and details of the Sceptic specification of Soar are included in a technical appendix. The simplicity of Sceptic Soar permits the essentials of the underlying cognitive theory to be seen, and aids investigation of alternative theoretical assumptions. We demonstrate this by reporting three computational experiments involving modifications to the functioning of working memory within Soar. Although our focus is on Soar, the thrust of the work is more concerned with general methodological issues in cognitive modelling.
          in Proceedings of the 17th Annual Conference of the Cognitive Science Society, Pittsburgh, PA, USA 1995 view details
    Resources