Questions tagged [ciao-prolog]

Ciao is a programming system based on Prolog.

Questions specific to Ciao system use and development including questions concerning implementation of common algorithms using Ciao.

5 questions
3
votes
1 answer

How to call facts and rules from another file

Case: I have a file, solution.pl, where I want to use the rules of another file (this is the definition of the program, not up to me, but I think it's somewhat common). So I'm using Ciao Prolog and the syntax seems to be…
keont
  • 653
  • 1
  • 9
  • 26
1
vote
0 answers

set_prolog_flag(double_quotes, chars). not having effect

I am using Ciao prolog version 1.15. I tried ?- set_prolog_flag(double_quotes, chars). yes ?- current_prolog_flag(double_quotes,X). X = chars ? yes ?- X = "hello". X = [104,101,108,108,111] ? so it seems like setting this flag is not working…
goblinshark
  • 133
  • 9
0
votes
1 answer

How to specify ciao language mode for compilation

I have the following Prolog program: main :- write("Hello"), nl. Running this under ciao (through compilation ciaoc or in a repl ciaosh) results in printing the ASCII list representation of this string: [72,101,108,108,111] This, however,…
Regan Koopmans
  • 451
  • 6
  • 16
0
votes
1 answer

Prolog: Concatenate 2 constant Variables with a dash

My problem is, that I don't know how i can dynamically concatenate 2 constants in Prolog. For example I have the following procedures: word1(lys). word2(ser). word3(rta). ... wordN(...). How can I write a function or create a varibale which…
Siminho
  • 109
  • 1
  • 2
  • 6
0
votes
1 answer

Passing a number as a parameter to an executable (Prolog code compiled using ciaoc) generates an error

I need to compile Prolog code into an executable that reads two parameters (one a text string and the other a number) %test.pl: main([A,N]) :- Z is 2 * N, write(A), nl, write(Z), nl. Using the Ciao interpreter I…
CliffN
  • 16
  • 6