backcomp.pl -- Backward compatibility
This library defines predicates that used to exist in older version of SWI-Prolog, but are considered obsolete as there functionality is neatly covered by new features. Most often, these constructs are superceeded by ISO-standard compliant predicates.
Please also note the existence of quintus.pl and edinburgh.pl for more compatibility predicates.
- $arch(-Architecture, -Version) is det
- $version(Version:integer) is det
- $home(-SWIPrologDir) is det
- $argv(-Argv:list) is det
- $set_prompt(+Prompt) is det
- Set the prompt for the toplevel
- displayq(@Term) is det
- displayq(+Stream, @Term) is det
- Write term ignoring operators and quote atoms.
- sformat(-String, +Format, +Args) is det
- sformat(-String, +Format) is det
- concat(+Atom1, +Atom2, -Atom) is det
- concat_atom(+List, -Atom) is det
- Concatenate a list of atomic values to an atom.
- concat_atom(+List, +Seperator, -Atom) is det
- Concatenate a list of atomic values to an atom, inserting Seperator between each consecutive elements.
- $apropos_match(+Needle, +Haystack) is semidet
- True if Needle is a sub atom of Haystack. Ignores the case of Haystack.
- read_clause(-Term) is det
- read_clause(+Stream, -Term) is det
- read_variables(-Term, -Bindings) is det
- read_variables(+In:stream, -Term, -Bindings) is det
- read_pending_input(+Stream, -Codes, ?Tail) is det
- feature(?Key, ?Value) is nondet
- set_feature(+Key, @Term) is det
- Control Prolog flags.
- substring(+String, +Offset, +Length, -Sub)
- Predecessor of sub_string using 1-based Offset.
- string_to_list(?String, ?Codes) is det
- Bi-directional conversion between a string and a list of character codes.
- string_to_atom(?String, ?Atom) is det
- Bi-directional conversion between string and atom.
- flush is det
- write_ln(X) is det
- proper_list(+List)
- Old SWI-Prolog predicate to check for a list that really ends in a []. There is not much use for the quick is_list, as in most cases you want to process the list element-by-element anyway.
- free_variables(+Term, -Variables)
- Return a list of unbound variables in Term. The name term_variables/2 is more widely used.
- subsumes_chk(@Generic, @Specific)
- True if Generic can be made equivalent to Specific without changing Specific.
- subsumes(+Generic, @Specific)
- True if Generic is unified to Specific without changing Specific.
- hash_term(+Term, -Hash) is det
- If Term is ground, Hash is unified to an integer representing a hash for Term. Otherwise Hash is left unbound.
- checklist(:Goal, +List)
- sublist(:Goal, +List1, ?List2)
- Succeeds if List2 unifies with a list holding those terms for wich
call(Goal, Elem)
succeeds. - sumlist(+List, -Sum) is det
- True when Sum is the list of all numbers in List.
- $strip_module(+Term, -Module, -Plain)
- This used to be an internal predicate. It was added to the XPCE compatibility library without $ and since then used at many places. From 5.4.1 onwards strip_module/3 is built-in and the $ variation is added here for compatibility.
- $module(-OldTypeIn, +NewTypeIn)
- $declare_module(Module, File, Line)
- Used in triple20 particle library. Should use a public interface
- at_initialization(:Goal) is det
- Register goal only to be run if a saved state is restored.
- convert_time(+Stamp, -String)
- Convert a time-stamp as obtained though get_time/1 into a textual
representation using the C-library function
ctime()
. The value is returned as a SWI-Prolog string object (see section 4.23). See also convert_time/8. - convert_time(+Stamp, -Y, -Mon, -Day, -Hour, -Min, -Sec, -MilliSec)
- Convert a time stamp, provided by get_time/1, time_file/2, etc. Year is unified with the year, Month with the month number (January is 1), Day with the day of the month (starting with 1), Hour with the hour of the day (0--23), Minute with the minute (0--59). Second with the second (0--59) and MilliSecond with the milliseconds (0--999). Note that the latter might not be accurate or might always be 0, depending on the timing capabilities of the system. See also convert_time/2.
- C(?List, ?Head, ?Tail) is det
- Used to be generated by DCG. Some people appear to be using in in normal code too.
- current_thread(?Thread, ?Status) is nondet
- current_mutex(?Mutex, ?Owner, ?Count) is nondet
- message_queue_size(+Queue, -Size) is det
- True if Queue holds Size terms.
- lock_predicate(+Name, +Arity) is det
- unlock_predicate(+Name, +Arity) is det
- current_module(?Module, ?File) is nondet
- True if Module is a module loaded from File.
- export_list(+Module, -List) is det
- Module exports the predicates of List.
- setup_and_call_cleanup(:Setup, :Goal, :Cleanup)
- Call Cleanup once after Goal is finished.
- setup_and_call_cleanup(:Setup, :Goal, Catcher, :Cleanup)
- Call Cleanup once after Goal is finished, with Catcher unified to the reason
- merge_set(+Set1, +Set2, -Set3)
- Merge the ordered sets Set1 and Set2 into a new ordered set without duplicates.
- merge(+List1, +List2, -List3)
- Merge the ordered sets List1 and List2 into a new ordered list. Duplicates are not removed and their order is maintained.
- index(:Head) is det
- Prepare the predicate indicated by Head for multi-argument indexing.
- hash(:PredInd) is det
- Demands PredInd to be indexed using a hash-table. This is handled dynamically.
- set_base_module(:Base) is det
- Set the default module from whic we inherit.
- eval_license is det
- trie_insert_new(+Trie, +Term, -Handle) is semidet
- displayq(@Term) is det
- displayq(+Stream, @Term) is det
- Write term ignoring operators and quote atoms.
- sformat(-String, +Format, +Args) is det
- sformat(-String, +Format) is det
- read_variables(-Term, -Bindings) is det
- read_variables(+In:stream, -Term, -Bindings) is det
- feature(?Key, ?Value) is nondet
- set_feature(+Key, @Term) is det
- Control Prolog flags.
- lock_predicate(+Name, +Arity) is det
- unlock_predicate(+Name, +Arity) is det