current_prolog_flag(version_data,ciao(_,_,_,commit_info(_,_,D,V))),format('Ciao ~a ~a~n',[V,D]),false.
?- functor(P,F,A). noExpected: instantiation error.
Same when put into a file:
:- initialization((functor(_,_,_);writeq(bad))).results in
bad
?- setof(P,R^predicate_property(P,R),Ps). Ps = ['basiccontrol:!'] ? ; %% unexpected, expected as below Ps = ['basiccontrol:fail'] ? ?- findall(P,predicate_property(P,_),PsU),sort(PsU,Ps). Ps = ['basiccontrol:!','basiccontrol:fail','basiccontrol:repeat' ...
numberchars/3,cyclic_term/1 ttydisplay/1,ttydisplay_string/1,ttydisplayq/1,ttyflush/0,ttyget/1,ttyget1/1,ttynl/0,ttyput/1,ttyskip/1,ttyskipeol/0,ttytab/1 close_file/1,see/1,seeing/1,seen/0,tell/1,telling/1,told/0Missing BIPs:
current_predicate/1,false/0,set_stream_position/2
use_package(iso_strict).
g1:/opt/gupu/ciao> cat /etc/issue Ubuntu 21.10 \n \l g1:/opt/gupu/ciao> ./ciao-boot.sh local-install Configuration mode... basic Verbose builder... no Generate documentation... yes Generate .asr files during compilation... yes Enable parallel builds (experimental)... no Installation type... local Registration type... user Prefix for installation directories... Base for system installation... Installation directory for executables... Installation directory for 'man' pages... Installation directory for 'info' files... Permissions for installed execs/dirs... 775 Permissions for installed data files... 664 Custom group for installed files... Path of GNU make command... /usr/bin/X11/gmake Path of GNU tar command... /usr/bin/X11/tar Update dot shell initialization files... yes Shell initialization file for bash... /nfs/ahome/ulrich/.bashrc Shell initialization file for zsh... /nfs/ahome/ulrich/.zshrc Shell initialization file for csh/tcsh... /nfs/ahome/ulrich/.cshrc core:itf_format... f Enable (optional) runtime checks... no core:rtchecks_level... inner core:rtchecks_trust... yes core:rtchecks_entry... yes core:rtchecks_exit... yes core:rtchecks_test... no core:rtchecks_asrloc... yes core:rtchecks_predloc... yes core:rtchecks_callloc... predicate core:rtchecks_namefmt... long Symbolic link from Ciao to 'prolog' executable... yes Custom C compiler... Custom C linker... Additional C compiler flags... Specify additional C linker flags... Target OS... LINUX Force 32-bit architecture... no Force 64-bit architecture... no Target architecture... x86_64 Enable threads in engine... yes Enable and-parallel execution... no Enable parallel backtracking... no Enable tabled execution... yes Optimization level... optimized Engine debug level... nodebug => core.engine: building [bin] compiling ciaoengine.LINUXx86_64 (engine) /opt/gupu/ciao/builder/sh_src/config-sysdep/config-sysdep.sh: 501: [: ': unexpected operator /opt/gupu/ciao/builder/sh_src/config-sysdep/config-sysdep.sh: 501: [: ': unexpected operator /opt/gupu/ciao/builder/sh_src/config-sysdep/config-sysdep.sh: 501: [: unexpected operator /opt/gupu/ciao/builder/sh_src/config-sysdep/config-sysdep.sh: 501: [: unexpected operator => core.exec_header: building [bin]
g1:/opt/gupu/ciao> git describe fatal: No annotated tags can describe 'dc5c4356c624d718ba767600723174c357dfa124'. However, there were unannotated tags: try --tags.
?- X #= abs(-2). no
Ciao 1.20-v1.21.0-alpha.3-7-gd9db7548 (2021-06-10 04:46:33 +0200) [LINUXx86_64] ?- use_package(clpfd). {Using package /opt/gupu/ciao/core/library/clpfd/clpfd.pl {Including /opt/gupu/ciao/core/library/clpfd/clpfd_ops.pl } } yes ?- catch(X in _, Error, true). in/2 expected range found _1108 no ?-Expected: Error = error(instantiation_error, _)
?- read_term(T,[variable_names(VNs)]). B+A+Y+D+C. T = _B+_A+_E+_D+_C, VNs = ['A'=_A,'B'=_B,'C'=_C,'D'=_D,'Y'=_E] ? yesThe variable order should be left-to-right. Thus expected:
VNs = ['B'=_B, 'A'=_A, 'Y'=_E, 'D'=_D, 'C'=_C]Here is a way to fix this quickly!
% TODO: Can this reader be implemented deterministically? % The reader can do backtracking at some points: % - when an operator can be infix and postfix at the same time % (e.g. op(400, xfy, a). op(400, yf, a). X = a a. ) % This problem is inherited by many Prolog. % (jfran)See NOTE 4 in 6.3.4.3 of ISO/IEC 13211-1:1995.
?- subsumes_term(X, f(X)). {ERROR: user:subsumes_term/2 - existence error: procedure:user:subsumes_term/2 does not exist} no ?- use_module(library(terms_check),[subsumes_term/2]). Note: module terms_check already in executable, just made visible yes ?- subsumes_term(g(X), g(f(X))). yes ?- subsumes_term(X, f(X)). yesExpected: failure.
Note that subsumes_term/2 does not check for instances in general! It checks for certain instances!
ulrich@p0:/opt/gupu/src$ git clone https://github.com/ciao-lang/ciao.git Cloning into 'ciao'... remote: Counting objects: 4464, done. remote: Total 4464 (delta 0), reused 0 (delta 0), pack-reused 4464 Receiving objects: 100% (4464/4464), 5.53 MiB | 992 KiB/s, done. Resolving deltas: 100% (1753/1753), done. ulrich@p0:/opt/gupu/src$ cd ciao ulrich@p0:/opt/gupu/src/ciao$ git log|head commit 17eb2bd70e3898bc25eec54229f85f4a677f7d57 Author: Jose F. Morales <jfmcjf@gmail.com> Date: Mon Sep 26 14:37:09 2016 +0200 Public snapshot for a0566bced4b35998ef2485b76eaa92d57e0f57d2 Src-commit: a0566bced4b35998ef2485b76eaa92d57e0f57d2 commit fbcb82ff81cc370f45bb22d0788ce29282677729 Author: Jose F. Morales <jfmcjf@gmail.com>
Ciao 1.15-1781-g328b907: Fri Sep 28 16:50:14 CEST 2012 ?- current_prolog_flag(double_quotes,X). X = chars ? ; no ?- writeq("abc"). [97,98,99] yesExpected: if the value is
chars
, then "abc" should be [a,b,c].
?- set_prolog_flag(double_quotes,codes). no
uninstantiation_error
op/3
errors,
subsumes_term/2
,
callable/1
,
acyclic_term/1
,
term_variables/2
,
call/2..8
,
max/2
,
min/2
,
(^)/2
,
asin/1
,
acos/1
,
atan2/2
,
tan/1
,
pi/0
,
xor/2
.
?- predicate_property(P,built_in). noExpected: All ISO built-ins.
?- arg(0,f(a1,a2),A). no ?- arg(-1,f(a1,a2),A). noExpected:
domain_error(not_less_than_zero,-1).
History:
?- arg(I,f(a1,a2),A). noExpected:
instantiation_error
.
ulrich@gupu2:~/iso-prolog$ ciao Ciao 1.13.0-12829: Fri Nov 19 18:55:53 CET 2010 ?- set_prolog_flag(double_quotes,chars). yes ?- L="a". L = [97] ?Expected:
L = [a].
Also:
?- set_prolog_flag(double_quotes, codes). noExpected: Success.
?- catch(X is-1**1.5,error(E,_),true). X = 0.Nan ? ;Expected:
E = evaluation_error(undefined)
?- callable(X).Expected: Failure.X = a ? ;X = [_|_] ? ; no
?- number_chars(0,['0','0']). noExpected: Success.
?- Xs=[a|Xs],atom_chars(A,Xs). {ERROR: Memory allocation failed [in Realloc()]} { Execution aborted }Expected:
type_error(list,[a| ...])
.
?- atom_chars(X, [a|_]). X = a ? ; {ERROR: atomic_basic:atom_codes/2, arg 2 - instantiation_error} no
?- X = * . X = * ?Expected: Within an appropriate mode, a syntax error should be signaled. This is due to 13211-1 5.1 e. With the exception of Siemens IF/Prolog, all other systems do not offer such a mode which means that Prolog code is brittle, since systems differ slightly in the way they do extensions. The standard does not specify the exact way how this mode is enabled. It could be one flag for everything, but it could be also a separate flag for each feature. E.g.
iso_operators
would be a nice flag name.
?- functor(F,f,400). noExpected: representation error
?- X=1+X,Y is X. Segmentation faultExpected: type error.
?- catch(length(Xs,100000000),Pat,true). {ERROR: Memory allocation failed [in Realloc()]} { Execution aborted }Expected resource error. Pat = error(...).
dynamic
is a prefix operator:
?- X = static-(dynamic). X = static-dynamic ?Expected: brackets as in the query above. Sometimes, the brackets are written already:
?- X = 1* (+). X = 1*(+) ?
Name | Last modified | Size | Description | |
---|---|---|---|---|
Parent Directory | - | |||
CIAO-HEADER.html | 09-Jun-2023 10:45 | 32K | ||
Makefile | 16-Dec-2006 00:32 | 16 | ||
gupu/ | 29-Nov-2016 20:47 | - | ||
item1.txt | 20-Dec-2006 07:59 | 4.8K | ||
item2.txt | 20-Dec-2006 08:59 | 667 | ||
item35/ | 30-Nov-2016 00:24 | - | ||
item37.txt | 15-Dec-2016 14:47 | 293 | ||