The Prolog to Mercury transition guide

This file is an aid for people porting Prolog programs to Mercury.

Copyright © 1995–2012 The University of Melbourne.
Copyright © 2013–2025 The Mercury team.

Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies.

Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided also that the entire resulting derived work is distributed under the terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions.

Table of Contents

Up: (mercury) [Contents]


The Prolog to Mercury Transition Guide, version rotd-2025年10月24日

This guide gives some advice about translating Prolog programs into Mercury.

Introduction Introduction.
Syntax Syntax.
IO Input and output.
AssertRetract assert and retract.
FailLoops Failure driven loops.
Commits Cuts.
Accumulators Accumulators and difference lists.
Determinism Determinism.
All-solutions All-solutions predicates: findall and setof.

Up: (mercury) [Contents]

AltStyle によって変換されたページ (->オリジナル) /