Commit Graph

396 Commits

Author SHA1 Message Date
Vitor Santos Costa
4a5ba35937 assembly fixes
more support for readline, including getting more stuff from read.
2011-02-17 00:57:49 +00:00
Vítor Santos Costa
a40987b70d ifixes to support 64 bits:
- protect registers before calling prune()
- use Int, not int.
2011-02-15 18:14:18 +00:00
ubu32
67d23051c2 fix pruning to handle backtrackable C-predicates in a much nicer way. 2011-02-14 11:29:20 -08:00
ubu32
1717b113b3 cut should know about environment size. 2011-02-14 06:57:16 -08:00
Vitor Santos Costa
26706d20ff make SREG YENV before calling heapgc in absmi. 2011-01-20 11:53:00 -06:00
Vitor Santos Costa
aa1756c952 undo change until I can wake up goals before cut safely. 2010-12-31 12:01:10 -06:00
Vitor Santos Costa
d64af810da force wakeups before ! 2010-12-29 09:29:42 -06:00
Vítor Santos Costa
cede94f6d2 creeping should not prevent wake ups. 2010-12-19 13:52:42 +00:00
Vítor Santos Costa
cfe0dda995 more bigint and dbterm fixes. 2010-12-16 22:21:46 +00:00
Vítor Santos Costa
5a2d908489 fix restore of instructions that manipulate bigints or db terms. 2010-12-16 20:39:53 +00:00
Vítor Santos Costa
21bbffceda make sure we rebuild saved state stuff even if we do not actually enter top-level.
fix bug with some definitions being reset at load time.
2010-12-07 15:06:53 +00:00
Vitor Santos Costa
8290341a5f fix typo 2010-12-05 00:07:22 +00:00
Vítor Santos Costa
8db05c883b make sure we separate betwen async exceptions and synchroneous. 2010-12-04 19:05:13 +00:00
Vítor Santos Costa
c6f41e2970 YAP_FAIL_ERROR in case a fail has been requested, but not accepetd yet. 2010-12-04 18:45:09 +00:00
Vitor Santos Costa
755a57fdbd Merge branch 'master' of yap.dcc.fc.up.pt:yap-6
Conflicts:
	C/absmi.c
2010-10-12 23:22:23 +01:00
Vitor Santos Costa
80c38081da no need for special procceed instruction. 2010-10-12 22:02:51 +01:00
Vítor Santos Costa
3e6309cc8a fix trace problem 2010-10-11 20:10:12 +01:00
Vitor Santos Costa
e5232bc8fc force system to check for overflows at end of procceed for clauses with body. 2010-10-11 14:45:15 +01:00
Vitor Santos Costa
9187c658b8 fix very large clause handling 2010-10-08 10:45:50 +01:00
Vítor Santos Costa
e968fe21dd fix bad call to gc when finding very large terms. 2010-09-30 20:09:17 +01:00
Vitor Santos Costa
ace9025c10 fix bad messup with program counter (obs from Ingo Molnar).q 2010-08-17 13:02:50 +01:00
Vítor Santos Costa
ffc094e25f make sure we have enough room before we enter a clause. 2010-08-02 18:20:03 +01:00
Vitor Santos Costa
3d6e223dae support for space reservation (goal: call gc before trying to insert very large terms). 2010-08-02 13:04:30 +01:00
Vitor Santos Costa
ccb7991a56 should not use PP for thread private
more lock tracing aids.
2010-07-28 11:26:20 +01:00
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