Minor fix to number_codes/chars. reset string if int conversion fails.
included string.h, which some compilers seem to need for memcpy,
Fixed (this time, I hope) number_chars/codes to handle multiple bases.
Fixed (I hope) the strict-aliasing violations pointed out. Used memcpy to avoid bad coercions.
Concatenate multiple -e command arguments to accumulate command.
Thanks very much for that information. I will look into seeing what can be done. (I haven't understood that code for handling byte-backward issues for at least 35 years, if I ever did, even though I'm quite sure I wrote it. I hope I'm not too old to relearn it....)
The standards conformant way to do this without invoking UB is to use either that (union type access) or a memcpy. Both are commonly used in this scenario. Both will produce, on gcc or clang with optimizations enabled, the same code (in fact, the same code that the strict-aliasing violation produces, except the aliasing could trigger UB and explode instead). It's a well known pattern that the compiler has been taught to recognize. The memcpy guarantees there are no alignment issues whereas the union...
So I guess the accepted way to do these things would be to use union types? And storing under one type and retrieving through the other? Hmmm. If that would work, that would require having an extra memory location for the union variable and the copy. If this would work, and it's worth the trouble, I could look into it.
Small bug fixes, fix number_chars/codes, handle 0-divide, bug in =.. in not handling floats right (an oddity remains, but...)
fix a register allocation bug; finally get HoldR management right, I hope.
Some cleanup in compiler; minor improvement in code generation reducing redundant loads.
Fixed compiler bug in register allocation (reporter Paulo Maura); cmpreg overwrites its 2nd arg, and HoldR incorrectly built.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> I hope I fixed this by changing to int main(){return 0;} On 3/14/24 8:23 PM, Eli Schwartz wrote: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> [bugs:#265] Build fails with implicit-int in a configure test probe Status: open Group: Performance problem Created: Fri Mar 15, 2024 12:23 AM UTC by Eli Schwartz...
possibly fixed a configure.in bug with --export-dynamic
Build fails with implicit-int in a configure test probe
Build fails with strict-aliasing violations.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style> I may have found what's wrong with this package. Please try On 3/1/24 4:36 AM, Alvin Hsu wrote: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> I believe I may have found one more case. Recompilation is triggered for at least a subset of packages in $XSB_DIR/packages. I can get it to reliably reproduce...
replaced file_time with path_sysop
added notolderthan; made newerthan into a strict comparison
I believe I may have found one more case. Recompilation is triggered for at least a subset of packages in $XSB_DIR/packages. I can get it to reliably reproduce with the following shell script on a fresh build of git-origin (using [wildmatch] as an example, although brief testing of [regmatch] shows the same result): # In $XSB_DIR # Attempt to load [wildmatch] package, and see it works fine without # recompilation. bin/xsb # Simulate all timestamps being set as Guix does ($date is arbitrary; just...
Fixed bug by replacing jsonld with json-ld
More file time comparisons to change to strict.
You found another way file times are tested. OK. I've made changes to the system, as you suggested. Maybe now we've found them all? Thanks for your patience.
Hi Michael, The touch commands were meant to emulate an XSB source file having the same modtime as its compiled file. This issue is not unique to xsb_configuration.P; I just used it as an example. Guix sets all file modtimes to the UNIX epoch and installs packages in read-only directories for reproducibility purposes, so this issue should show up with any built-in recompile-able module.
Hi David, It looks like XSB still encounters the same error. The offender seems to be the use of path_sysop/3 on line 227 of consult.P in this case; I've attached a patch that swaps it out for file_strictly_older_than/2 which allows me to start the REPL without an error.
I've committed the changes. Alvin, can you try again?
Another update to change file time testing to < from <=
I see I didn't change all the places that file times were checked. I've found and changed more. I will see if it passes the testsuite, and if so, commit the changes. Stay tuned....
Why do you touch xsb configuration.p? You can see that this causes an error. Try touching a new empty file Feb 13, 2024 02:44:27 Alvin Hsu alvhsu@users.sourceforge.net: Hi Michael, Thanks for going through with this! Unfortunately, it appears that the issue is still present at commit [660f0f79b1007f2f0be5bfa4e079abaf12b4f1d9]; building without my patch results in XSB attempting to recompile for equal modtimes as it did before. I've written a shell script that reproduces this on my end with a standard...
Hi Michael, Thanks for going through with this! Unfortunately, it appears that the issue is still present at commit [660f0f79b1007f2f0be5bfa4e079abaf12b4f1d9]; building without my patch results in XSB attempting to recompile for equal modtimes as it did before. I've written a shell script that reproduces this on my end with a standard (non-Guix) build that follows "Installing XSB under UNIX" in the manual: # Example with xsb_configuration file, but similarly errors out when applied to # other files...
I see that David changed<= to <. Will use it for now unless someone complains that this breaks something Feb 8, 2024 23:27:09 Alvin Hsu alvhsu@users.sourceforge.net: Hello again, I finally got around to bringing the modtime recompilation issue up with others in the Guix community, and it seems like resolving it without a downstream patch would indeed require a change in how XSB decides when recompilation is needed. Would a build-time flag for determining this be acceptable? An environment variable...
Changed recompile timme diff between .P and .xwam to be < rather than <=
Hello again, I finally got around to bringing the modtime recompilation issue up with others in the Guix community, and it seems like resolving it without a downstream patch would indeed require a change in how XSB decides when recompilation is needed. Would a build-time flag for determining this be acceptable? An environment variable check might also work (we can wrap xsb to always have it set in this case).
ignore janus*.egg-info
ignore janus.egg-info
Fixed janusm.c for windows and added DllExport to newly used error function.
smb forgot to commit
smb forgot to commit
smb forgot to commit
builtin and C functions to speed up prolog_db lookup.
Added documentation about atom_prefi/2
Added atom prefix with behavior similar to list_prefix.
Added exportt statement for list_prefix/2.
Small change to .gitignore
Added documentation for list prefix.
Changed the name last to list_last.
Added a prefix/2.
Changed around a couple of errors.
Added extern for domain_error_vargs.
Changed a couple of existence errors to python errors.
A couple of minor updates to make janus (prolog calling python) work (mostly) on windows (with correct PYTHON_LIBRARY env var.
made loader error message clearer.
Portability fix as reported by Felix.
More work with Mcintyre unearthed the following additional issue: The predicates save_..., which are supposed to copy "sampled" facts into a new predicate "mem" and then retract the "sampled" facts, are currently implemented using the schema save_samples(M,G):- sampled(R,Sub,V), assert(M:mem(G,R,Sub,V)), retract(sampled(R,Sub,V)), fail. save_samples(_M,_G). In SWI-Prolog, the failure-driven loop executes correctly, but XSB doesn't seem to take well to backtracking over a partially retracted predicate...
Changes for fancier new python_errors.
Change to xsb_library_error to make it a little fancier.
Another small change for fancier python errors.
Updated tests for slightly fancier Python error.
Yes, explicit module modifiers override the module associated with the symbol (at least in all places we remembered to add the necessary code :-).
You were absolutely right! The "fake import" did fix the issue. What I have now done is just put explicit module qualifications on any predicate call within a maplist, and that also solved the problem.
You were absolutely right! The "fake import" did fix the issue. What I have now done is just put explicit module qualifications on any function call within a maplist, and that also solved the problem.
I think I know what is going on. Note that the predicate/functor maplist appears both as maplist/3 as the outer call (as a predicate) and as maplist/1 (as the functor of the first argument to the outer call). Now the definition of maplist probably makes a call of the form call(P,X,Y). Now call/3 uses the module of the first argument to make the predicate symbol for the resulting call. So here the maplist/1 functor is not imported, so it is in usermod, and thuse the maplist/3 call is also to maplist...
Porting functional-style code from SWI Prolog
Updates for new Python errors.
Updates for new python errors.
setattr -> setAttr
setattr -> ssetattr
setAttr -> setattr
More systematic use of existence errors.
Added a few new checks for proper error handling.
In prolog_db:select_db/4, eliminate uses of union_db by passing substructures appropriately.
Fixed performance bug in select_db/4 (wasn't short-circuiting).
Temporary addition to construct PIP
Added select_db/4 to prolog_db library, and other accumulated minor updates to prolog_db.
Some proofreading of the Janus sections for inclusion of the PIP.
Added documentation for jns.close_query.
Fixes to jns_close_query() for tests and added increfs before returning py_none.
Added tests for jns.close_query() in test_Apply.py
Some updates for the manual.
Changes for Linux.
Changes to make Janus testsuite multi-platform.
Added another test file -- for setattr.xsxcxsxcg
Changes to make NO_TRUTHVALS default for janus.apply_once.
Changes in tests to use NO_TRUTHVALS as default for apply)once
Implemented py_setAttr()
Tests for setattr and an additional test for py_call.
MOre powerful py_call.
Documenttion of more powerful py_call.
I should have added this for the testsuite.
Expanded py_call
Added tests for expanded py_call.
Updates to documentation -- rewrite of janus-plg.tex
Added py_add_lib_dir/2.
Changed iteration strategy of py_func
cSupporting eager iterations in py_func
I hate git.
I hate git.
Changes for iteration option in pyfunc.
Some changes for iteration in testing in janus-py.
Updated Janus-py documentation.