Vitor Santos Costa
3b1ab8cfd9
do not recover space if there is an overflow. (obs from Paulo Moura).
2010-02-01 21:43:45 +00:00
Vítor Manuel de Morais Santos Costa
9d1f0cd361
incremental copying with or-threads.
2010-02-01 20:05:01 +00:00
Vitor Santos Costa
a0b48eb108
protect against calls to garbage collector (obs from Paulo Moura).
2010-01-31 23:03:55 +00:00
Vitor Santos Costa
6b8c2b096a
make sure everything is close together.
2010-01-31 23:03:27 +00:00
Vítor Manuel de Morais Santos Costa
10744069fc
fix global variable core dump in threaded yapor.
2010-01-29 18:09:07 +00:00
Vítor Manuel de Morais Santos Costa
4d341f2aab
fix bad call to gc (obs from Jose Santos).
2010-01-29 15:21:00 +00:00
Vítor Manuel de Morais Santos Costa
f56b9ab426
each OPTYap worker needs its own auxiliary stack!
2010-01-29 12:28:00 +00:00
Vítor Manuel de Morais Santos Costa
139fc6c440
small fixes for CUT_C
2010-01-28 15:42:49 +00:00
Vitor Santos Costa
b4b9891242
fix for gprof in 64 bit OSX.
2010-01-27 10:59:59 +00:00
Vitor Santos Costa
cfba7815c1
fix compilation in OSX, WINDOWS
2010-01-26 23:36:00 +00:00
Vítor Manuel de Morais Santos Costa
bcc4a27206
cut_succeed and cut_fail should recover pool of try_c and should
...
do trim_trail (not that the latter really matters).
2010-01-26 18:03:09 +00:00
Vítor Manuel de Morais Santos Costa
98c0964c80
iget rid of annoying message.
2010-01-26 16:35:15 +00:00
Vitor Santos Costa
b112574dc5
booting should not be console controlled.
2010-01-26 12:20:46 +00:00
Vitor Santos Costa
df267a07b9
be able to parse "hello"
2010-01-26 12:19:48 +00:00
Vítor Manuel de Morais Santos Costa
b0ea945ebc
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2010-01-26 11:40:47 +00:00
Vítor Manuel de Morais Santos Costa
4d54ea4c92
improve PP on threaded version
2010-01-26 11:40:32 +00:00
Vitor Santos Costa
2702c7e973
oops, forgot deref
2010-01-25 21:28:51 +00:00
Vitor Santos Costa
c8ee7259d7
allow MMAP variable on OSX.
2010-01-25 12:29:27 +00:00
Vitor Santos Costa
5cd85f4eaa
export Yap_IsGroundTerm(t)
2010-01-25 12:28:49 +00:00
Vitor Santos Costa
98769ce9af
fix case where debugger was finding the wrong clause.
2010-01-25 10:21:40 +00:00
Vitor Santos Costa
ce3a193ae7
fix forgotten unlocks.
2010-01-25 09:01:04 +00:00
Vitor Santos Costa
7854f39fb9
in SYSTEM_MALLOC, save_heap makes no sense (as it stands).
2010-01-22 22:29:07 +00:00
Vítor Manuel de Morais Santos Costa
a7c1e9afba
fix hashing over empty atoms (obs from Jose Santos).
2010-01-21 15:21:26 +00:00
Vítor Manuel de Morais Santos Costa
1187e58005
fix unnecessary unlocking (obs from Jiefei Ma).
2010-01-21 15:05:59 +00:00
Vítor Manuel de Morais Santos Costa
7bdc216cf6
get rid of the 0x0x problem.
2010-01-21 15:05:01 +00:00
Vitor Santos Costa
fa9425cd21
make sure there is indexing code after a record_at
2010-01-21 10:00:24 +00:00
Vitor Santos Costa
2edc06b6a2
fix unifiable for attributed variables (obs from Jiefei Ma).
2010-01-21 09:47:55 +00:00
Vitor Santos Costa
d78591f73c
don't forget that we may have aaa and aa in substring.
2010-01-18 14:27:56 +00:00
Vitor Santos Costa
8f9f1223e7
fix sub_atom(xxx,_,_,_,'') (obs from David Vaz).
2010-01-17 00:04:17 +00:00
Vítor Manuel de Morais Santos Costa
89e38cbcc0
or_last is different under yapor.
2010-01-15 16:15:36 +00:00
Vitor Santos Costa
7da431fe00
fix fix :(
2010-01-15 10:58:58 +00:00
Vitor Santos Costa
70c762c162
fix undefined predicate (made Logtalk loop).
2010-01-15 01:03:34 +00:00
Vítor Manuel de Morais Santos Costa
a498dc1265
icompile table+orp
2010-01-14 17:38:39 +00:00
Vítor Manuel de Morais Santos Costa
5ef31fbfd2
experiment in or-parallel threads.
2010-01-14 15:58:19 +00:00
Vítor Manuel de Morais Santos Costa
ac104aac9c
revert previous commit.
2010-01-14 15:57:16 +00:00
Vítor Manuel de Morais Santos Costa
31314c8059
fix warning about not checking output.
2010-01-14 15:43:18 +00:00
Vitor Santos Costa
8d5c490ff7
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2010-01-12 22:21:46 +00:00
Vítor Manuel de Morais Santos Costa
d4b14648b0
fix confusion with SWI handling of C-backtrackable predicates.
2010-01-12 14:58:48 +00:00
Vítor Manuel de Morais Santos Costa
4670e456a5
do not check for bom over binary files (obs from Nuno Fonseca).
2010-01-12 14:08:38 +00:00
Vitor Santos Costa
5824e5ecea
fix debugging info.
2010-01-12 10:08:15 +00:00
Vitor Santos Costa
02108d2017
make it so that we always use the fixed op for |. Needs improement.
2010-01-12 10:06:10 +00:00
Vítor Manuel de Morais Santos Costa
324833f84a
fix excessive trimming in C-interface for backtrackable predicates (obs from José Vieira).
2010-01-11 15:44:43 +00:00
Vitor Santos Costa
e86a995dd2
fix bad test faster interface to eval (obs from Jose Santos)
2010-01-11 10:35:36 +00:00
Vitor Santos Costa
5fc26e1b45
improve emulataion of backtrackable SWI c-code (request from NF).
2010-01-06 11:25:15 -02:00
Vitor Santos Costa
a7e6c5672e
try to speed up eval a bit.
2010-01-04 21:16:42 -02:00
Vitor Santos Costa
33f3dcc3d1
avoid excessive error testing
2010-01-03 15:43:07 -02:00
Vitor Santos Costa
da4aa804a7
improve error handling for is/2.
2010-01-03 15:42:51 -02:00
Vitor Santos Costa
ab0913a2df
ask for space proportional to the free trail space at trail overflow.
2009-12-21 10:26:00 -02:00
Vitor Santos Costa
6d1eec34db
make atom locking compatible with SWI-Prolog.
2009-12-21 10:12:47 -02:00
Vitor Santos Costa
6ec92ac5c0
handle correctly file rewind in the presence of ungetc (obs from Jose Santos).
2009-12-19 19:57:20 -02:00
Vitor Santos Costa
79a1d3e13c
fix thread stuff (obs from Jiefei Ma).
2009-12-17 23:55:09 -02:00
Vitor Santos Costa
5b8dc25eff
fix locking stuff.
2009-12-17 16:11:02 -02:00
Vitor Santos Costa
6aff7bda59
fix initialization in threaded version.
2009-12-17 16:03:00 -02:00
Vítor Manuel de Morais Santos Costa
48861db34e
fix bad testing of choice-point in throw (tabling bug?)
2009-12-12 23:22:10 +00:00
Vitor Santos Costa
1486b97e75
YAP added / to WIN32 file names (obs from Jose Santos).
2009-12-11 09:49:47 +00:00
Vitor Santos Costa
ac2cf2434a
prolog_flag executable (obs from Aubrey Barnard).
2009-12-10 01:16:29 +00:00
Vitor Santos Costa
df2b11a6ec
define Optype for xxc, for instructions whose constant argument is a term, like functor(a,X,T).
2009-12-06 00:37:48 +00:00
Vítor Manuel de Morais Santos Costa
783c5ed6bc
fix excessive untrailing in C-code interface (obs from Nuno Fonseca).
2009-12-04 22:58:46 +00:00
Vítor Manuel de Morais Santos Costa
72e2a9658e
make volatile part of the system (SWI compatibility).
2009-12-04 18:24:22 +00:00
Vitor Santos Costa
97a27bd4b6
[ ] and {} should be handled by the scanner, not the parser (obs from Paulo Moura).
2009-12-03 22:51:29 +00:00
Vítor Manuel de Morais Santos Costa
1176f71f3a
support for making sure exceptions are reset when they should be reset (obs from Nuno Fonseca, #159 )
2009-12-03 17:48:25 +00:00
Vitor Santos Costa
1bbf7ff16c
| should use operator priority, not some built-in ( #156 )
2009-12-03 09:41:28 +00:00
Vitor Santos Costa
d2da5bfe26
fix setup_call_cleanup and friends.
2009-12-03 02:13:22 +00:00
Vitor Santos Costa
06d30b9fc9
Jump and Throw need to store the term away, if they try to use arena
...
the term will hang in the stack (#152 ).
2009-12-02 21:59:41 +00:00
Vitor Santos Costa
8213d52af4
fix bad call to realloc (nf patches).
2009-11-27 18:46:11 +00:00
Vítor Manuel de Morais Santos Costa
506da0b1bf
make write always protect operators when they are not used as operators so as to follow standard ( #150 ).
2009-11-27 16:09:48 +00:00
Vítor Manuel de Morais Santos Costa
69988d0718
harmonize | priority ( #149 )
2009-11-27 15:55:46 +00:00
Vítor Manuel de Morais Santos Costa
b16623d026
fix realloc and friends (obs from Nuno Fonseca).
2009-11-27 13:31:03 +00:00
Vítor Manuel de Morais Santos Costa
d746afaa32
UserCode may changed YENV, so be careful, be very careful! (obs from Nuno Fonseca).
2009-11-27 13:14:30 +00:00
Vítor Manuel de Morais Santos Costa
98f79484ae
change throw mechanism to fit better with cleanup mechanism:
...
- balls are now stored off line and recovered by Prolog code when everything
is safe.
- if a ball exists, throw uses the *existing* one (be careful not to have one
laying around).
- Jump routine cleans up every cp except ones for setup_call handling, backtracking simply calls setup handlers.
2009-11-27 11:21:24 +00:00
Vítor Manuel de Morais Santos Costa
7f5da32c08
fix trail when you do a jumpenv (Ulrich Neumerkel #152 )
2009-11-25 09:47:38 +00:00
Vitor Santos Costa
50d720a9c6
fix current_op/3 by walking over the chain of ops or properties and moving complex code to Prolog (obs from Paulo Moura).
2009-11-25 00:38:47 +00:00
Vitor Santos Costa
ccaab728af
handle user operators as "prolog" operators.
2009-11-25 00:38:29 +00:00
Ricardo Rocha
7640d65609
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2009-11-23 18:49:23 +00:00
Ricardo Rocha
8a557012dd
add primitive YAP_IsLongIntTerm to the C Language interface.
2009-11-23 18:46:57 +00:00
U-Xato7\Vsc
5e70ff47b3
TrueFileName was rewriting input atom in WIN32 :( (obs from Jos Deroo)
2009-11-23 18:42:28 +00:00
U-Xato7\Vsc
691abd8243
check_opcodes is unused in WIN32_, don't declare it.
2009-11-23 16:01:41 +00:00
Vitor Santos Costa
c6406b822b
prolog: multifiles are not really system predicates (they can be redefined).
2009-11-23 10:10:47 +00:00
Vitor Santos Costa
6852a0c861
make =@= an well known alias to variant.
2009-11-23 10:10:14 +00:00
Vitor Santos Costa
657e0a13bd
inline implemetation of a(2,1,X) should not return error, just silently fail.
2009-11-23 10:06:13 +00:00
Vitor Santos Costa
d637451bd6
make sure to put TR correctly (fixes copying DB terms with att vars #148 )
2009-11-21 00:23:03 +00:00
Vitor Santos Costa
58cac4c8eb
fixes for SYSTEM_MALLOC case (where we cannot trust Yap_HeapTop and Yap_HeapBase).
2009-11-20 08:52:00 +00:00
nf@khaixa.(none)
1bfbe535da
Extended support for SWI-Prolog C interface.
2009-11-20 08:42:22 +00:00
Vitor Santos Costa
ffe1dfdfff
support for module based operators.
2009-11-20 00:33:14 +00:00
Vitor Santos Costa
d476e36a90
initialise LOCAL in system_malloc (obs from Jose Santos).
2009-11-19 08:25:08 +00:00
Vitor Santos Costa
d9016fa650
init_local should be called Yap_init_local to avoid clashesh.
2009-11-19 08:24:38 +00:00
Vitor Santos Costa
9cbdf8f57e
tiny cleanups.
2009-11-18 23:36:07 +00:00
Vitor Santos Costa
6c887452e6
allow randomization of initial address, this enables testing restore routine.
2009-11-18 23:32:00 +00:00
Vítor Manuel de Morais Santos Costa
71de4ed52a
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2009-11-18 13:13:51 +00:00
Vítor Manuel de Morais Santos Costa
c108ac508d
check for callable before looking at predicate terms...
2009-11-18 13:13:16 +00:00
Vítor Manuel de Morais Santos Costa
a316090f8c
fix nth_instance: fix bugs and actually add two versions (obs from Theofrastos Mantadelis)
2009-11-18 13:06:37 +00:00
Vítor Manuel de Morais Santos Costa
f31aeff952
fix bad order of comparison in NthClause.
2009-11-18 12:48:22 +00:00
Vitor Santos Costa
939eda0050
just be consistent in calls.
2009-11-17 10:04:07 +00:00
Vitor Santos Costa
945fff50a2
we should only recover H after we backtrack, never before.
2009-11-17 10:03:14 +00:00
Vitor Santos Costa
1c52d17a4d
get_bom should consider the case the file is empty.
2009-11-17 02:37:29 +00:00
Vitor Santos Costa
7b85efff0c
subsumes should check for loops (Ulrich's #146 ).
2009-11-17 02:08:01 +00:00
Vitor Santos Costa
b7646836b6
remove some weird white spaces.
2009-11-17 02:07:48 +00:00
Vitor Santos Costa
832f3d2e4a
fix missing header for Yap_rational_tree_loop
2009-11-17 02:07:06 +00:00
Vitor Santos Costa
c51c17aa52
make sure to get valid terms in meta_call, not references.
2009-11-17 00:23:34 +00:00
Vítor Manuel de Morais Santos Costa
99b2347cd8
SWI supports xor operator.
2009-11-11 10:54:38 +00:00
Vítor Manuel de Morais Santos Costa
8ecac6c2f9
sebuf on stdin was called if any std stream was a tty. Bad. (obs from Ashwin Srinivasan).
2009-11-10 11:25:56 +00:00
Vítor Manuel de Morais Santos Costa
b5ad71c9c1
improve functor tracing
2009-11-10 11:25:39 +00:00
Vítor Manuel de Morais Santos Costa
8f46f3d71d
fix bad passing of ! destination if we were running at an exec: affected debugger.
2009-11-04 12:17:17 +00:00
Vítor Manuel de Morais Santos Costa
2fdf8e9bda
fix bad ! register when calling continuation of meta-predicate (obs from A Kimmig).
2009-11-03 23:17:06 +00:00
Vítor Manuel de Morais Santos Costa
69d34fb0ce
fix over zealous cleaning of attributed variables in heapgc.c
2009-11-03 15:07:48 +00:00
Vitor Santos Costa
a628079e00
make sure we walk every clause when doing restore mega_clause.
2009-11-02 12:46:39 +00:00
Vítor Manuel de Morais Santos Costa
6a8cee8b79
compilation fixes
2009-10-31 00:18:13 +00:00
Vitor Santos Costa
bda231f24d
Use "Foreign.h"
2009-10-31 00:02:17 +00:00
Vitor Santos Costa
923094bd01
more updates to HEAPFIELDS.
2009-10-30 23:59:00 +00:00
Vitor Santos Costa
7116d1385b
move more fields to HEAPFIELDS
2009-10-28 15:53:23 +00:00
Vitor Santos Costa
838b14cb77
more data structures.
2009-10-28 15:20:46 +00:00
Vitor Santos Costa
d3f969e1b1
various_codes includes all the head pointers to the code space. Try to
...
centralise everything in a single file (HEAPFIELDS) and generate them
from a Prolog script (buildheap).
2009-10-28 13:11:35 +00:00
Vitor Santos Costa
36a7e5c59e
fix error handling in syntax_error (don't assume ARG2 has the output).
2009-10-26 22:56:18 +00:00
Vitor Santos Costa
4c8eb33e06
we had args already (no need for argv0)
...
improve error handling in YAP_ReadBuffer
2009-10-26 10:42:19 +00:00
Vitor Santos Costa
0ea348c26d
extend SWI interface with PL_toplevel and to handle C++ code.
...
prolog/0 built-in
fixes to parms.h changes.
2009-10-23 16:50:43 +01:00
Vitor Santos Costa
0179998d60
change Heap.h to YapHeap.h
...
rename $live to prolog/0 (for SWI compatibility).
2009-10-23 14:22:17 +01:00
Vitor Santos Costa
253444d7ca
support parms.h
...
pass argv[0]
2009-10-23 09:09:16 +01:00
Vitor Santos Costa
c6e16a608a
fix @ option in format/2
2009-10-21 00:07:31 +01:00
Vítor Manuel de Morais Santos Costa
54465b08f1
support ISO extension popcount/1
2009-10-20 10:03:10 +01:00
Vítor Manuel de Morais Santos Costa
36e0c6bcf7
support for msb
2009-10-20 09:50:51 +01:00
Vítor Manuel de Morais Santos Costa
d18cb214fa
implement epsilon (from ISO)
2009-10-20 09:21:59 +01:00
Vítor Manuel de Morais Santos Costa
91b47a438b
indenting stuff.
2009-10-19 16:39:06 +01:00
Vítor Manuel de Morais Santos Costa
230d8f504f
should make sure when we reset a trail_entry it looks like a variable pointer.
2009-10-19 16:37:25 +01:00
Costa Vitor
56d37591a5
fix var_in_term
2009-09-12 17:17:16 -05:00
Costa Vitor
a1d44f068e
fix stupid typo.
2009-09-12 16:45:00 -05:00
Costa Vitor
c0fd49df34
fix bad functor in heap routines.
2009-09-12 16:44:28 -05:00
Costa Vitor
32122f4171
make sure we have enough room when splitting mega clause.
2009-09-12 16:43:44 -05:00
Costa Vitor
fc28a49122
just use stderr
2009-09-12 16:43:18 -05:00
Vitor Santos Costa
1e905eb5ef
allow unification not to bound a variable.
2009-09-09 17:59:25 -05:00
Costa Vitor
d02c9d23c2
handle cases where test is called with unbound variable.
2009-08-31 23:59:34 -05:00
Costa Vitor
4431682276
get rid of unused variable.
2009-08-31 23:58:05 -05:00
Costa Vitor
a00c69b6f7
badly initialised memory stream (obs from J Santos).
2009-08-31 23:56:00 -05:00
Costa Vitor
3cbdc8d14a
make low level tracer understand yapor.
2009-08-19 23:46:51 -05:00
Costa Vitor
33085fd8d1
fix YAPOR not being threadtes as threads.
2009-08-19 22:44:48 -05:00
Costa Vitor
f877e78785
make YAP compile with --enable-or-parallelism
2009-08-19 21:53:49 -05:00
Costa Vitor
418fa1a396
64 bit machines may be using S while calling ExpandIndex.
2009-08-19 20:22:04 -05:00
Costa Vitor
40ea33c150
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2009-08-12 10:01:34 -05:00
Costa Vitor
dccf3cf8a2
assert logupd should set the clause in use (obs by Jose Santos).
2009-08-12 10:00:38 -05:00
Ricardo Rocha
23d44f959d
include cp_h field in deterministic choice points, otherwise we get in trouble
2009-08-09 03:38:07 +01:00
Ricardo Rocha
4f6676e5af
fix garbage collector for deterministic tabling (still very
...
experimental)
2009-08-08 05:02:27 +01:00
Ricardo Rocha
fc31e7066e
improve the support for deterministic tabling (still experimental,
...
problems mainly with the garbage collector)
2009-08-07 17:29:53 +01:00
Ricardo Rocha
981bee74f0
fix garbage collector for dealing with float/longint trie instructions
2009-08-07 04:34:48 +01:00
Ricardo Rocha
7d50687c46
stdio.h include missing
2009-08-07 00:16:21 +01:00
U-Khasa\Vitor
f68cc92bce
make sure binary files are open as binary in WIN32 (obs from Meera Sridhar).
2009-08-02 16:04:21 -05:00
U-Khasa\Vitor
2c53d1f8ed
fix error message in put
2009-08-02 15:54:27 -05:00
Vitor Santos Costa
5327c8bfe7
gc of tabling cps: now, if current cp is in gen chain, mark it as completion,
...
otherwise, mark it as trust_fail.
2009-07-31 08:29:27 -05:00
Vitor Santos Costa
daa05caf86
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2009-07-28 21:38:26 -05:00
Vitor Santos Costa
9c74080512
fix memory overflow when doing very large writes on strings (obs from Jos Deroo).
2009-07-28 18:30:15 -05:00
Costa Vitor
59e0f71a7d
trust_fail needs not to mark environments, but in contrast termination needs.
2009-07-24 15:07:39 -05:00
Vitor Santos Costa
11fb9183e1
make sure we track both producers and consumers (I am not sure we need to track
...
producers, though)
Always mark choicepoint, even if cp_ap==NULL (fixes wine).
2009-07-23 23:13:16 -05:00
Vitor Santos Costa
22ac3ee80b
Use >< for xor (Paulo Mour, Iso meeting)
2009-07-23 14:31:04 -05:00
Vitor Santos Costa
a1e6a2baa7
bad priority for +/1. (Paulo Moura, ISO)
2009-07-23 14:27:04 -05:00
Vitor Santos Costa
7155aa943f
make sure that variables in tabled predicates are safe for backtracking: new
...
variables should be bound carefully.
2009-07-22 23:28:04 -05:00
Costa Vitor
4882cefa12
get rid of debugging code.
2009-07-22 17:02:56 -05:00
Costa Vitor
0e2d3e3a91
fix bad argument processing in non-inlined arithmetic comparisons.
2009-07-22 17:02:02 -05:00
Costa Vitor
c8946e1e4e
support inline arithemtic builtins as non-inlined.
2009-07-22 17:01:30 -05:00
Costa Vitor
d9a48c4014
disable inlining in tabled predicates (maybe a bit too harsh).
2009-07-22 17:00:49 -05:00
Vitor Santos Costa
c1024caa53
Unify emptylist of variables if one reads EOF.
2009-07-21 00:11:44 -05:00
U-Khasa\Vitor
d67332dc19
Improve error handling when loading DLLs
2009-07-20 20:55:22 -07:00
Costa Vitor
869671fb1b
make sure to have trail entries reset on setjump (obs from Jose Santos).
2009-07-17 19:31:20 -05:00
Costa Vitor
66683aeef9
slots were not inited in tabling code, due to bad ifdef (obs from Chris Mungall).
2009-07-17 18:39:50 -05:00
Costa Vitor
390408d5af
fix checking profiled choice-points (obs from Jose Santos).
2009-07-15 22:16:05 -05:00
Costa Vitor
0b85333018
fix int/UInt messup.
2009-07-15 17:29:26 -05:00
Costa Vitor
8a38c64441
fix uninitialised variable (valgrind).
2009-07-15 14:27:56 -05:00
Costa Vitor
8569aacfe5
check for very long wchar_t strings when scanning (obs from Jan Wielemaker).
2009-07-15 14:26:56 -05:00
Vitor Santos Costa
a1775fb031
Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6
2009-07-13 21:58:29 -05:00
Vitor Santos Costa
11cefa668a
handle overflow error in YAP_MkPairTerm ( obs from Fabrizio Riguzzi).
2009-07-13 21:55:57 -05:00
Vitor Santos Costa
6e3830aa4b
improve error handling in arithmetic comparison (obs from Jose Santos)
2009-07-08 10:32:14 -05:00
Ricardo Rocha
5e4d7078ab
support for trie compact lists (version 2): this new version uses
...
different marks to distinguish the lists ending with the empty list
from the lists ending with a non-empty list term.
2009-07-05 05:14:08 +01:00
Costa Vitor
026a666055
trail check on C entry: make sure we don't have unhandled trail overflows.
2009-06-26 14:08:15 -05:00
Costa Vitor
772d091a70
fix bad call to retry_counter
2009-06-26 13:16:42 -05:00
Costa Vitor
69c0a52548
Revert "ENV may not be in scope of catch in very special cases (eg, call counter)."
...
This reverts commit 15f9a68a35
.
Botch!
2009-06-26 13:04:07 -05:00
Vitor Santos Costa
15f9a68a35
ENV may not be in scope of catch in very special cases (eg, call counter).
2009-06-26 09:15:19 -05:00
Vitor Santos Costa
ff20a23e64
stop counters at counter underflow event
2009-06-26 08:42:40 -05:00
Vitor Santos Costa
4d6cd779cb
fix warnings.
2009-06-25 22:31:02 -05:00
Costa Vitor
924cf77fed
fix another loop in spy_pred.
2009-06-23 23:24:16 -05:00
Costa Vitor
058b389566
asserta dynamic predicates should not kill preexisting code.
2009-06-23 06:51:28 -05:00
Costa Vitor
246d32551a
do not set PREG until being sure we have to jump
2009-06-23 06:50:53 -05:00
Costa Vitor
2588f5b7c5
make sure we count built-ins.
2009-06-22 16:03:14 -05:00
Costa Vitor
09f5a9ccb1
make YAP ask less space in deeply nested calls of findall.
2009-06-22 15:37:17 -05:00
Costa Vitor
d8595221d0
optimise sub_atom when sub_atom is known.
2009-06-22 15:35:40 -05:00
Costa Vitor
d47560342c
more fixes to call_counter: try to keep on counting system builtins.
2009-06-22 12:40:55 -05:00
Costa Vitor
50f7a80546
transfer call and profiler to spy.
2009-06-22 11:12:56 -05:00
Costa Vitor
bf9091b5ed
fix bug in copyterm
2009-06-17 14:43:24 -05:00
Costa Vitor
53fa330d90
always use YREG, not YENV, in case we have enough registers.
2009-06-16 21:20:35 -05:00
Costa Vitor
de5a09039f
no_readline patches
...
avoid warnings in no_gmp world
avoid complaining by Solaris
2009-06-15 14:59:50 -05:00
Costa Vitor
7f0a712c88
fix call to trim_trail on solaris
2009-06-15 13:51:30 -05:00
Costa Vitor
f5a72828a0
fix SPARC register allocation bugs (not verified) #130
2009-06-15 10:29:31 -05:00
Costa Vitor
9569d04a9f
remove some warnings in the absence of GMP
2009-06-15 10:11:05 -05:00
Vitor Santos Costa
b4ff9b492a
make sure to recover stack before copying exception term.
2009-06-14 11:17:12 -05:00
Vitor Santos Costa
826b45d21c
fix handling of out stack while throwing an exception.
2009-06-13 15:21:13 -05:00
Vitor Santos Costa
5a10dda14e
fix threads version.
2009-06-13 14:01:16 -05:00
Vitor Santos Costa
475e681907
do fetch and remove a the same time: PopFromDB
2009-06-13 13:06:02 -05:00
Vitor Santos Costa
4de6e48a33
save exception term in database, so that it is clean separate from stacks. #116
2009-06-12 14:35:15 -05:00
Vitor Santos Costa
e6265e9d84
only dump stack if user not handling the stack #47
2009-06-12 14:04:32 -05:00
Vitor Santos Costa
1005fa8abf
PLIOError should not prevent weird errors, like
...
resource_errors (#36 ).
2009-06-12 13:46:44 -05:00
Vitor Santos Costa
303261b283
improve error messages.
2009-06-12 13:44:22 -05:00
Ulrich Neumerkel
2f47f8902b
Operator change for ISO/SWI
2009-06-11 09:27:48 -05:00
Costa Vitor
9b7d2b1cd4
if the compiler has ommited the instructions, it means we should the
...
argument set up there by the compiler.
2009-06-08 20:08:21 -05:00
Costa Vitor
15519fa3cd
tightenn conditions on JumpExec
2009-06-05 18:45:41 -05:00
Costa Vitor
5e4be93491
able to commit 64 bits
2009-06-05 12:18:10 -05:00
Vitor Santos Costa
7e108201b0
fix memory leak in mod.
2009-06-05 10:55:28 -05:00
Vitor Santos Costa
ecb03a61c0
fix memory leak in min/2 and max/2.
2009-06-05 10:38:07 -05:00
Vitor Santos Costa
a1b621507a
max of bignums would always return the first bignum #118
2009-06-05 09:49:00 -05:00
Vitor Santos Costa
4b91f13ee1
allow easy shunting, but make sure we do not shunt chains below the current CP.
2009-06-05 09:47:17 -05:00
Vitor Santos Costa
b455f057a8
fix writing of atributed variables.
2009-06-04 10:18:28 -05:00
Vitor Santos Costa
cd63a1f493
temporary disable easy shunting until I understand trouble with aattributed variables #80
2009-06-04 10:14:27 -05:00
Vitor Santos Costa
ea4f3f6447
always count gc calls #93
2009-06-03 20:36:15 -05:00
Costa Vitor
5da51d615d
fix crashes in 64-bit mode with unknown predicates.
2009-06-03 15:27:53 -05:00
Costa Vitor
efb72f7d0e
make sure we send unsigned chars to writing routine (obs from Simon Strobl)
2009-06-03 10:25:21 -05:00
Costa Vitor
7f54acb536
separate standard alarm from virtual alarm. timeout uses virtual alarm #112
2009-06-03 10:09:14 -05:00
Costa Vitor
b72345cc97
handle correctly throws within the scope of a call_cleanup. This is implemented
...
by using an extra argument to verify if the catcher is the current call_cleanup.
If it is, we allow the exception to go forth.
2009-06-02 19:46:41 -05:00
Costa Vitor
2daccab1cb
avoid setjmp if we can do it.
2009-06-02 18:08:40 -05:00
Costa Vitor
adb25ff96f
growglobal would core dump over holes.
2009-06-02 18:08:18 -05:00
Costa Vitor
f10dde5b90
make sure garbage collector goes to FAILCODE, not do a hard reset.
2009-06-02 16:36:00 -05:00
Vitor Santos Costa
a2a8f8e40e
stop writing at very long lists.
2009-06-01 22:54:56 -05:00
Costa Vitor
8870a1e661
define virtual timer and use it for timeout ( #96 )
2009-06-01 19:49:03 -05:00
Costa Vitor
8e55611d90
fix bad test for space overflow
2009-06-01 19:28:30 -05:00
Costa Vitor
00c9194014
fix reference to Yap_regp
2009-06-01 15:46:37 -05:00
Vitor Santos Costa
0bd3c910dd
step towards better emulation of SWI in backtrackable predicates.
2009-06-01 15:32:36 -05:00
Vitor Santos Costa
45a1544307
use Int for 32 bit flags (int would be ok, though).
2009-06-01 15:32:07 -05:00
Vitor Santos Costa
95f28228f6
- separate user_try and user_retry
...
- make sure we have slots inited in retrying user C code.
2009-06-01 15:30:22 -05:00
Vitor Santos Costa
e84ecf2eaf
fix #37 : give resource error if trying to create a functor with bignum arity
...
also, allow meta-call to create large functors > Int.
2009-05-29 22:34:50 -05:00
Vitor Santos Costa
0cd72ad258
changes to compile YAP in WIN32
2009-05-29 14:36:49 -05:00
Vitor Santos Costa
a45da5f722
check for memory overflows in format (very long double, say) obs from Ingo Thon.
2009-05-29 10:26:48 -05:00
Costa Vitor
43e9e9f337
alarm(0) should be careful to kill existing signals.
2009-05-26 17:31:21 -05:00
Vitor Santos Costa
3c57286531
make sure we disable disabling interrupts on error handler.
2009-05-25 09:58:27 -05:00
Vitor Santos Costa
a6f0b8cc9f
ignore specific limit for max write depth on lists. Use same limit everywhere.
2009-05-24 19:37:07 -05:00
Vitor Santos Costa
a0750ff5b7
handle heap overflows when constructing new predicates.
2009-05-24 19:25:26 -05:00
Vitor Santos Costa
9a9767d73c
cannot just do error when user does crazy things.
2009-05-24 19:20:00 -05:00
Vitor Santos Costa
46dc2b1a49
should exit if interrupts *are* disabled.
2009-05-24 19:19:22 -05:00
Vitor Santos Costa
de3c042143
just update, no interesting change.
2009-05-24 15:17:23 -05:00
Vitor Santos Costa
09216a70b8
fix unprotected calls to plwrite.
2009-05-24 15:15:36 -05:00
Vitor Santos Costa
81970013ed
allow storing a pointer.
2009-05-24 15:14:44 -05:00
Vitor Santos Costa
b94baf1e5f
try not to loop in infinite terms.
2009-05-24 15:14:23 -05:00
Vitor Santos Costa
b5e5a671a8
restore stack on JumpExec
2009-05-23 15:51:50 -05:00
Vitor Santos Costa
b9a7d24e8b
avoid too long messages
...
back to top level if Yap_Error is called in a critical region.
2009-05-23 15:51:00 -05:00
Vitor Santos Costa
4d497193b6
fix garbage collection on attributed variables with lots of choice points.
2009-05-23 12:41:37 -05:00
Vitor Santos Costa
04c419b3b0
not always throw an error when it is not a variable.
2009-05-22 22:35:40 -05:00
Vitor Santos Costa
9a2dbdcb24
one extra warning goes away.
2009-05-22 21:53:24 -05:00
Vitor Santos Costa
f79d79e926
replace TYPE_ERROR_VARIABLE for attributes #57
2009-05-22 21:51:48 -05:00
Vitor Santos Costa
264d9322b9
fix compiler warning messages.
2009-05-22 21:33:09 -05:00
Costa Vitor
7304fbda13
fix lack of streams message (Ulrich Neumerkel #60 )
2009-05-22 19:55:18 -05:00
Costa Vitor
c00facdd17
exception at fail could loop with bad env. #59
2009-05-22 19:43:17 -05:00
Costa Vitor
e611e1061a
fix annoying int cast problems (64 bit only)
2009-05-22 19:09:18 -05:00
Costa Vitor
8fcc534a19
fix bad error propagation in term comparison #53
2009-05-22 18:44:05 -05:00
Costa Vitor
ec595374a6
fix allocation of temporary stack so that unification can work even for
...
very deep terms.
fix occur_unification_bug X = a(f(Y)).
2009-05-22 18:35:24 -05:00
Costa Vitor
75e08846fe
vargs needs include.
2009-05-22 14:44:32 -05:00
Vitor Santos Costa
23301fb19a
avoid warning on malloc
2009-05-22 14:01:22 -05:00
Vitor Santos Costa
51e669dcfb
support for passing priority as argument to write. (Ulrich's #45 ).
...
fixes on making write handle infinite loops
2009-05-22 13:24:27 -05:00
Vitor Santos Costa
e1421f207e
use DebugPlWrite for debugging writes
2009-05-22 13:23:51 -05:00
Vitor Santos Costa
328e2f5c22
don't loop on cyclic terms.
2009-05-22 12:24:30 -05:00
Vitor Santos Costa
8e1c8d723e
never do P=FAILCODE directly in the code.
2009-05-22 11:24:44 -05:00
Vitor Santos Costa
9852f7781d
- simplify error handling in arithmetic and handle infinite terms ( #46 )
2009-05-22 11:21:39 -05:00
Vitor Santos Costa
3a3220d1a1
make sure we don't generate an heapexpansion in the middle of a write.
2009-05-21 01:04:13 -05:00
Vitor Santos Costa
88b5f1a735
be careful to make sure we can hanle the interrupt.
2009-05-21 00:39:14 -05:00
Vitor Santos Costa
a59a434d66
use interrupts_disabled
...
make onerrupts disabled recursive (not quite needed, but maybe one day).
2009-05-21 00:38:35 -05:00
Vitor Santos Costa
aaec9ddceb
fix overflow while dumping very large big ints (Ulrich #18 )
2009-05-20 08:12:18 -07:00
Vitor Santos Costa
c7066b43ec
first try of setup_call_cleanup/3 and setup_call_catcher_cleanup/4
2009-05-19 23:53:14 -07:00
Vitor Santos Costa
a1203e56dd
we don't always expand stack on attvar overflow.
2009-05-17 22:51:34 -07:00
Vitor Santos Costa
17e36dbda1
keep things right if there is a temporary overflow in loopy term checking.
2009-05-17 12:39:51 -07:00
Vitor Santos Costa
a52317b9c2
fix Yap_shift_visit for malloc: a few miscalculations...
2009-05-17 12:26:09 -07:00
Vitor Santos Costa
44f7e67394
make sure we reset global variables when exiting a thread
2009-05-17 10:38:39 -07:00
Vitor Santos Costa
ae5bf4d6e7
support resource errors for out of memory conditions.
...
improve stack dump message.
2009-05-17 09:42:56 -07:00
Vitor Santos Costa
d8590f2587
return error message if no room available.
2009-05-17 09:42:40 -07:00
Vitor Santos Costa
55e37020a4
return copy when copying term
2009-05-17 09:41:59 -07:00
Vitor Santos Costa
94e740ae31
reduce the initail amount of space for globals
2009-05-17 09:41:34 -07:00
Vitor Santos Costa
de1fb3e2c5
copy exception term early on to avoid dangling pointers.
2009-05-17 08:02:34 -07:00
Vitor Santos Costa
8e7695a42c
make Yap_Eval only on entry.
2009-05-16 22:41:44 -07:00
Vitor Santos Costa
7953004610
fix unused variable warning.
2009-05-13 17:12:12 -05:00
Vitor Santos Costa
6d8649226c
fix tabling code.
2009-05-13 17:11:46 -05:00
Vitor Santos Costa
13e2febd30
stack overflow instructions could be wiped out by Restore.
2009-05-12 17:01:53 -05:00
Vitor Santos Costa
39ccbd345d
make options -T -L -G work as SWI: they impose a maximum size limit
2009-05-10 13:36:55 -04:00
Vitor Santos Costa
b177a9e333
/ is legal in Prolog, why did I comment that out?
2009-05-09 23:49:10 -04:00
Vitor Santos Costa
61973a2be6
be careful: error handling may have changed PC in call_c_with_fail!
2009-05-09 23:40:17 -04:00
Vitor Santos Costa
5b527e7eeb
just make things prettier.
2009-05-09 23:39:57 -04:00
Vitor Santos Costa
f53c741d96
improve low-level tracer.
2009-05-09 23:30:20 -04:00
Vitor Santos Costa
5b537ef7e2
fix error handling.
2009-05-09 23:30:08 -04:00
Vitor Santos Costa
e4fdf5a1ff
fix (??) X^N, N< 0. When does this make sense?
2009-05-07 23:42:16 -04:00
Vitor Santos Costa
21fa27526c
generate error if module is unspecified (obs from Ulrich Neumerkel).
2009-05-07 23:14:28 -04:00
Vitor Santos Costa
0cd9009132
remove debugging message.
2009-05-05 10:15:34 -05:00
Vitor Santos Costa
32b08082f7
fix clean_trail: with threads, objects may be above stack, not just below.
2009-05-05 09:56:47 -05:00
Vitor Santos Costa
c2e6456c25
wait until sending out the abort message.
2009-05-04 22:30:47 -05:00
Vitor Santos Costa
c31737fe3d
make sure that a meta-call to functor/3 has an environment so that
...
it can do garbage collection.
2009-05-04 21:57:08 -05:00
Vitor Santos Costa
a077500795
should always be ENV
2009-05-04 21:56:49 -05:00
Vitor Santos Costa
780b629bff
fix bad handling of trail overflow.
2009-05-04 21:26:47 -05:00
Vitor Santos Costa
10c38f8164
1. catch should not catch outside of scope!
...
2. when we are catching check for the first cleanup we can find; and while
doing that going on rewinding variables, for SICStus compatibility.
2009-05-04 18:12:33 -05:00
Vitor Santos Costa
35c1cb6338
put future environment when waking up goals before failure.
2009-05-04 18:11:43 -05:00
Vitor Santos Costa
8385f4bea6
saved state should be startup.yss, not startup.yss, in case YAP looks up
...
saved state in current directory (obs from Ulrich Neumerkel).
2009-05-02 14:06:24 -05:00
Vitor Santos Costa
2016e118b3
Ulrich Neumerkel's patch so that variables are declared in front of a block.
2009-05-02 10:54:09 -05:00
Vitor Santos Costa
58838b7838
fix attributed variable space allocation
2009-05-01 12:11:52 -05:00
Vitor Santos Costa
ee44706d37
fix bad initialization of H0 in tabling
2009-05-01 12:09:49 -05:00
Vitor Santos Costa
91b3e4359d
handle tabling errors where CP->AP==NULL
2009-05-01 12:09:22 -05:00
Vitor Santos Costa
8275f2232c
fix handling of multiassignment variables with tabling;
...
fix bad overflow handling when copying terms from tries.
2009-05-01 11:53:59 -05:00
Vítor Santos Costa
04f3b32a9a
clean code a little bit.
2009-04-29 14:22:20 +01:00
Vítor Santos Costa
8c3406adac
don't forget to globalise variables before making them global.
2009-04-29 14:21:52 +01:00
Vitor Santos Costa
5baaf79916
fix call_with_args/.. (obs from Jose Santos).
2009-04-26 11:16:40 -05:00
Vitor Santos Costa
bb80c8d61c
should use YENV, not ENV.
2009-04-26 10:51:18 -05:00
Vitor Santos Costa
e7b01f64d0
don't add minimums, compare them for memory overflows.
2009-04-26 10:50:56 -05:00
Vitor Santos Costa
e06ee4d4fa
avoid over enthusiastic stack expansion.
2009-04-26 10:50:10 -05:00