Skip to content

Update bddem DT solving support - exhaustive with BDD/ADD and sound-p…#4

Closed
Zequan99 wants to merge 3 commits intofriguzzi:masterfrom
Zequan99:bddem-dt-exhaustive
Closed

Update bddem DT solving support - exhaustive with BDD/ADD and sound-p…#4
Zequan99 wants to merge 3 commits intofriguzzi:masterfrom
Zequan99:bddem-dt-exhaustive

Conversation

@Zequan99
Copy link
Copy Markdown
Contributor

Major changes: DT-logic rewritten (supports multihead decisions).

Note:

  • Makefile.tmp should work for Linux and MacOS (tested on MacOS).
  • Must use the new pita (pull request already made!).

@friguzzi
Copy link
Copy Markdown
Owner

Hi Zequan,
I tried to run the tests and I got:
(base) fabrizio@MacBook-Pro-5 prolog % swipl bddem_test.pl
ERROR: /Users/fabrizio/.local/share/swi-prolog/pack/bddem/prolog/bddem.pl:40:
ERROR: /Users/fabrizio/.local/share/swi-prolog/pack/bddem/prolog/bddem.pl:40: Initialization goal raised exception:
ERROR: open_shared_object/3: dlopen(/Users/fabrizio/.local/share/swi-prolog/pack/bddem/lib/arm64-darwin/bddem.so, 0x0001): Library not loaded: /opt/homebrew/opt/swi-prolog/lib/swipl/lib/arm64-darwin/libswipl.10.dylib
Referenced from: <787FFAFA-3244-3479-AB6E-F3C04C2CBF65> /Users/fabrizio/.local/share/swi-prolog/pack/bddem/lib/arm64-darwin/bddem.so
Reason: tried: '/opt/homebrew/opt/swi-prolog/lib/swipl/lib/arm64-darwin/libswipl.10.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/swi-prolog/lib/swipl/lib/arm64-darwin/libswipl.10.dylib' (no such file), '/opt/homebrew/opt/swi-prolog/lib/swipl/lib/arm64-darwin/libswipl.10.dylib' (no such file)
There is probabibly a problem with the makefile: my swipl was installed from sources and is
(base) fabrizio@MacBook-Pro-5 prolog % which swipl
/usr/local/bin/swipl

@Zequan99
Copy link
Copy Markdown
Contributor Author

Hi Fabrizio,

Maybe it's a swipl and swipl-ld mismatch?

On my Mac:
zhuang@UP1-CRI-GTD4P3212W test % which swipl-ld
/opt/homebrew/bin/swipl-ld
zhuang@UP1-CRI-GTD4P3212W test % which swipl
/opt/homebrew/bin/swipl

I've just changed Makefile.temp so that SWIPL_LD is derived from SWIPL.

@friguzzi
Copy link
Copy Markdown
Owner

Now I get

(base) fabrizio@MacBook-Pro-5 prolog % swipl bddem_test.pl
Welcome to SWI-Prolog (threaded, 64 bits, version 10.1.5-14-g4e2eff69c)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

6 ?- test_bddem.
[17/17] dtprob:probabilitdd .................................. **FAILED (0.000 sec)
ERROR: /Users/fabrizio/.local/share/swi-prolog/pack/bddem/prolog/bddem_test.pl:282:
ERROR:     test dtprob:probabilitdd: received error: test_bddem:prepare_vars/5: Unknown procedure: test_bddem:add_decision_var/3
  However, there are definitions for:
        test_bddem:add_decision_var/4
ERROR: 1 test failed
% 16 tests passed
% Test run completed in 0.121 seconds (0.108 cpu)
false.

@Zequan99
Copy link
Copy Markdown
Contributor Author

Yes this is because i forgot to update bddem_test.pl. Sorry about that.
Now it should be ok. I also added a test for dt with sound-pruning

@friguzzi
Copy link
Copy Markdown
Owner

Now it's working on linux and mac

@friguzzi
Copy link
Copy Markdown
Owner

This evening I will accept the pull request.

@Zequan99
Copy link
Copy Markdown
Contributor Author

Great. Thank you.

@Zequan99
Copy link
Copy Markdown
Contributor Author

For Windows users (Jacques for example), you are going to provide a build dll?

@friguzzi
Copy link
Copy Markdown
Owner

Hi Zequan,
you should do a new pull request because this one does not include the latest commit

@friguzzi friguzzi closed this Mar 29, 2026
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

Successfully merging this pull request may close these issues.

2 participants