S++Core systems, human-reviewable
ENGLISH EDITION · OCTOBER 15, 2026
ContentsComplete book

Chapter 22 — Generation, Physical Resources and Runtime Configuration

© 2026 S++ project contributors. All rights reserved. Book copyright.

Declarative models must become executable code, interfaces, repositories and resource access. Generation performs this conversion and checks model-implementation contracts. Reading output reveals declarations' effects.

From Models to Runtime Artifacts

The compiler combines models, calls, role relationships and transaction boundaries with APP/PHY to generate Java models, services, mappings, OpenAPI, DDL and runtime catalogs. Chapter 12 explains the review benefits of deterministic generation.

Maintain rules in source directories and configuration, not generated Java in target: direct edits may be overwritten by the next build.

Generation and Startup Checks

Generation detects undefined facts, ambiguous binding, illegal calls, unsupported propagation and contradictory resources. Startup checks actual override parameters, environments, identities, provider contracts and readiness.

Resolution does not depend on file names. All domains are validated before any is generated, and APP files are compiled in two passes (tables first), so a provider may sort before or after its consumers, two domains may play each other's roles, and one domain's tables and scope may be split over several APP files. A table or service declared twice is reported with both declaring files.

Static checks do not prove current remote settlement capability, and startup does not replace concurrency or fault tests. Each supplies different evidence.

Build and Local Demonstration

Run at repository root with the documented JDK 25, Maven and dependencies:

mvn -pl :petstore-demo -am package -DskipTests -Dspp.environment=develop
SPP_PETSTORE_JDBC_URL='jdbc:h2:file:/tmp/spp-book-petstore' \
  ./demos/petstore/run-demo.sh web

The web demo defaults to 8086. This uses an independent experimental database; reusing the path retains old data. Appendix E provides variables and multiprocess commands.

Interface Declarations in APP and PHY

Interface technology never appears in SPP. A scenario is business behavior; its HTTP method, path, query parameters, wire names and the HTTP status of a business rejection are deployment choices declared in APP:

@parameter(path="{id}/Deposit/Initiate", method="POST")
@payload(request  = "order.facilityId=path.id, order.amount=body.Deposit.Amount",
         response = "Reference=deposit.depositId, Deposit.Amount=deposit.amount")
{ initiateDeposit; }

@rejectionStatus(FACILITY_NOT_FOUND="404", FACILITY_NOT_ACTIVE="409", fallback="400") { }

@parameter selects the method (GET, POST, PUT, PATCH or DELETE; PUT without it), @payload maps path, query and body names to participant fields and back, and @rejectionStatus maps the rejection codes of a domain to statuses, with technical failures always 500. Names are checked at compile time. The generated OpenAPI carries the declared methods, query parameters and statuses, and a runtime dispatcher serves them. For the other direction, a PHY remote declaration with adapter openApiClient calls another REST service while the remote atomic stays unchanged in SPP and APP; business outcomes such as an absent party are mapped from status codes. Money travels as a plain decimal with its scale preserved (120.00 stays 120.00) in requests, responses and path or query values.

Numbers and Resources

PHY selects representation and capacity; APP organizes technical mappings. SPP specifies rounding; inexact unsupported conversion must fail rather than silently alter meaning.

develop and testing can use different deployments and plans for one scenario. Compare selected environment, generated catalog and startup arguments rather than using artifacts from one to prove another.

Verify That Declarations Are Honored

A successful build establishes source-generation checks, not actual business completion. Execute scenarios and verify results. The later Petstore practice follows requirements through fund and stock movement to show the architecture as a complete system.


Part Contents · Full Book Contents · Previous Chapter · Next Chapter