unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Damien Mattei <damien.mattei@gmail.com>
To: Jean Abou Samra <jean@abou-samra.fr>
Cc: guile-user <guile-user@gnu.org>
Subject: Re: match error
Date: Tue, 1 Aug 2023 16:28:04 +0200	[thread overview]
Message-ID: <CADEOaddd4cFZhgTuQigq-wdrDwcTQ_GC+gP93cfPDdGNn7Gp4Q@mail.gmail.com> (raw)
In-Reply-To: <8f9a19fdf114c535610588a090ab97d361210fe0.camel@abou-samra.fr>

i will test that , for now i'm testing under Linux on another system
(previous one was Mac OS)
and the same code works :

GNU Guile 3.0.1
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (load "start-λογικι-guile+.scm")
;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
;;;       or pass the --no-auto-compile argument to disable.
;;; compiling /home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm
;;; compiling /usr/share/guile/site/3.0/Scheme+.scm
;;; compiling /usr/share/guile/site/3.0/growable-vector.scm
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/growable-vector.scm.go
;;; assignment.scm:903:12: warning: macro `when' used before definition
;;; assignment.scm:935:2: warning: macro `when' used before definition
;;; assignment.scm:941:6: warning: macro `when' used before definition
;;; assignment.scm:947:6: warning: macro `when' used before definition
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/usr/share/guile/site/3.0/Scheme+.scm.go
;;; guile/logiki+.scm:3661:28: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3661:2: warning: possibly unbound variable `forfunct'
;;; guile/logiki+.scm:3641:26: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3641:2: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3765:6: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3765:25: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3869:6: warning: possibly unbound variable `openmp'
;;; guile/logiki+.scm:3869:25: warning: possibly unbound variable
`string->pointer'
;;; guile/logiki+.scm:3965:32: warning: possibly unbound variable
`parallel-vector-map'
;;; guile/logiki+.scm:4059:6: warning: possibly unbound variable `forfunct'
;;; guile/logiki+.scm:4059:27: warning: possibly unbound variable
`string->pointer'
;;; compiled /home/mattei/.cache/guile/ccache/3.0-LE-8-4.2/home/mattei/Dropbox/git/library-FunctProg/start-λογικι-guile+.scm.go
scheme@(guile-user)> (logic-test)

test 1
((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
EXACT

test 2
((¬a ∧ b ∧ d) ∨ (¬b ∧ ¬c) ∨ (c ∧ ¬d))
EXACT

test 3
((A ∧ B) ∨ (A ∧ C) ∨ (B ∧ C))
EXACT

test 4
((B0 ∧ B1) ∨ (B0 ∧ C1) ∨ (B1 ∧ C1))
EXACT

test 5
(or (and B2 B3) (and B2 B4) (and B3 (not B12)))
EXACT

test 6
(or (and (not a) (not b) (not c) (not d)) (and (not a) (not b) (not c)
d) (and (not a) (not b) c (not d)) (and (not a) b (not c) d) (and (not
a) b c (not d)) (and (not a) b c d) (and a (not b) (not c) (not d))
(and a (not b) (not c) d) (and a (not b) c (not d)) (and c (not d))) =
((¬a ∨ ¬b ∨ c) ∧ (¬a ∨ ¬b ∨ ¬d) ∧ (¬a ∨ ¬c ∨ ¬d) ∧ (b ∨ ¬c ∨ ¬d) ∧ (¬b
∨ c ∨ d))
EXACT

test 7
(or (and (and A B) (not (and C (or (and A (not B)) (and (not A) B)))))
(and (not (and A B)) (and C (or (and A (not B)) (and (not A) B))))) =
(or (and A B C) (and A B (not C)) (and A (not B) C) (and (not A) B C))
EXACT

test 8
(or (and B₂ B₃) (and B₂ B₄) (and B₃ (not B₁₂)))
EXACT

#t

with the same code shared between system via Dropbox

later i removed a debug info and the compilation was sticked on:
(load "start-λογικι-guile+.scm")

so i did in a terminal :
 mattei@pc-mattei:~$ zd .cache/guile/ccache/
total 16
drwxr-xr-x 4 mattei mattei 4096 juin   8  2021 .
drwxr-xr-x 3 mattei mattei 4096 mars   4  2020 ..
drwxr-xr-x 4 mattei mattei 4096 juil. 23  2020 2.2-LE-8-3.A
drwxrwxr-x 4 mattei mattei 4096 nov.  19  2021 3.0-LE-8-4.2
(base) mattei@pc-mattei:~$ rm -rf  .cache/guile/ccache/*

and it compiles well

no problem on the PC linux till now,for info the call of the macro in
previous message is from this instruction:

{iepi[{x + 1} 0] ← vct-prime-implicants[x]}

it assign the RHS a two dimension array (vector of vector) iepi[{x +
1} 0] with the LHS (left hand s-expression) vct-prime-implicants[x]
which the value of a one dimension vector

i will test again on the MacOS laptop , i remembered i had cleaned the
cache too ,so it is very strange... if it still fail i will activate
your debug info i never used but problem does not seems to come only
from my code.


On Tue, Aug 1, 2023 at 1:46 PM Jean Abou Samra <jean@abou-samra.fr> wrote:
>
> Le mardi 01 août 2023 à 12:46 +0200, Damien Mattei a écrit :
> > probably ,as you say , 'match' is used in other place but i 'grep-ed'
> > all the directory and can not find where, i'm only using match this 2
> > months  i even do not know it exists  before... i almost sure i never
> > use it in other place in the code,so i'm still not understand....
>
>
> I don't think we're on the same page. I'm saying that match is also
> used a lot internally in Guile's own code, so you should get a backtrace
> to find which one failed.
>
> ~/repos/guile $ rg "\(match" -g '*.scm' -g '!gc-benchmarks' | wc -l
> 1620
>
>



  reply	other threads:[~2023-08-01 14:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  9:53 (unknown) Damien Mattei
2023-08-01  9:59 ` Jean Abou Samra
2023-08-01 10:46   ` Re: Damien Mattei
2023-08-01 11:46     ` Re: Jean Abou Samra
2023-08-01 14:28       ` Damien Mattei [this message]
2023-08-01 17:32         ` match error Damien Mattei
2023-08-01 21:16           ` Jean Abou Samra
2023-08-02  6:52             ` Damien Mattei
2023-08-01 10:57 ` message without subject Zelphir Kaltstahl
2023-08-01 13:46   ` match error Damien Mattei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADEOaddd4cFZhgTuQigq-wdrDwcTQ_GC+gP93cfPDdGNn7Gp4Q@mail.gmail.com \
    --to=damien.mattei@gmail.com \
    --cc=guile-user@gnu.org \
    --cc=jean@abou-samra.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).