This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- object(particle). | |
% common properties to all particles | |
:- public([ | |
boson/0, fermion/0, | |
mass/1, spin/1, lifetime/1, charge/1 | |
]). | |
:- end_object. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
?- logtalk_compile('ale.swi.pl'). | |
* Suspicious call: \+A=(B intro C) instead of A\=(B intro C) | |
* while compiling object ale | |
* in file /Users/pmoura/Desktop/ale.swi.pl between lines 1435-1438 | |
* | |
* Suspicious call: sub_type(A,B),\+A=a_ C,sub_type(D,B),\+D=a_ E in setof/3 goal contains singleton variables [C,E] | |
* while compiling object ale | |
* in file /Users/pmoura/Desktop/ale.swi.pl between lines 1481-1488 | |
* | |
* Suspicious call: \+A=a_ B instead of A\=a_ B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- module(ale, []). | |
:- dynamic to_rebuild/1. | |
:- dynamic edge/8. | |
:- dynamic parsing/1. | |
:- dynamic ext_sub_structs/6. | |
:- dynamic alec_closed_rules/1. | |
:- dynamic fspal_ref/1. | |
:- dynamic (empty)/1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph "assertions" { | |
rankdir="BT" | |
ranksep="1.0" | |
compound="true" | |
splines="true" | |
pack="true" | |
clusterrank="local" | |
labeljust="l" | |
margin="1.0" | |
fontname="Courier" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digraph "sicstus" { | |
rankdir="BT" | |
ranksep="1.0" | |
compound="true" | |
splines="true" | |
pack="true" | |
clusterrank="local" | |
labeljust="l" | |
margin="1.0" | |
fontname="Courier" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jpl.Atom; | |
import jpl.Compound; | |
import jpl.JPL; | |
import jpl.Query; | |
import jpl.Term; | |
/** | |
* This class shows how to configure Logtalk in SWI or YAP using the Jpl library. | |
* You need to have the jpl jar in your classpath to compile and execute this file. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% use the apply module instead of the Logtalk meta | |
% library object to illustrate interoperability | |
:- use_module(library(apply)). | |
:- use_module(library(apply_macros)). | |
:- category(math). | |
:- public(interpolate/4). | |
interpolate(K1, X1, X2, Y) :- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Logtalk parametric entity parameters are _logical variables_ | |
% that are implicitly shared by all entity predicates. | |
% | |
% Parameters can be accessed using either the parameter/2 built-in | |
% predicate or by using _parameter variables_. Here we use the | |
% latter to decouple parameter access from parameter position. | |
% | |
% As ancestors should not force a specific parameter order on the | |
% descendants (which would be a code smell), each prototype provides | |
% a protected predicate (that can be overriden) for constructing a |