| Did you know ... | Search Documentation: |
| Pack starlog -- CHANGES_SUMMARY.md |
Make the default not to output eval() and no_eval() but not necessarily the contents of (), and have options to output eval(), no_eval() or both.
Added configurable options to control whether eval() and no_eval() wrappers appear in the output when converting code to Starlog notation.
starlog.pl)eval() and no_eval()
Total lines added: ~105 linesREADME.md)eval() and no_eval() Output"tests/test_output_eval_options.pl)New test file with 8 comprehensive tests:
demo_output_eval_options.pl)Interactive demo showing:
IMPLEMENTATION_SUMMARY_EVAL_OUTPUT.md)Detailed documentation covering:
| Option | Default | Description |
|---|---|---|
output_eval(false) | ✓ | Strip eval() wrappers from output |
output_eval(true) | Keep eval() wrappers in output | |
output_no_eval(false) | ✓ | Strip no_eval() wrappers from output |
output_no_eval(true) | Keep no_eval() wrappers in output |
?- starlog_output_code(A is no_eval(1+1)). A is 1+1
?- starlog_output_code(A is no_eval(1+1), _, [output_no_eval(true)]). A is no_eval(1+1)
?- starlog_output_code(B is eval("x":"y"), _, [output_eval(true)]).
B is eval("x":"y")
?- starlog_output_code(C is no_eval(eval(1+1)), _, [output_eval(true), output_no_eval(true)]). C is no_eval(eval(1+1))
compress(true)starlog.pl (modified)README.md (modified)tests/test_output_eval_options.pl (new)demo_output_eval_options.pl (new)IMPLEMENTATION_SUMMARY_EVAL_OUTPUT.md (new)
Total: 484 lines added across 5 files⚠️ Manual testing required - SWI-Prolog is not installed in the current environment.
Tests should be run with:
swipl -s tests/test_output_eval_options.pl swipl -s demo_output_eval_options.pl
tests/test_output_eval_options.pldemo_output_eval_options.pl