Commit Graph

372 Commits

Author SHA1 Message Date
Vítor Santos Costa
e031026a62 instrument PE locking
fix missing unlock in index_pred (if predicate had been indexed while we were
waiting).
2010-07-25 11:22:16 +01:00
Vítor Santos Costa
3dd68aa8bd fix EX: it cannot be a term and it should be a placeholder for BallTerm,
so the twp can never be alive at the same time.
2010-07-21 12:49:06 +01:00
Vitor Santos Costa
a46d6dc9eb fix bad recent patch. 2010-07-20 11:28:56 +01:00
Vitor Santos Costa
834e3ed5d0 make arg/3 compatible with SWI for atomic argument (fail silently). 2010-07-19 14:38:17 +01:00
Vítor Santos Costa
ecce575a0a fix stack calculation (ricardo rocha) 2010-07-06 15:31:17 +01:00
Vítor Santos Costa
247d59f0ef - slots should be considered as always live for gc.
- make sure slots do not die when they should be live, and vice-versa.
- improve a little on foreign_frame
2010-06-01 00:40:58 +01:00
Vítor Santos Costa
ae2421951b fix comparison between terms when rationals come up. 2010-05-28 12:07:01 +01:00
Vitor Santos Costa
fd9f4efe0b fix indexing of bignums (obs from Jos de Roo). 2010-05-14 12:42:30 +01:00
Vitor Santos Costa
c2f84c9e28 fix unify_dbterm. 2010-05-13 00:04:56 +01:00
Vitor Santos Costa
924e614857 fix related instructions. 2010-05-12 23:54:06 +01:00
Vitor Santos Costa
45fac6d7b5 fix bug in unify_bigint (obs from Jos de Roo). 2010-05-12 23:48:37 +01:00
Vítor Santos Costa
be2a3a635e L constants are evil in 64 bits 2010-05-11 12:25:49 +01:00
Vítor Santos Costa II
ba996c8dd5 fix bad call to low_level_tracer. 2010-05-03 16:34:20 +01:00
Ricardo Rocha
e122f2ca8d Global trie support: atomic terms (vars, integers and atoms) are now stored
in the local tries (and not in the global trie). This required major changes
to the trie instructions in order to unify the use of the auxiliary stack
organization for the terms in the local tries and in the global trie.
2010-04-15 01:09:59 +01:00
Vítor Santos Costa II
d524dd542d test could access unused memory. 2010-04-09 18:07:45 +01:00
Vitor Santos Costa
d5e1ff38f4 new interface to access globals. They are not in a file called GLOBALS, from which
we generate several files automatically.
2010-03-21 22:12:42 +00:00
Vitor Santos Costa
81635b48fb use isattvar 2010-03-08 09:17:40 +00:00
Vitor Santos Costa
3070e4ce9d fix locking issues with dynamic predicates and threads (obs from Paulo Moura). 2010-03-03 22:11:50 +00:00
Vítor Santos Costa
692a482adf fix gc call while in meta-call. 2010-02-19 15:37:36 +00:00
Vitor Santos Costa
3b4bb45c62 fix error handling in builtin arithmetic (obs from Jose Santos). 2010-02-18 10:56:59 +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
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
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
ce3a193ae7 fix forgotten unlocks. 2010-01-25 09:01:04 +00:00
Vítor Manuel de Morais Santos Costa
5ef31fbfd2 experiment in or-parallel threads. 2010-01-14 15:58:19 +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
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
b5ad71c9c1 improve functor tracing 2009-11-10 11:25:39 +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
Costa Vitor
418fa1a396 64 bit machines may be using S while calling ExpandIndex. 2009-08-19 20:22:04 -05: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
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
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
246d32551a do not set PREG until being sure we have to jump 2009-06-23 06:50:53 -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
53fa330d90 always use YREG, not YENV, in case we have enough registers. 2009-06-16 21:20:35 -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
Costa Vitor
c00facdd17 exception at fail could loop with bad env. #59 2009-05-22 19:43:17 -05:00
Costa Vitor
8fcc534a19 fix bad error propagation in term comparison #53 2009-05-22 18:44:05 -05:00
Vitor Santos Costa
8e7695a42c make Yap_Eval only on entry. 2009-05-16 22:41:44 -07: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
f53c741d96 improve low-level tracer. 2009-05-09 23:30:20 -04: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
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
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
Vitor Santos Costa
c92765d962 SREG and S could be different; also S might be in use if there is an
overflow and the index code is jumping to the middle.
2009-04-18 15:22:51 -05:00
Vitor Santos Costa
7e98e5acdb fix another internal deadlock. 2009-04-17 14:17:43 -05:00
Vitor Santos Costa
9624026beb locking fixes. 2009-04-16 11:19:26 -05:00
Vitor Santos Costa
b2ad3bd000 first cut at Anderson's JIT code. 2009-04-07 23:55:16 +01:00
Vitor Santos Costa
5c2e5c524b recognise exceptions within comparisons. 2009-03-26 00:37:57 +00:00
Vitor Santos Costa
828964c3c1 remove optimised arithmetic instructions. They made the emulator even bigger than
usual, and they were not performing.
2009-03-09 11:52:01 +00:00
Vitor Santos Costa
afd979a246 improve substantially handling of soft disjunctions. 2009-03-05 16:12:21 +00:00
Vitor Santos Costa
15b86cded4 new merged instructions and small changes to the emulator. 2009-03-03 10:04:13 +00:00
Vitor Santos Costa
a000af113b OSX portability updates
start of support for commons prolog initiative
2009-02-16 12:25:03 +00:00
Vítor Santos Costa
8a6e0acedc compiler support for udi including user_index instruction 2009-02-12 21:35:31 +00:00
Vitor Santos Costa
8a3978e3e1 rename BinaryTestPredFlag to BinaryPredFlag
get rid of small annoying arithmetic bugs
2009-02-09 21:56:40 +00:00
Vítor Santos Costa
a8ac9bfb43 generate known atoms and functors automatically 2008-12-23 01:53:52 +00:00
Vítor Santos Costa
a36be5bf20 massive changes to support new scheme for arithmetic:
- compilation and assembly support
2008-12-09 12:54:27 +00:00
Vítor Santos Costa
e737599dc4 Change to simpler Eval mechanism
- avoid duplicate code
- implement different optimised code.
2008-12-04 23:33:32 +00:00
Vítor Santos de Costa
681d0f186d fix bad type for p_number_y 2008-10-07 22:00:38 +01:00
Vítor Santos Costa
e252ef0b2f more debugger fixes!
- make sure donotrace and oncenotrace are known to the signal mechanism:
they should disable creeping
- avoid creep at deallocate: it is a very bad idea :(
2008-09-23 23:43:01 +01:00
Vítor Santos Costa
fdf762e326 push changes to make tabling work: don't ignore tabling and yapor fields
in optype.
2008-09-05 05:22:19 +01:00
Vítor Santos Costa
6046f9f913 more fixes to debugger: make l and s option do what they are supposed to
do.
fix k and t, they had been broken.
Ideas:
DebugOn is now in the system and can disable spypoints.
Have an extra flag to distinguish fast (t,z,k) and slow(l,s) jumping.
2008-09-02 03:48:02 +01:00
Vítor Santos Costa
b2d9eb7aac instructions xyc really has optype xyn. 2008-08-30 23:00:50 +01:00
Vitor Santos Costa
2a84e259a2 Upgrade to new CHR (with Jan's changes).
Found out I need to add an extra field to allocate so that the
exception handling code knows where the clause is.
Protect creep_allowed from NULL pointers.
2008-08-30 16:24:44 +01:00
Vítor Santos Costa
1226b58d8e The debugger relied on the environment stack. To fix it:
- absmi.c now tells who called the debugger, besides who it was calling
- this is used to control whether we allow a goal to be debugged.
- I have creep to start creeping immediately, and signal_creep to tell
  the next meta-call to creep what it executes!
- The debugger uses CalledFromTheDebugger to know if it is within the
debugger. If so, we do not need to creep on leaving.
2008-08-30 02:39:36 +01:00
Vitor Santos Costa
d636450512 more fixes to make rclause.h automatic:
define new type n for Integers, as they were mistaken for Term.
 define early return cases and ifdef exceptions.
2008-08-29 17:27:11 +01:00
Vítor Santos Costa
17ba194c1e Include new instruction execute_cpred to perform tail optimisation for
builtins. Required changes:
- be careful about creeping in deallocate: it may be followed by
something that is not a cut nor a proceed.
- include new instruction in absmi.c: it is a merge of execute and
call_cpred.
- change compiler to generate execute even for C builtins.
- be careful with dexecute: it may not be done if execute_op is a C
builtin.
- if we are in execute_cpred, the garbage collector cannot trust P:
instead it must look at CP to find out the size of the current
environment. The macro gc_P receives that information.
- We don't need to change CP if we do a meta-call from within
execute_cpred (and we in fact cannot). Check places where we do
meta-calls: exec, clause in cdmgr, and lu_recorded.
2008-08-28 04:43:00 +01:00
Vítor Santos Costa
f499115573 redo lost updates 2008-08-21 13:38:25 +01:00
vsc
16d0f2e749 fix TopLevelGoal to handle correctly undefined predicates. Make sure that
undefined predicated will not force the boot process to loop.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2310 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-19 13:33:45 +00:00
vsc
7db64c5e1c more locking fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2306 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-13 01:16:26 +00:00
vsc
d170b34624 MaxOS fixes
Avoid a thread deadlock
improvements to SWI predicates.
make variables_in_term system builtin.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2304 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-12 01:27:23 +00:00
vsc
2581c3a3bf more threadin fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2300 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-07 20:51:23 +00:00
vsc
6d23a23a81 fix debugging info
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2299 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 23:05:49 +00:00
vsc
85d7d39dbf more thread fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2297 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-08-06 17:32:22 +00:00
vsc
39c4a2e67f fix c_interface not to crash when people try to recover slots that are
not there.
fix try_logical and friends to handle case where predicate has arity 0.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2278 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-06-17 13:37:51 +00:00
vsc
175a0ba6dd make sure we do trim_trail whenever we mess with B!
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2258 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-06-04 14:47:18 +00:00
vsc
6da72b2c9f yapor had gotten broken with recent thread changes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2210 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-04-04 16:11:40 +00:00
vsc
78d7105c16 protect signal handling with locks for threaded version.
fix close/1 entry in manual (obs from Nicos).
fix -f option in chr Makefile.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2201 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-04-03 13:26:38 +00:00
vsc
92d26f604e term_variables could store local variable in global.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2199 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-04-03 10:50:28 +00:00
vsc
5a88dc6333 more icc fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2166 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-03-26 14:37:08 +00:00
vsc
b2274186bd make or-parallelism compile again
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2164 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-03-25 16:45:53 +00:00
vsc
af0fb4f4d9 SWI-portability changes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2088 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-02-12 17:03:59 +00:00
vsc
ff8213e506 make thread code more stable
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2063 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-01-27 11:01:07 +00:00
vsc
637f381d94 valgrind it!
enable atom garbage collection.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2055 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2008-01-23 17:57:56 +00:00
vsc
1bd96722de junction tree algorithm
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2031 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-28 23:52:14 +00:00
vsc
3beda27d14 fixes to support threads and assert correctly, even if inefficiently.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2030 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-26 23:43:10 +00:00
vsc
7b6c96e3d7 fix some bugs in new dbterm code.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1986 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-08 15:52:15 +00:00
vsc
42048570f3 speedup meta-calls
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1976 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-07 09:25:27 +00:00
vsc
a5f5f4c237 compile ground terms away.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1975 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-06 17:02:13 +00:00
vsc
22c5632a53 fix overflow
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1969 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-10-28 11:23:41 +00:00
vsc
9e9c260f7e new version of viterbi implementation
fix all:atvars reporting bad info
fix bad S info in x86_64


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1968 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-10-28 00:54:09 +00:00
vsc
d316ddeb2a growtrail assumed SREG meant ASP?
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1961 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-10-17 09:18:27 +00:00
vsc
ec2a3ab3b5 minor bug fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1934 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-09-24 09:02:33 +00:00
vsc
9c232ddd0b interface speedups
bad error message in X is foo>>2.


git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1894 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-06-04 12:28:02 +00:00