Commit Graph

926 Commits

Author SHA1 Message Date
Vitor Santos Costa
e86b28911f improve performance of depth_limit call. 2010-01-17 00:03:55 +00:00
Vítor Manuel de Morais Santos Costa
0c29616bc2 SWI-compatible for initialization/2· 2010-01-15 16:21:29 +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
bf52be1ece add extra options for SWI compatibility: notice, attributes/1 is not actually implemented within write yet! 2010-01-12 14:27:32 +00:00
Vitor Santos Costa
79a1d3e13c fix thread stuff (obs from Jiefei Ma). 2009-12-17 23:55:09 -02:00
Vítor Manuel de Morais Santos Costa
946b6aa812 small space fixes 2009-12-12 23:20:44 +00:00
Vitor Santos Costa
ac2cf2434a prolog_flag executable (obs from Aubrey Barnard). 2009-12-10 01:16:29 +00:00
Vitor Santos Costa
1be390d31a fix create_prolog_flag to guess domain (idea from Jan Wielemaker). 2009-12-06 00:49:51 +00:00
Vitor Santos Costa
2cb3ef5fa4 fix set_base_module to retract previous modules,
add delete_import_module.
2009-12-04 21:32:36 +00:00
Vítor Manuel de Morais Santos Costa
bed3e52a84 fix version option 2009-12-04 18:24:45 +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
b3088710d3 emulate SWI module inheritance mechanism (at least, I hope). 2009-12-04 11:00:13 +00:00
Vitor Santos Costa
d554871ffb get rid of create_prolog_flag/2. 2009-12-04 09:17:27 +00:00
Vitor Santos Costa
ee575387af rstore user_defined_directive 2009-12-04 00:29:50 +00:00
Vitor Santos Costa
367f1d954f better way to define prolog flag. 2009-12-04 00:06:11 +00:00
Vitor Santos Costa
4c47f4188e fix exceptions in setup. 2009-12-03 22:54:31 +00:00
Vítor Manuel de Morais Santos Costa
71e4d73a75 make sure to reenable interrupts if you have to exit setup in a hurry (#158). 2009-12-03 17:46:21 +00:00
Vitor Santos Costa
bc4b718afb follow import recursively so that we don't lose properties like being a
meta predicate.
2009-12-03 16:33:44 +00:00
Vitor Santos Costa
2d6934178b check for unbound calls (#154) 2009-12-03 09:08:06 +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
Vítor Manuel de Morais Santos Costa
91a7fc3c66 fix bugs in backtrackable versions of atom_concat/3 and atomic_concat/3 (obs from Paulo Moura). 2009-11-27 13:45:18 +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
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
fe6148ef15 be more cautions about removing prolog: from calls. 2009-11-23 10:15:11 +00:00
Vitor Santos Costa
2d2fb30167 atomic_list_concat/2 and fix some reverse mode ops in atom_concat/3. 2009-11-23 10:13:55 +00:00
Vitor Santos Costa
31e5c54125 support message_string/2 for SWI emulation. 2009-11-23 10:09:32 +00:00
Vitor Santos Costa
e4c9d69044 in SWI mode allow new flags to be silently defined. 2009-11-23 10:06:51 +00:00
Vitor Santos Costa
b15d9c0363 add source_location for SWI compatibility 2009-11-23 10:02:40 +00:00
Vitor Santos Costa
d91bab4247 make sure goal_expansion is never seen as an undefined goal. It should at least always succeed. 2009-11-23 10:01:55 +00:00
Vitor Santos Costa
ffe1dfdfff support for module based operators. 2009-11-20 00:33:14 +00:00
Vitor Santos Costa
628d181923 protect against var usage. 2009-11-20 00:32:14 +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
a316090f8c fix nth_instance: fix bugs and actually add two versions (obs from Theofrastos Mantadelis) 2009-11-18 13:06:37 +00:00
Vitor Santos Costa
cef6c9da36 fix bad processing of eof_action flag (obs from Ulrich, #147). 2009-11-17 02:37:56 +00:00
Vitor Santos Costa
f7214090cb make operators defined within a module local to the module, operators in header are still global to every module, though (UN #131). 2009-11-17 00:59:06 +00:00
Vitor Santos Costa
ce5ae8b972 another oops :( 2009-11-17 00:48:16 +00:00
Vitor Santos Costa
84022de89d disable creep when top-level starts: this prevents creeping after a top-level. 2009-11-17 00:32:38 +00:00
Vitor Santos Costa
b56894e0d5 indenting. 2009-11-17 00:32:27 +00:00
Vitor Santos Costa
73cdfe0f5b oops in previous change :( 2009-11-17 00:23:22 +00:00
Vitor Santos Costa
59935893ac fix bad syntax (obs from Ulrich Neumerkel #137, after #138) 2009-11-17 00:13:54 +00:00
Vitor Santos Costa
3f30a2bf18 expand meta-predicates before trying to debug them. 2009-11-17 00:09:23 +00:00
Vítor Manuel de Morais Santos Costa
3b7e5544f6 m:subgoal should compile subgoal with m as default module (obs from Nuno Fonseca). 2009-11-04 12:29:31 +00:00
Vítor Manuel de Morais Santos Costa
0e1fae17d9 make sure action is deterministic on key input. 2009-11-04 12:29:09 +00:00
Vitor Santos Costa
717d6ac4c8 handle meta-calls to unbound variables.
first step to improve exceptions.
2009-11-04 00:10:27 +00:00
Vitor Santos Costa
15fc06764a fix declaration and message_hook/3 (obs from Paulo Moura) 2009-11-02 12:53:51 +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
Vítor Manuel de Morais Santos Costa
0f4b64d199 make should only look at reconsulted files, it makes no sense to use make for
consulted files.
2009-10-16 08:31:23 +01:00
Vítor Manuel de Morais Santos Costa
d649ba5894 first cut at make/0y 2009-10-15 12:56:16 +01:00
Vitor Santos Costa
218bc2e423 fix to slow reconsult (Jos Deroo) 2009-09-20 10:03:10 -05:00
Costa Vitor
4e4d486dee fix compilation errors 2009-09-09 18:13:12 -05:00
Vitor Santos Costa
0688fb4d68 handle old style binding lists. 2009-09-09 18:00:35 -05:00
Vitor Santos Costa
ce76be4e77 Merge branch 'master' of gitosis@yap.dcc.fc.up.pt:yap-6 2009-09-07 22:19:41 -05:00
Vitor Santos Costa
9047ad2e6e fix bad call. 2009-09-02 23:08:36 -05:00
Vitor Santos Costa
903358724d fix bad code in between (obs from Jose Santos). 2009-09-02 23:07:43 -05:00
Costa Vitor
5fb3ec0515 fix repeated definition for halt. 2009-09-01 00:00:08 -05:00
Vitor Santos Costa
12d793755e load control.yap 2009-08-20 10:38:33 -05:00
Vitor Santos Costa
2984a660fb make setup in setup_call_cleanup deterministic (#141)
break utils.yap and transfer control functionality to control.yap
2009-08-20 10:36:58 -05:00
Costa Vitor
014209c22f undo bug fix, it just handled one case. 2009-07-22 14:31:15 -05:00
Costa Vitor
ead58f6b34 in tabled mode, replace X is Y by X=X', is(Y') to avoid cases where Y is assigned determinastically but needs to be later restored. (obs Ricardo Rocha) 2009-07-22 14:23:32 -05:00
Costa Vitor
df8f194d80 fix setof cleanup vars (patch from Bart Demoen). 2009-07-02 14:46:07 -05:00
Costa Vitor
5d966928b9 prolog_file_name/2 was missing 2009-07-01 12:11:33 -05:00
Costa Vitor
d8595221d0 optimise sub_atom when sub_atom is known. 2009-06-22 15:35:40 -05:00
Vitor Santos Costa
557ed169e8 fix processing of meta-arguments. 2009-06-14 22:58:12 -05:00
Vitor Santos Costa
65e8ed2908 use more efficient predicate. 2009-06-14 22:57:07 -05:00
Vitor Santos Costa
a22f66a4fa don't import everything in a module by default when reexporting it #134 2009-06-14 12:16:54 -05:00
Vitor Santos Costa
9dff291be2 improve DCG support #72 2009-06-12 14:08:03 -05:00
Vitor Santos Costa
d8e92a2808 do not use immediate updates, even in cprolog mode. 2009-06-11 23:05:10 -05:00
Ulrich Neumerkel
7ae4c887fc Instantiation error for looping :- meta_predicate P. 2009-06-08 20:26:57 -05:00
Vitor Santos Costa
a9647b0321 wake up goals the same order they were suspended. 2009-06-05 09:48:00 -05:00
Costa Vitor
51d1c442d6 fix not_empty_list #92 2009-06-03 10:43:40 -05:00
Costa Vitor
8a20da6639 fix clean_call handling by top level (regression #110) 2009-06-03 10:11:41 -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
Vitor Santos Costa
627a4f8b1f ensure environment after goal execution in call_cleanup #106 2009-06-01 23:43:59 -05:00
Ulrich Neumerkel
28f593f0a8 alarm(0,Any1,Any2) steadfast: Always disables alarm. 2009-06-01 18:03:02 -05:00
Vitor Santos Costa
d6ed058157 first pass at a decent implementation of PL_error (#95)
- basically copy SWI code.
2009-05-30 12:52:23 -05:00
Vitor Santos Costa
f61aee4a83 third argument to thread_create needs :, #91 2009-05-30 10:43:03 -05:00
Vitor Santos Costa
2dae7fd5ef fix unnecesary warnings for multifile (obs from Paulo Moura). 2009-05-29 10:48:40 -05:00
Vitor Santos Costa
3fc4f71bee prolog module is visible everywhere. 2009-05-28 21:51:34 -05:00
Ulrich Neumerkel
c1dcb1d75d FIX #85 (defaultyness & meta_predicate), and thus #84, #82, #69 2009-05-28 12:35:41 -05:00
Ulrich Neumerkel
2b495cd095 Introduction of errors for signal. In a case of conflict, 13211-1:7.12.2a is given precedence over 13211-2:6.7.1.4 2009-05-28 12:34:13 -05:00
Vitor Santos Costa
4f71103b88 idon't disable interrupts for creeping. 2009-05-25 09:57:59 -05:00
Vitor Santos Costa
9a0393e2ce predicate_property would only return first prop for system pred (obs from Paulo Moura). 2009-05-25 09:57:27 -05:00
Vitor Santos Costa
99ac4f4d4a handle SWI style goal expansion natively, instead of trying to be smart. 2009-05-24 19:18:52 -05:00
Vitor Santos Costa
f5bff2a21d just indenting 2009-05-24 15:16:40 -05:00
Vitor Santos Costa
f79d79e926 replace TYPE_ERROR_VARIABLE for attributes #57 2009-05-22 21:51:48 -05:00
Costa Vitor
7304fbda13 fix lack of streams message (Ulrich Neumerkel #60) 2009-05-22 19:55:18 -05:00
Vitor Santos Costa
8f019b22de make sure to work even without system mode 2009-05-22 14:01:05 -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
e466bf2c5b fix $notrace (Ulrich Neumerkel #26) 2009-05-21 23:51:34 -05:00
Vitor Santos Costa
3736ba5793 $notrace should call $execute and disable interrupts below. 2009-05-21 22:35:24 -05:00
Vitor Santos Costa
a58e3d812d fix interrupt enabling in call_setup and friends
remove between.
2009-05-21 00:41:35 -05:00
Vitor Santos Costa
46543ccb5c remove redundant $between 2009-05-21 00:40:52 -05:00
Vitor Santos Costa
fe01f71f3e between/3 is now part of arith.yap:
- handle inf
- handle errors
- make top case deterministic (Ulrich #66)
2009-05-21 00:36:09 -05:00
Vitor Santos Costa
26a20fa74a fix showing clean_call (#65 Ulrich Neumerkel). 2009-05-20 09:12:01 -07:00
Vitor Santos Costa
26057240a8 fix call_cleanup/2 and /3 (broken in previous patch). 2009-05-20 07:29:13 -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
13b9098200 Ulrich: [PATCH-YAP] Permit | in DCGs. 2009-05-18 07:39:01 -07:00
Vitor Santos Costa
cfec78de06 fix copy_term and frozen (obs from Ulrich). 2009-05-18 07:07:42 -07:00
Vitor Santos Costa
55036ad9bb check if argument to when is bound (obs from Ulrich Neumerkel). 2009-05-17 10:58:21 -07:00
Vitor Santos Costa
f4e3869025 include messages for out of stack and friends. 2009-05-17 10:40:14 -07:00
Vitor Santos Costa
1058a350c6 more cleanups: get rid of dead code. 2009-05-16 12:08:11 -07:00
Vitor Santos Costa
1fe1b19534 cleanup handling of attributed variables:
- try to make it clear when to call project
- try to make it clear when to generate goals for attributed variables (get_goalist_from_attvars).
- change call_residue to rely this infrastructure and then add extra variables.
- change frozen never to call project.
2009-05-16 12:00:56 -07:00
Vitor Santos Costa
8cfd6cf7fc make length steadfast (from Ulrich Neumerkel). 2009-05-15 20:54:14 -05:00
Vitor Santos Costa
bdf8b890e3 copy_term/3 2009-05-13 17:11:21 -05:00
Vitor Santos Costa
04fa96e8a0 add call_residue_vars (SWI and SICStus 4 compatibility). 2009-05-13 16:43:24 -05:00
Vitor Santos Costa
e5a3150da0 ** and exp should not be compiled as ^. 2009-05-09 23:40:37 -04:00
Vitor Santos Costa
f065e9359b hProlog semantics requires checking *every* existing attributed variable (broken
in recent patch).
2009-05-08 00:01:09 -04:00
Vitor Santos Costa
d3632dd48c fix case where you may bind variable (eg, freeze(X,Y)), obs from Ulrich Neumerkel. 2009-05-07 23:51:18 -04:00
Vitor Santos Costa
7d37428f36 fix reporting state of unknown flag (obs from Paulo Moura). 2009-05-06 09:33:13 -05:00
Vitor Santos Costa
6a6b18b045 send the abort message at the right place. 2009-05-04 22:31:03 -05:00
Vitor Santos Costa
e3293851a7 change variable names so that they are standard everywhere. 2009-05-04 18:11:11 -05:00
Vitor Santos Costa
42442bd360 make sure throw goes away on deterministic computations. 2009-05-04 18:10:07 -05:00
Vitor Santos Costa
d7559c3f96 put a reminder that in the future YAP will give an exception on unknown. 2009-05-04 18:08:12 -05:00
Vitor Santos Costa
848e1209a2 make sure call_cleanup makes exception handler fail. 2009-05-04 14:02:17 -05:00
Vitor Santos Costa
95ee0d9148 support calling attribute_goals. 2009-04-25 12:54:50 -05:00
Vitor Santos Costa
50fd7dca5a support thread_initialization. 2009-04-25 12:54:21 -05:00
Vitor Santos Costa
c132e7e6ec fix gmp support to give out of resource error if the bignum is too big. 2009-04-25 11:01:33 -05:00
Vitor Santos Costa
9ef589aef7 simplify output messages 2009-04-25 10:58:21 -05:00
Vitor Santos Costa
2503805aff support 2^2 is 4 and not 4.0: complicated if we have to deal with bignums. 2009-04-24 19:03:00 -05:00
Vitor Santos Costa
e3aeb48af6 call_cleanup/3 should allow exceptions to go through, even if cleaner
itself calls an exception (obs from Ulrich Neumerkel).
2009-04-24 18:06:33 -05:00
Vitor Santos Costa
13f66957b6 break should restore system_mode. 2009-04-23 11:48:06 -05:00
Vitor Santos Costa
c1aba9a840 fix the signal handling a bit better. 2009-04-22 16:13:08 -05:00
Vitor Santos Costa
2f8c9c6b6c block users from catching user balls. 2009-04-22 11:32:07 -05:00
Vitor Santos Costa
cf2b399e9a debugger events should be known to the debugger! 2009-04-22 11:31:31 -05:00
Vitor Santos Costa
9d07b51937 make sure we don't redo things. 2009-04-21 15:19:26 -05:00
Vitor Santos Costa
af69088bc3 debug mode should be recovered at debug exit. 2009-04-21 15:01:18 -05:00
Vitor Santos Costa
374051733b objects may be more than .so: they may be .dylib or .dll. 2009-04-17 16:19:21 -05:00
Vitor Santos Costa
f668676e72 make a better effort to avoid walking through system code. 2009-04-17 15:46:13 -05:00
Vitor Santos Costa
e42083a2bb fix bad call. 2009-04-17 14:18:05 -05:00
Vitor Santos Costa
6da3d91f78 current_predicate: avoid debugger walking into clauses and make cp(X,M:a(_)) more efficient. 2009-04-16 19:06:49 -05:00
Vitor Santos Costa
9b088119c7 fix a case where one can creep inside the debugger. 2009-04-16 16:33:49 -05:00
Vitor Santos Costa
007a1346f4 fix unhandled exceptions. 2009-03-26 08:54:49 +00:00
Vitor Santos Costa
f46ff06f38 get rid of broken $clause/3: fixes listing of dynamic predicates. 2009-03-26 08:12:24 +00:00
Vitor Santos Costa
bdd625c8ae arena is allocated by the system now. 2009-03-24 13:47:32 +00:00
Vitor Santos Costa
67b29f3c85 improve SWI compatibility. 2009-03-13 19:40:27 +00:00
Vitor Santos Costa
c9c097b32d improve implementation of call_with_args/* 2009-03-13 11:11:04 +00:00
Vitor Santos Costa
503d97af90 make top-level error handling a bit more compatible with SWI. 2009-03-10 18:07:50 +00:00
Vitor Santos Costa
fc2e01f320 improve code for disjunctions by trying to avoid permanent variables. 2009-03-10 16:24:26 +00:00
Vitor Santos Costa
4af5713fd2 use current version of library 2009-03-09 00:44:30 +00:00
Vitor Santos Costa
2bc5d8425a fix arithmetic dependence on Prolog table. 2009-02-25 00:12:36 +00:00
Vitor Santos Costa
94ebb90719 UDI patch: make it work with YAP. 2009-02-20 11:42:48 +00:00
Vitor Santos Costa
ad2d073184 allow better writing of inlined operations
disallow eval.yap
2009-02-16 21:04:30 +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
d0de8a9f7d include fixes from stable releasew 2009-02-16 09:55:31 +00:00
Vítor Santos Costa
78bd156a20 trivial interface to udi code (for now). 2009-02-12 21:40:44 +00:00
Vitor Santos Costa
a40dc14525 fix discontiguous warnings 2009-02-10 23:03:25 +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