Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Serialization
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Prolog=== [[Prolog]]'s ''term'' structure, which is the only data structure of the language, can be serialized out through the built-in predicate <code>write_term/3</code> and serialized-in through the built-in predicates <code>read/1</code> and <code>read_term/2</code>. The resulting stream is uncompressed text (in some encoding determined by configuration of the target stream), with any free variables in the term represented by placeholder variable names. The predicate <code>write_term/3</code> is standardized in the [[Prolog#ISO Prolog|ISO Specification for Prolog]] (ISO/IEC 13211-1) on pages 59 ff. ("Writing a term, Β§ 7.10.5"). Therefore it is expected that terms serialized-out by one implementation can be serialized-in by another without ambiguity or surprises. In practice, implementation-specific extensions (e.g. SWI-Prolog's dictionaries) may use non-standard term structures, so interoperability may break in edge cases. As examples, see the corresponding manual pages for SWI-Prolog,<ref>{{cite web|url=https://www.swi-prolog.org/pldoc/man?section=termrw|title="Term reading and writing"|website=www.swi-prolog.org}}</ref> SICStus Prolog,<ref>{{cite web|url=https://sicstus.sics.se/sicstus/docs/latest4/html/sicstus.html/mpg_002dref_002dwrite_005fterm.html#mpg_002dref_002dwrite_005fterm|title="write_term/[2,3]"|website=sicstus.sics.se}}</ref> GNU Prolog.<ref>{{cite web|url=http://gprolog.org/manual/html_node/gprolog038.html|title="Term input/output"|website=gprolog.org}}</ref> Whether and how serialized terms received over the network are checked against a specification (after deserialization from the character stream has happened) is left to the implementer. Prolog's built-in [[Prolog syntax and semantics#Definite clause grammars|Definite Clause Grammars]] can be applied at that stage.
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Serialization
(section)
Add topic