[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] dbc (design-by-contract-egg) related problem

From: Martin Schneeweis
Subject: [Chicken-users] dbc (design-by-contract-egg) related problem
Date: Fri, 22 Jun 2018 22:22:23 +0200


it seems to me that the dbc egg does not work well when using the
compiler switch "-debug-info".

Without -debug-info my test executable procuces the following output
(something like that I had expected):

  Contract violation in (add):
  Error: exception-handler returned
  dbc-supplier-test.scm:10: signal              <--

  - but -

When compiled *with* "-debug-info", the executable produces no output at

(Maybe the problem has something to do with an exception handler that
returns on a non-continuable exception? - I tried a simple example -
but the simple example works (shows some output) with and without

The problem is very simple to reproduce - put the attached files in a
directory and call

> csc -sJ %dbc-supplier-test.scm
> csc -sJ dbc-supplier-test.scm
> csc dbc-client-test.scm
> ./dbc-client-test

  => expected output
> csc -debug-info dbc-client-test.scm
> ./dbc-client-test

  => no output
I tried different things 
  - also compiling the ...import.scm-files 
  - compiling *all* files with "-debug-info" 
  - removing the *.scm files before compiling the final executable
but nothing works (if "-debug-info" is used)

(By the way - I also don't understand why I need the "(use extras)" in
"dbc-client-test.scm" - but without that the executable complains
"Error: unbound variable: sort")


  - output.std-out.txt / output.std-err.txt
      full output of the executable
  - %dbc-supplier-test.scm
      raw definition of "add"
  - dbc-supplier-test.scm
      contract definition for "add" 
  - dbc-client-test.scm
      the "executable" that uses "add"

Attachment: dbc-client-test.scm
Description: Text Data

Attachment: %dbc-supplier-test.scm
Description: Text Data

Attachment: dbc-supplier-test.scm
Description: Text Data

Attachment: output.std-err.txt
Description: Text document

Attachment: output.std-out.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]