Re: [eclipse-clp-users] Question about recursion frames inECLiPSe-CLP

From: Joachim Schimpf <jschimpf_at_...153...>
Date: Thu, 15 Jan 2009 10:59:19 +1100
Hi Adrian,

I think what happens is that the system tries to print an error message,
but because of the MEMORY_IO setting in the example, it only ends up in
a memory buffer.

Try to reproduce the following with the attached simpler example file:

asterix% pwd
/homes/js10/SF/Patch60/Kernel/i386_linux
asterix% make libeclipse.so
make: `libeclipse.so' is up to date.
asterix% gcc -I. -I ../src eg_c_simple.c libeclipse.so
asterix% LD_LIBRARY_PATH=. ECLIPSEDIR=.. ./a.out true
Goal: true
Result: 0
asterix% LD_LIBRARY_PATH=. ECLIPSEDIR=.. ./a.out fail
Goal: fail
Result: 1
asterix% LD_LIBRARY_PATH=. ECLIPSEDIR=.. ./a.out "writeln(hello)"
Goal: writeln(hello)
hello
Result: 0


-- Joachim

#include <stdio.h>
#include "eclipse.h"

main(int argc, char **argv)
{
    int res;

    if (argc != 2) { printf("Usage: %s goal\n", argv[0]); exit(-1); }

    ec_init();
    printf("Goal: %s\n", argv[1]);
    ec_post_string(argv[1]);
    res = ec_resume();
    printf("Result: %d\n", res);
    ec_cleanup();
    exit(0);
}
Received on Wed Jan 14 2009 - 23:59:29 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST