Comparision of abstract machines for execution of Prolog [closed] - prolog

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I'm looking for research paper or any other publication that compare different abstract machines (more than one) for execution of Prolog with prolog interpreters not based on abstact machines. What I've seen so far is that majority of implementations seems to base their prolog interpreters on Warren Abstract Machine although other abstract machines were proposed (eg. Vienna Abstract Machine, Tree-Oriented Abstract Machine) and there is no any general comparision. I'm interested in comparision of efficiency (not features), although all compared interpreters should allow for constraint-logic programming.

You can build constraint logic programming on top of ordinary prolog
if you introduce some primitives for a trailed constraint store and
some primitives for unification hooks. E.g.:
SICStus Prolog: Attributed Variables
http://sicstus.sics.se/sicstus/docs/3.7.1/html/sicstus_17.html
Jekejeke Minlog: Little Solver
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/15_min/10_docu/02_reference/04_examples/05_solver.html
http://www.jekejeke.ch/idatab/doclet/prod/en/docs/15_min/15_stdy/06_bench/10_examples/02_addensure/01_referensure.p.html
Of course you can view the additional primitives as new instructions
in the abstract machine. But in both cases above the primitives are
added on the predicate level, so that it begs the question whether there
is really a need for an abstract machine for constraint logic programming.
Of course you will find a couple of suggestions of constraint logic programming
abstract machines as well through google.
Bye

Related

Looking for Connected Component Labelling algorithm implementation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am looking for an optimized 4-connectivity or 8-connectivity Connected Component Labelling source code in MATLAB or C++. I saw many implementation of connected component labelling (4-connectivity) in MATLAB.
One of the implementations that works faster is the recursive implementation explained here: http://www.mathworks.com/matlabcentral/fileexchange/38010-connected-component-labeling-like-bwlabel
MATLAB has a built-in bwlabeln or bwlabel, which is far more optimized. They claim to use union-find method from two-pass algorithm described in Sedgewick's Algorithms in C, Addison-Wesley. However, it is hard to find any source code of it. Does anyone have idea about it? An optimized code is really needed.
You can indeed work by scanning the image in scanline order and when you meet a component seed-fill it.
You will find two efficient (and very similar) algorithms in Graphics GEMS 1:
A SEED FILL ALGORITHM, Paul S. Heckbert
FILLING A REGION IN A FRAME BUFFER, Ken Fishkin
and with a little effort some implementations. (The papers give Pascal-like code which is easy to translate.)
They run in linear time, use an explicit stack and don't require union-find.

How to implement fully-declarative Horn logic? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I would like to formalize some knowledge and execute queries in what may referred to as fully-declarative Horn logic (or, fully-declarative Prolog). Could anyone provide some guidelines on how to implement it? I briefly recap the fine description from the link above:
The formal language is that of (the core of) Prolog: a "program" is a set of rules and facts as in Prolog (including functions and variables and basically, containing only user defined predicates).
In contrast to Prolog, however, I am looking for an implementation that is sound and complete with respect to the standard declarative semantics of logic programs --- the least Herbrand model (i.e., the inductively defined set of ground terms). In theoretical work on logic programming this is usually the object of study, and it is well known that a sound and complete answer to queries can be attained (in the "recursively-enumerable" sense), for example, using SLD-resolution subject to the following conditions:
fair search for matching rules (e.g., Prolog's depth-first search is not fair);
unification with "occurs-check" (checking that a variable doesn't occur in a term with which it is unified).
I am looking for a concise implementation that would build on existing capabilities, rather than inventing the wheel. Two of the more promising directions that I see are implementing it as a meta-interpreter of Prolog, or as part of some theorem prover. Could anyone with practical knowledge in these domains provide some guideline on how to implement it? Can it be easily implemented in miniKanren?
My intentions are to formalize some knowledge in a fully-declarative manner. The crucial characteristics of such a formalization is that it precisely corresponds to the mathematical notion of (monotone) induction, so that the knowledge and it's properties can be easily reasoned about with inductive arguments.
It is an easy exercise to implement a prover for Horn logic in a few lines of Prolog. Start with the Vanilla Meta-interpreter, then modify it to use the standard unify_with_occurs_check/2 predicate for all unifications, and to use a complete search procedure - iterative deepening depth first search is the simplest to implement.
See #mat's page A Couple of Meta-interpreters in Prolog for some inspiration.
More pointers:
Datalog has declarative semantics, but as a "Prolog without function symbols" it is not Prolog. See the excellent intro "What You Always Wanted to Know About Datalog (And Never Dared to Ask)" by Ceri, Gottlob and Tanca, 1989. Available via CiteSeerX
Implementations of Prolog that use tabling instead of depth-first search for added declarativeness (plus other nice features as I understand), like XSB.

What are some of the software cost estimation methods and models? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I'm doing some research on software cost estimation models and methods with a few colleagues of mine, and I was just wondering if you guys knew any specifically other than the ones listed below. Thanks!
Models:
The Planning Game
COCOMO / COCOMO II
SLIM
SEER-SEM
Weighted Micro Function Points
Program Evaluation and Review Technique
PRICE Systems
Wideband Delphi
Function Point Analysis
Evidence-based Scheduling
Methods:
Expert Judgment Method
Analogy Method
Parametric / Algorithmic Method
Bottom-Up/Work Breakdown Structure Method
Top-Down Method
Analysis Effort Method
Proxy-Based Estimation Method
There's also the REVIC model mainly used for government projects (as used by http://sepo.spawar.navy.mil/Estimation.html), I've found the Weighted Micro Function Points cost model (as used by http://www.projectcodemeter.com) to be the most useful since it's more suitable for measuring small increments in code development.

Is it possible to do calculus in Ruby? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
What I mean is differentiation and integration, stuff that a CAS would do? (like a Typical handheld CAS if not better.)
Is this possible? What gem(s) would I need to install? Does anyone have any experience with this?
Here are a few gems - in different states of development and completeness - that help increase the "mathing" power of Ruby:
numo-linalg Linear Algebra Library for Ruby/Numo::NArray
nmatrix Dense and sparse linear algebra library for Ruby via SciRuby
rb-gsl Ruby interface to the GNU Scientific Library
daru Data Analysis in Ruby
mathn Deprecated library that extends math operations
mathematical Convert mathematical equations to SVGs, PNGs, or MathML
Unfortunately, Ruby as a language has mostly been used for rapid web application prototyping and development and NOT scientific analysis or data science. Thus, it's capabilities in this area - when compared to other languages such as a Python - are still somewhat lacking.

Relationships between complexity theory and software engineering? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm interested to know if there is any literature out there on the relationship of complexity theory (emergence, complex systems, evolution) and software development processes. I read somewhere that SCRUM philosophy came out of the theory of punctuated equilibrium in evolution theory. Are there any additional studies/researches on this subject?
Thanks!
There's a slightly tongue-in-cheek book called Systemantics. Because a software program is a type of system, its observations are applicable to software: for example,
The bigger the system, the narrower and more specialized the interface with individuals.
A complex system cannot be "made" to work. It either works or it doesn't.
A simple system, designed from scratch, sometimes works.
Some complex systems actually work.
A complex system that works is invariably found to have evolved from a simple system that works.
A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over, beginning with a working simple system.
There interesting blog posts by Jurgen Appelo of NOOP.NL fame, which are related to application of complexity theory to software engineering and project management:
Your Project Will Suffer From Power Laws
What (Else) Can Agile Learn from Complexity?
These can be helpful in researching this topic.

Resources