{\rtf1\ansi\ansicpg1252\cocoartf1671\cocoasubrtf500 {\fonttbl\f0\fnil\fcharset0 Menlo-Regular;\f1\fnil\fcharset0 Menlo-Bold;} {\colortbl;\red255\green255\blue255;\red0\green0\blue0;} {\*\expandedcolortbl;;\csgray\c0;} \margl1440\margr1440\vieww10800\viewh8400\viewkind0 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 \f0\fs22 \cf2 \CocoaLigature0 Last login: Wed Sep 4 10:43:27 on ttys000\ mba:Prolog johnz$ ls\ proglang.pro proglang.pro~ proglangdemo1.txt\ mba:Prolog johnz$ swipl\ Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.3)\ SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.\ Please run ?- license. for legal details.\ \ For online help and background, visit http://www.swi-prolog.org\ For built-in help, use ?- help(Topic). or ?- apropos(Word).\ \ ?- consult('proglang.pro').\ \f1\b true. \f0\b0 \ \ ?- listing.\ \ language(smalltalk).\ language(lisp).\ language(prolog).\ \ :- multifile prolog_predicate_name/2.\ \ \ :- multifile prolog_clause_name/2.\ \ \ history(smalltalk, inventor('Alan Kay'), date(1980)).\ history(lisp, inventor('John McCarthy'), date(1959)).\ history(prolog, inventor('Alan Colmeraur'), date(1971)).\ \ :- dynamic prolog_exception_hook/4.\ :- multifile prolog_exception_hook/4.\ \ prolog_exception_hook(error(E, context(Ctx0, Msg)), error(E, context(prolog_stack(Stack), Msg)), Fr, GuardSpec) :-\ prolog_stack:\ ( current_prolog_flag(backtrace, true),\ \\+ is_stack(Ctx0, _Frames),\ ( atom(GuardSpec)\ -> debug(backtrace,\ 'Got uncaught (guard = ~q) exception ~p (Ctx0=~p)',\ [GuardSpec, E, Ctx0]),\ stack_guard(GuardSpec),\ Guard=GuardSpec\ ; prolog_frame_attribute(GuardSpec,\ predicate_indicator,\ Guard),\ debug(backtrace,\ 'Got exception ~p (Ctx0=~p, Catcher=~p)',\ [E, Ctx0, Guard]),\ stack_guard(Guard)\ ),\ ( current_prolog_flag(backtrace_depth, Depth)\ -> Depth>0\ ; Depth=20\ ),\ get_prolog_backtrace(Depth,\ Stack0,\ [frame(Fr), guard(Guard)]),\ debug(backtrace, 'Stack = ~p', [Stack0]),\ clean_stack(Stack0, Stack1),\ join_stacks(Ctx0, Stack1, Stack)\ ).\ \ essence(smalltalk, objects, 'message passing').\ essence(lisp, lists, 'recursive functions').\ essence(prolog, relations, 'logical inferencing').\ \ :- thread_local thread_message_hook/3.\ :- dynamic thread_message_hook/3.\ :- volatile thread_message_hook/3.\ \ \f1\b true. \f0\b0 \ \ ?- halt.\ mba:Prolog johnz$ }