Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLP(ℤ): thread 'main' panicked at 'index out of bounds: ...' #253

Closed
triska opened this issue Dec 6, 2019 · 1 comment
Closed

CLP(ℤ): thread 'main' panicked at 'index out of bounds: ...' #253

triska opened this issue Dec 6, 2019 · 1 comment

Comments

@triska
Copy link
Contributor

triska commented Dec 6, 2019

With clpz8.pl from https://www.metalevel.at/clpz/scryer/clpz8.pl and the following program saved as sendmory.pl:

:- use_module(clpz8).

puzzle([S,E,N,D] + [M,O,R,E] = [M,O,N,E,Y]) :-
        Vars = [S,E,N,D,M,O,R,Y],
        Vars ins 0..9,
        all_different(Vars),
                  S*1000 + E*100 + N*10 + D +
                  M*1000 + O*100 + R*10 + E #=
        M*10000 + O*1000 + N*100 + E*10 + Y,
        M #\= 0, S #\= 0.

I get:

$ scryer-prolog sendmory.pl
?-  puzzle(Ps), copy_term(Ps, Ps, Gs).
false. % (Note: This should actually succeed, I will file this separately!)
?- clpz:goal_expansion(cis(A,B), Y).
thread 'main' panicked at 'index out of bounds: the len is 99 but the index is 458445', /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_rust/rust/work/rustc-1.36.0-src/src/libcore/slice/mod.rs:2695:10
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
@triska
Copy link
Contributor Author

triska commented Dec 7, 2019

The crash no longer occurs, thank you a lot! Please see #254 for the copy_term/3 related issues.

@triska triska closed this as completed Dec 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant