making prolog program EXECUTABLE - prolog

I am working on a prolog project and i would like to make it executable.
How can I do this?
I am using swi-prolog

Related

How to make Prolog on terminal notice the new changes added to a Prolog source file?

I open a SWI-Prolog through terminal with Swipl -s prolog_file . However, each time I add new facts to the Prolog source file and save, I have to restart SWI-Prolog on terminal to make it notice the changes.
I thought using CTRL + s on the Prolog source file is enough to let SWI-Prolog notice the changes but it doesn't.
On windows there is a Prolog editor with compile button, when you compile the file, SWI-Prolog will notice the changes, but I'm using Kali Linux, so I'm writing on text editor.
How can I make SWI-Prolog notice the changes ?
When you get the ?- prompt, type make.
This is a built-in in SWI, it can be simulated in SICStus.
For complex projects including a lot of preprocessing and modules this feature may not work.

SCIP makefile for c++

I am beginner in using SCIP. I want to solve a simple MILP written in C++. I developed a simple makefile to compile and run my model but I realized there many nested header files when you call SCIP. I was wondering there might be a sample makefile to solve MILPin C++ using SCIP.
Thanks
You can use a makefile from one of the SCIP examples, e.g. scip/examples/TSP/Makefile. The C++ files of your project should be then added to the MAINOBJ variable.

Create Ruby/Rake executable

Is there any way to create executable binaries from Ruby/Rake task?
I have simple FileUtil tool written in ruby and I'd like to package it somehow into script that can be run or OSX, Linux or Windows. Is there any way to do that?
Ruby is an interpreted language and not a compiled one like C or Java. Then answering your question is not so easy.
But there are some tools that permit you to protect your source code (encrypting) and creating some packages that are runnable cross platform (but in this case you should ever resolve any dependency).
This question covers pretty good how you can distribuite your code without (or encrypting) your source code: Can you Distribute a Ruby on Rails Application without Source?
Other useful tools that I have founded in these moments:
- Compiling a rake https://github.com/luislavena/rake-compiler
- Debian (.deb) packaging http://crohr.me/pkgr/

Statically compiling with SWI Prolog

I have been using SWI Prolog for a while and I am a little unhappy about the interpreted nature of it. When I found the qsave_program/2 I though I was in for a treat. I wasn't. Apparently SWIPL doesn't actually statically compile, even with qsave_program('foo.exe', [stand_alone(true), goal(foo(X))]).
This is what I have done:
From the GUI console, I have loaded the source file *.pl with consult/1,
I do a test and query foo(X) and get the expected result,
I submit the command qsave_program/2 as above (with real input of course),
I attempt to run the program foo.exe,
I receive a system error, outlining the execution error which states that 'libswpl.dll does not
exist' (I am running windows of course),
I rage at SWIPL.
I have noticed that libswipl.dll does exist - in the SWI Prolog program file that is! I can successfully run the program in this location, which is in the same directory as SWIPL-win.exe
I ask you: what am I missing? Do I need to do any other precompiling for SWI Prolog?

How to compile scheme code to a bin file?

I am using a software who has a built-in scheme interpreter. User could communicate and/or manipulate the software by typing command in the interpreter. The interpreter also could load scheme code file or bin file that contain scheme code. I wrote some scheme functions like this:
(define test (lambda(() (display "This is a test!")))
I will use the function "test" in the software interpreter later.
I don't want to anyone to change my code, so how can I compile this function into a bin file and load it to the interperter later?
Thanks a lot!!!
Joe
Interpreters don't run compiled code.
You can compile all your scheme program with scheme compilers but not have an hybrid interpreted/compiled code
http://www.call-cc.org/
Yours

Resources