Proposed and developed is the language Service Composition (SC) CoJava, which extends the programming language Java with (1) a modular service composition framework; (2) an extensible library of supply-chain modeling components such as items, services and business metrics; and (3) decision choice constructs for program variables, assertions of constraints and a designation of a program variable to serve as the objective to be minimized or maximized. The SC-CoJava provides not only the procedural “simulation-like” semantics of Java, but also an optimization semantics. The optimization semantics of SC-CoJava amounts to (1) finding an optimal instantiation of values into the choice-variables, based on automatic construction of a standard optimization model and solving it using a mathematical programming solver, and then (2) executing the Java program procedurally, where all the decision choice values are taken from the optimization result.