Search NASA⌕ Search

SEARCH · Search NASA

Results for “Prolog”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 19 records

An evaluation of Turbo Prolog with an emphasis on its application to the development of expert systems

Turbo Prolog is a recently available, compiled version of the programming language Prolog. Turbo Prolog is designed to provide not only a Prolog compiler, but also a program development environment for the IBM Personal Computer family. An evaluation of Turbo Prolog was made, comparing its features to other versions of Prolog and to the community of languages commonly used in artificial intelligence (AI) research and development. Three programs were employed to determine the execution speed of Turbo Prolog applied to various problems. The results of this evaluation demonstrated that Turbo Prolog can perform much better than many commonly employed AI languages for numerically intensive problems and can equal the speed of development languages such as OPS5+ and CLIPS, running on the IBM PC. Applications for which Turbo Prolog is best suited include those which (1) lend themselves naturally to backward-chaining approaches, (2) require extensive use of mathematics, (3) contain few rules, (4) seek to make use of the window/color graphics capabilities of the IBM PC, and (5) require linkage to programs in other languages to form a complete executable image.

Loftin, Richard B.↗

Expert system validation in prolog

An overview of the Expert System Validation Assistant (EVA) is being implemented in Prolog at the Lockheed AI Center. Prolog was chosen to facilitate rapid prototyping of the structure and logic checkers and since February 1987, we have implemented code to check for irrelevance, subsumption, duplication, deadends, unreachability, and cycles. The architecture chosen is extremely flexible and expansible, yet concise and complementary with the normal interactive style of Prolog. The foundation of the system is in the connection graph representation. Rules and facts are modeled as nodes in the graph and arcs indicate common patterns between rules. The basic activity of the validation system is then a traversal of the connection graph, searching for various patterns the system recognizes as erroneous. To aid in specifying these patterns, a metalanguage is developed, providing the user with the basic facilities required to reason about the expert system. Using the metalanguage, the user can, for example, give the Prolog inference engine the goal of finding inconsistent conclusions among the rules, and Prolog will search the graph intantiations which can match the definition of inconsistency. Examples of code for some of the checkers are provided and the algorithms explained. Technical highlights include automatic construction of a connection graph, demonstration of the use of metalanguage, the A* algorithm modified to detect all unique cycles, general-purpose stacks in Prolog, and a general-purpose database browser with pattern completion.

Stock, Todd↗

Use of a FORTH-based PROLOG for real-time expert systems. 1: Spacelab life sciences experiment application

A real-time expert system is being developed to serve as the astronaut interface for a series of Spacelab vestibular experiments. This expert system is written in a version of Prolog that is itself written in Forth. The Prolog contains a predicate that can be used to execute Forth definitions; thus, the Forth becomes an embedded real-time operating system within the Prolog programming environment. The expert system consists of a data base containing detailed operational instructions for each experiment, a rule base containing Prolog clauses used to determine the next step in an experiment sequence, and a procedure base containing Prolog goals formed from real-time routines coded in Forth. In this paper, we demonstrate and describe the techniques and considerations used to develop this real-time expert system, and we conclude that Forth-based Prolog provides a viable implementation vehicle for this and similar applications.

Paloski, William H.↗

Efficient reordering of Prolog programs

Redundant search often makes Prolog programs inefficient. Prolog execution corresponds to a depth-first traversal of an AND/OR graph; often a large subgraph will be searched successfully, with failure resulting from a subsequent small one. It is shown how reordering of Prolog clauses and especially goals can prevent unnecessary search. The restrictions on reordering are characterized and how they may be detected is shown. A new system of calling modes for Prolog, geared to reordering, and a system for inferring them automatically are designed. An improved method for determining a good goal order for Prolog clauses is presented, and it is used as the basis for a reordering system, showing how it can be guided by information about modes and restrictions to generate reordered Prolog that behaves correctly.

Gooley, Markian M.↗

Efficient reordering of PROLOG programs

PROLOG programs are often inefficient: execution corresponds to a depth-first traversal of an AND/OR graph; traversing subgraphs in another order can be less expensive. It is shown how the reordering of clauses within PROLOG predicates, and especially of goals within clauses, can prevent unnecessary search. The characterization and detection of restrictions on reordering is discussed. A system of calling modes for PROLOG, geared to reordering, is proposed, and ways to infer them automatically are discussed. The information needed for safe reordering is summarized, and which types can be inferred automatically and which must be provided by the user are considered. An improved method for determining a good order for the goals of PROLOG clauses is presented and used as the basis for a reordering system.

Gooley, Markian M.↗

Automatic program generation from specifications using Prolog

An automatic program generator which creates Prolog programs from input/output specifications is presented. The generator takes as input descriptions of the input and output data types, a set of tests, a set of transformations and the input/out relation. Abstract data types are used as models. The tests, the transformations and the input/out relation are also specified by equations. The heuristics used by the automatic propram generator in building Prolog programs are discussed.

Pelin, Alex↗

A technique for solving constraint satisfaction problems using Prolog's definite clause grammars

A new technique for solving constraint satisfaction problems using Prolog's definite clause grammars is presented. It exploits the fact that the grammar rule notation can be viewed as a state exchange notation. The novel feature of the technique is that it can perform informed as well as blind search. It provides the Prolog programmer with a new technique for application to a wide range of design, scheduling, and planning problems.

Nachtsheim, Philip R.↗

System architectures for PROLOG execution

The principal features of PROLOG are reviewed with particular reference to the use of the language in the development of expert systems. Attention is given to the language syntax, data structures and recursion, constructs that alter control, predicates that modify the database, predicates for input and output, and metalogical predicates. The parts of the Warren Abstract Machine are then described, and it is shown how it executes programs. Parallel architectures proposed for expert systems are examined, and the principal varieties of parallelism available in PROLOG and examples of architectures exploiting them are discussed.

Gooley, Markian M.↗

A Prolog Emulator

This note describes an efficient software emulator for the Warren Abstract Machine (WAM) Prolog architecture. The version of the WAM implemented is called Lcode. The Lcode emulator, written in C, executes the 'naive reverse' benchmark at 3900 LIPS. The emulator is one of a set of tools used to measure the memory-referencing characteristics and performance of Prolog programs. These tools include a compiler, assembler, and memory simulators. An overview of the Lcode architecture is given here, followed by a description and listing of the emulator code implementing each Lcode instruction. This note will be of special interest to those studying the WAM and its performance characteristics. In general, this note will be of interest to those creating efficient software emulators for abstract machine architectures.

Tick, Evan↗

The rid-redundant procedure in C-Prolog

C-Prolog can conveniently be used for logical inferences on knowledge bases. However, as similar to many search methods using backward chaining, a large number of redundant computation may be produced in recursive calls. To overcome this problem, the 'rid-redundant' procedure was designed to rid all redundant computations in running multi-recursive procedures. Experimental results obtained for C-Prolog on the Vax 11/780 computer show that there is an order of magnitude improvement in the running time and solvable problem size.

Chen, Huo-Yan↗

Automatic program generation from specifications using PROLOG

An automatic program generator which creates PROLOG programs from input/output specifications is described. The generator takes as input descriptions of the input and output data types, a set of transformations and the input/output relation. Abstract data types are used as models for data. They are defined as sets of terms satisfying a system of equations. The tests, the transformations and the input/output relation are also specified by equations.

Pelin, Alex↗

Solving Constraint-Satisfaction Problems In Prolog Language

Technique for solution of constraint-satisfaction problems uses definite-clause grammars of Prolog computer language. Exploits fact that grammar-rule notation viewed as "state-change notation". Facilitates development of dynamic representation performing informed as well as blind searches. Applicable to design, scheduling, and planning problems.

Nachtsheim, Philip R.↗

Adding Concrete Syntax to a Prolog-Based Program Synthesis System

Program generation and transformation systems manipulate large, pa- rameterized object language fragments. Support for user-definable concrete syntax makes this easier but is typically restricted to certain object and meta languages. We show how Prolog can be retrofitted with concrete syntax and describe how a seamless interaction of concrete syntax fragments with an existing legacy meta-programming system based on abstract syntax is achieved. We apply the approach to gradually migrate the schemas of the AUTOBAYES program synthesis system to concrete syntax. Fit experiences show that this can result in a considerable reduction of the code size and an improved readability of the code. In particular, abstracting out fresh-variable generation and second-order term construction allows the formulation of larger continuous fragments and improves the locality in the schemas.

Fischer, Bernd↗

Diagnosing battery behavior with an expert system in PROLOG

Power for the Hubble Space Telescope comes from a system of 20 solar panel assemblies (SPAs) and six nickel-cadmium batteries. The HST battery system is simulated by the HST Electrical Power System (EPS) testbed at Marshall Space Flight Center. The Nickel Cadmium Battery Expert System (NICBES) is being used to diagnose faults of the testbed system, evaluate battery status and provide decision support for the engineer. Extensive telemetry of system operating conditions is relayed through a DEC LSI-11. A BASIC program running on a PC monitors the flow of data, figures cell divergence and recharge ratio, and stores these values, along with other selected data, for use by the expert system.

Kirkwood, N.↗

Implementing embedded artificial intelligence rules within algorithmic programming languages

Most integrations of artificial intelligence (AI) capabilities with non-AI (usually FORTRAN-based) application programs require the latter to execute separately to run as a subprogram or, at best, as a coroutine, of the AI system. In many cases, this organization is unacceptable; instead, the requirement is for an AI facility that runs in embedded mode; i.e., is called as subprogram by the application program. The design and implementation of a Prolog-based AI capability that can be invoked in embedded mode are described. The significance of this system is twofold: Provision of Prolog-based symbol-manipulation and deduction facilities makes a powerful symbolic reasoning mechanism available to applications programs written in non-AI languages. The power of the deductive and non-procedural descriptive capabilities of Prolog, which allow the user to describe the problem to be solved, rather than the solution, is to a large extent vitiated by the absence of the standard control structures provided by other languages. Embedding invocations of Prolog rule bases in programs written in non-AI languages makes it possible to put Prolog calls inside DO loops and similar control constructs. The resulting merger of non-AI and AI languages thus results in a symbiotic system in which the advantages of both programming systems are retained, and their deficiencies largely remedied.

Feyock, Stefan↗

Retrofitting the AutoBayes Program Synthesis System with Concrete Syntax

AutoBayes is a fully automatic, schema-based program synthesis system for statistical data analysis applications. Its core component is a schema library. i.e., a collection of generic code templates with associated applicability constraints which are instantiated in a problem-specific way during synthesis. Currently, AutoBayes is implemented in Prolog; the schemas thus use abstract syntax (i.e., Prolog terms) to formulate the templates. However, the conceptual distance between this abstract representation and the concrete syntax of the generated programs makes the schemas hard to create and maintain. In this paper we describe how AutoBayes is retrofitted with concrete syntax. We show how it is integrated into Prolog and describe how the seamless interaction of concrete syntax fragments with AutoBayes's remaining legacy meta-programming kernel based on abstract syntax is achieved. We apply the approach to gradually mitigate individual schemas without forcing a disruptive migration of the entire system to a different First experiences show that a smooth migration can be achieved. Moreover, it can result in a considerable reduction of the code size and improved readability of the code. In particular, abstracting out fresh-variable generation and second-order term construction allows the formulation of larger continuous fragments.

Fischer, Bernd↗

SIRE: A Simple Interactive Rule Editor for NICBES

To support evolution of domain expertise, and its representation in an expert system knowledge base, a user-friendly rule base editor is mandatory. The Nickel Cadmium Battery Expert System (NICBES), a prototype of an expert system for the Hubble Space Telescope power storage management system, does not provide such an editor. In the following, a description of a Simple Interactive Rule Base Editor (SIRE) for NICBES is described. The SIRE provides a consistent internal representation of the NICBES knowledge base. It supports knowledge presentation and provides a user-friendly and code language independent medium for rule addition and modification. The SIRE is integrated with NICBES via an interface module. This module provides translation of the internal representation to Prolog-type rules (Horn clauses), latter rule assertion, and a simple mechanism for rule selection for its Prolog inference engine.

Bykat, Alex↗

Automated knowledge-base refinement

Over the last several years, we have developed several systems for automatically refining incomplete and incorrect knowledge bases. These systems are given an imperfect rule base and a set of training examples and minimally modify the knowledge base to make it consistent with the examples. One of our most recent systems, FORTE, revises first-order Horn-clause knowledge bases. This system can be viewed as automatically debugging Prolog programs based on examples of correct and incorrect I/O pairs. In fact, we have already used the system to debug simple Prolog programs written by students in a programming language course. FORTE has also been used to automatically induce and revise qualitative models of several continuous dynamic devices from qualitative behavior traces. For example, it has been used to induce and revise a qualitative model of a portion of the Reaction Control System (RCS) of the NASA Space Shuttle. By fitting a correct model of this portion of the RCS to simulated qualitative data from a faulty system, FORTE was also able to correctly diagnose simple faults in this system.

Mooney, Raymond J.↗