guile-user
[Top][All Lists]
Advanced

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

Re: match error


From: Damien Mattei
Subject: Re: match error
Date: Tue, 1 Aug 2023 19:32:33 +0200

 it works now on the mac os system too:

EXACT

$1 = #t
scheme@(guile-user)> ,q
(base) mattei@macbook-pro-touch-bar library-FunctProg % uname -a
Darwin macbook-pro-touch-bar.home 22.5.0 Darwin Kernel Version 22.5.0:
Thu Jun  8 22:22:19 PDT 2023;
root:xnu-8796.121.3~7/RELEASE_ARM64_T8103 arm64

it seems the cleaning of old .o files solved the problem


On Tue, Aug 1, 2023 at 4:28 PM Damien Mattei <damien.mattei@gmail.com> wrote:
>
> 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 via email to

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