Deploy SICStus Prolog to Europe β RISE Research Institutes of Sweden πΈπͺ (SICS Stockholm, 1988), High-Performance ISO Prolog with CLP(FD/R/B) and CHR, on EU Infrastructure in 2026
In 1988, Seif Haridi πΈπͺ and colleagues at the Swedish Institute of Computer Science (SICS) in Stockholm launched what would become one of the most complete, highest-performance Prolog systems ever built. SICStus Prolog was designed from the ground up around the Warren Abstract Machine (WAM) β the canonical compilation target for Prolog, named after David H.D. Warren who designed it at Edinburgh in 1983. Unlike interpreters that walk proof trees at runtime, WAM-based Prolog systems compile clauses into bytecode instructions (get_structure, unify_variable, call), execute them in a register machine, and support cut, assert/retract, and full backtracking through a carefully managed choice-point stack.
Thirty-six years later, SICStus Prolog is maintained at RISE Research Institutes of Sweden β the successor to SICS, a Swedish non-profit research organisation funded by the Swedish state and Swedish industry β and remains the de facto standard for industrial constraint programming in Europe. Mats Carlsson πΈπͺ, who joined SICS in the early 1990s and became the primary developer, has driven SICStus through four major versions. Version 4 introduced full ISO 13211-1 compliance, a unified constraint library architecture, and the CLP(FD) library that influenced the design of constraint solvers in ECLiPSe, GNU Prolog, and SWI-Prolog.
WAM Architecture and Compilation
The Warren Abstract Machine organises memory into four areas: the heap (term storage), the stack (environments and choice points), the trail (variable bindings to undo on backtracking), and the code area (compiled bytecode). SICStus compiles Prolog clauses into sequences of WAM instructions:
% SICStus Prolog β WAM compilation target
% Source: parent(tom, bob). parent(tom, liz). parent(bob, ann).
% ancestor(X, Y) :- parent(X, Y).
% ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).
% At the WAM level, the first ancestor clause compiles roughly to:
% get_variable X0, A0 ; X = first argument register
% get_variable X1, A1 ; Y = second argument register
% put_value X0, A0 ; pass X as first arg to parent/2
% put_value X1, A1 ; pass Y as second arg to parent/2
% call parent/2, 2 ; deterministic call with environment size 2
% proceed ; return (last call optimisation)
% Query
:- use_module(library(lists)).
ancestor(X, Y) :- parent(X, Y).
ancestor(X, Y) :- parent(X, Z), ancestor(Z, Y).
parent(tom, bob). parent(tom, liz).
parent(bob, ann). parent(bob, pat).
parent(pat, jim).
% | ?- findall(D, ancestor(tom, D), Descendants).
% Descendants = [bob, liz, ann, pat, jim, jim]
SICStus applies first-argument indexing β it inspects the first argument of each clause head at call time to dispatch to the correct clause group without creating a choice point when the first argument is ground and deterministic. This eliminates most of the overhead of backtracking for typical Prolog programs. Combined with last call optimisation (tail calls reuse the current environment frame), SICStus achieves performance competitive with compiled functional languages for deterministic code.
CLP(FD): Constraint Logic Programming over Finite Domains
The library(clpfd) module implements CLP(FD): constraint variables range over finite integer domains, and constraints narrow these domains through arc consistency propagation. SICStus CLP(FD) was one of the first complete implementations of the CLP scheme (Jaffar and Lassez, 1987) for integer domains, and influenced the architecture of ECLiPSe's ic library (ECRC Munich π©πͺ, 1988) and IBM ILOG CP Optimizer.
:- use_module(library(clpfd)).
% Nurse scheduling: 4 nurses, 3 shifts per day, each shift needs 1 nurse
% Constraint: each nurse works at most 2 shifts per week
nurse_schedule(Schedule) :-
% Schedule = list of shift assignments for 3 days Γ 3 shifts/day = 9 slots
% Each variable = nurse ID (1..4)
length(Schedule, 9),
domain(Schedule, 1, 4),
% Each shift (morning/afternoon/night) must be covered by a different nurse
day_constraints(Schedule),
% Each nurse works at most 2 shifts (fairness)
global_cardinality(Schedule, [1-_-0..2, 2-_-0..2, 3-_-0..2, 4-_-0..2]),
% Solve: first-fail labeling on most constrained variable
labeling([ff, bisect], Schedule).
day_constraints([]).
day_constraints([M, A, N | Rest]) :-
% Morning, afternoon, night nurses differ
M #\= A, A #\= N, M #\= N,
day_constraints(Rest).
% | ?- nurse_schedule(S), write(S), nl, fail ; true.
The global_cardinality/2 constraint is one of the most important global constraints in SICStus CLP(FD): it propagates a Hall's theorem-based consistency check over the entire domain, reducing the search space far more aggressively than pairwise #\= constraints could. SICStus also provides cumulative/4 (resource levelling for scheduling), element/3 (table lookup), and all_different/1 (alldifferent constraint with arc-consistency propagation via RΓ©gin's algorithm).
CLP(R) and CLP(B): Real and Boolean Constraints
Beyond finite domains, SICStus provides two additional constraint domains:
CLP(R) (library(clpr)): constraints over real-valued variables using a simplex-based linear arithmetic solver. This is the original CLP(R) system published by Jaffar and Michaylov at ICLP 1987 β SICStus ships the reference implementation. CLP(R) handles linear equations and inequalities over floats, enabling use cases like financial optimisation, engineering calculations, and geometric constraint solving.
:- use_module(library(clpr)).
% Portfolio optimisation: allocate budget across assets
% Maximise expected return subject to risk constraint
optimise_portfolio(Weights, ExpectedReturn) :-
Weights = [W1, W2, W3],
% Budget constraint
{W1 + W2 + W3 =:= 1.0},
% Non-negativity
{W1 >= 0.0}, {W2 >= 0.0}, {W3 >= 0.0},
% Risk constraint: weighted variance <= 0.05
{0.02 * W1 + 0.08 * W2 + 0.04 * W3 =< 0.05},
% Expected return (objective, maximise)
{ExpectedReturn =:= 0.06 * W1 + 0.12 * W2 + 0.09 * W3},
% Maximise return using CLP(R) objective
maximize(ExpectedReturn).
CLP(B) (library(clpb)): constraints over Boolean variables using BDD (Binary Decision Diagram) representations. CLP(B) is particularly useful for circuit analysis, SAT-style problems, and combinatorial counting β the count/3 predicate computes the number of satisfying assignments via BDD size, which is useful for probabilistic reasoning.
Constraint Handling Rules (CHR)
SICStus ships library(chr) β an implementation of Constraint Handling Rules (Thom FrΓΌhwirth π©πͺ, University of Ulm π©πͺ, ICLP 1991). CHR rules define new constraint solvers using three rule types: simplification (replace constraints), propagation (add new constraints), and simpagation (remove some, keep others, add new). This allows developers to implement domain-specific constraint solvers in pure logic, without modifying the Prolog runtime.
:- use_module(library(chr)).
% Fibonacci via CHR memoisation β EU research application
:- chr_constraint fib/2.
fib(0, F) <=> F = 0.
fib(1, F) <=> F = 1.
fib(N, F) <=>
N > 1,
N1 is N - 1, N2 is N - 2,
fib(N1, F1), fib(N2, F2),
F is F1 + F2.
% | ?- fib(30, F).
% F = 832040
% More practically: a CHR-based unit propagation solver
:- chr_constraint lit/1, conflict/0.
% Unit propagation: if a literal is true, its negation is false
lit(X), lit(neg(X)) ==> conflict.
CHR in SICStus is used extensively in EU research on multi-agent systems, semantic web reasoning, and type inference β domains where the constraint solver structure changes dynamically based on problem input. Thom FrΓΌhwirth's group at Ulm collaborated closely with both SICS and ECRC Munich to develop CHR as a meta-constraint language, making SICStus one of the canonical reference implementations alongside ECLiPSe.
Industrial EU Usage
SICStus Prolog has underpinned EU industry for over three decades:
Ericsson πΈπͺ used SICStus Prolog for protocol processing and configuration management in AXE telephone exchanges β the system that powered a significant fraction of EU telecommunications infrastructure during the 1990s and 2000s. The experience contributed to Erlang's development (Joe Armstrong and Mike Williams at Ericsson also experimented with Prolog before creating Erlang), and SICStus CLP(FD) was used for resource allocation in telecom network management.
Crew scheduling and rostering: The CHIP (Constraint Handling in Prolog) project, carried out partly at ECRC Munich and partly in collaboration with French ILOG, used SICStus-compatible CLP(FD) implementations for airline crew rostering at Air France π«π· and tour operator scheduling. ILOG Solver (later IBM ILOG CP Optimizer) drew directly on these CLP(FD) semantics.
SNCF π«π· (French national railway): SICStus-based constraint programs were used for train driver assignment and timetable construction in EU rail operations. The crew rostering problem (assigning drivers to train services while respecting rest periods, qualification constraints, and collective agreement rules) is a textbook CLP(FD) application.
RISE Research Institutes πΈπͺ: The successor organisation to SICS, RISE is a Swedish state-funded applied research institute. SICStus Prolog is actively maintained by RISE with regular version releases (current: 4.9.x), a comprehensive manual, and commercial support contracts for EU companies requiring certified software tools.
EU Regulatory Compliance
GDPR Art. 25 (Privacy by Design): Prolog's declarative constraint model aligns naturally with GDPR data minimisation requirements. A SICStus CLP(FD) model expresses only the constraints that data must satisfy, without procedural side effects that could inadvertently process personal data. RISE Research Institutes πΈπͺ: Swedish law (PDPL, transposing GDPR) applies; no US Cloud Act jurisdiction.
EU AI Act Art. 9 (Risk Management) and Art. 13 (Transparency): CLP(FD) solutions are inherently explainable β the constraint store is a first-class object that can be inspected to understand why a scheduling decision was made. Unlike neural networks, SICStus produces machine-checkable proofs of constraint satisfaction. For high-risk AI systems under Annex III (workforce management, resource allocation), CLP-based scheduling satisfies Art. 9's requirement for documented risk management with auditable logic.
NIS2 Art. 21: SICStus is a Swedish-origin tool with no US parent company, no US infrastructure dependency, and no CLOUD Act exposure. For EU critical infrastructure operators (energy, transport, healthcare) using constraint-based planning, SICStus eliminates cross-border data transfer risk inherent in US-headquartered optimisation software.
EU Cyber Resilience Act 2027: SICStus's deterministic constraint solving β with CHR rules as auditable, formally verifiable rewrite systems β provides evidence of systematic verification that CRA Art. 13 requires for products with digital elements. CHR simplification rules with termination proofs satisfy CRA's cybersecurity-by-design requirement.
ISO 13211-1 (Prolog standard): SICStus is one of the most complete ISO Prolog implementations, making it suitable for DO-178C software qualification and IEC 61508 SIL 3/4 formal-methods paths where standard compliance is required.
Deploy SICStus Prolog to EU Infrastructure
SICStus Prolog requires a commercial licence from RISE for production use (academic licences are freely available). For containerised deployment, the standard approach packages the SICStus runtime with a compiled .ql (quickload) file of your application:
# Dockerfile β SICStus Prolog on EU Infrastructure
FROM debian:bookworm-slim
# Install SICStus runtime dependencies
RUN apt-get update && apt-get install -y \
libgmp10 \
libncurses6 \
&& rm -rf /var/lib/apt/lists/*
# Copy SICStus installation (from downloaded .run installer)
COPY sicstus4.9.0 /opt/sicstus
ENV PATH="/opt/sicstus/bin:$PATH"
WORKDIR /app
# Copy compiled quickload file and Prolog sources
COPY src/ ./src/
COPY scheduler.ql ./
# Verify CLP(FD) availability
RUN sicstus --goal "use_module(library(clpfd)), halt"
EXPOSE 8080
# Run SICStus application (e.g., HTTP server built with library(http))
CMD ["sicstus", "--goal", "use_module(library(http/http_server)), \
consult('src/app.pl'), start_server([port(8080)]), halt"]
# .github/workflows/deploy-eu.yml β Deploy to EU via sota.io
name: Deploy SICStus Prolog to EU
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SICStus container
run: docker build -t sicstus-app .
- name: Run CLP(FD) constraint tests
run: |
docker run --rm sicstus-app sicstus --goal \
"use_module(library(clpfd)), \
[tests/constraints], \
run_tests, halt"
- name: Deploy to EU (sota.io)
env:
SOTA_API_KEY: ${{ secrets.SOTA_API_KEY }}
run: |
curl -X POST https://api.sota.io/v1/deploy \
-H "Authorization: Bearer $SOTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "sicstus-app:latest",
"region": "eu-central-1",
"resources": {"memory": "512Mi", "cpu": "0.5"},
"env": {"PORT": "8080"}
}'
See Also
- Deploy ECLiPSe CLP to Europe β β ECRC Munich π©πͺ (ESPRIT 1988), the other canonical EU constraint logic programming system, with
icinterval arithmetic and CHR - Deploy Clingo/ASP to Europe β β University of Potsdam π©πͺ (2007), Answer Set Programming for scheduling and explainable AI
- Deploy Prolog to Europe β β ISO Prolog reference implementations and SWI-Prolog on EU infrastructure
- GDPR Article 25 Privacy by Design β β How EU-native infrastructure satisfies GDPR data protection by default
SICStus Prolog on sota.io: Deploy your constraint logic programming workloads to EU servers with managed PostgreSQL, zero DevOps, and GDPR-compliant infrastructure. Free tier available β no credit card required. RISE Research Institutes of Sweden πΈπͺ provides SICStus licences; sota.io provides the EU hosting.