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'). true. ?- listing. :- 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)). :- multifile prolog_predicate_name/2. :- thread_local thread_message_hook/3. :- dynamic thread_message_hook/3. :- volatile thread_message_hook/3. language(smalltalk). language(lisp). language(prolog). :- 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'). true. ?- halt.