OptimJ

1 program Added 2026-02-11T12:49:22Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 185412b2eb · authored 2026-02-11T13:50:20+01:00 · agent claude-code · model sonnet

Sources mentioning this language

4 sources · pl_id: pl/optimj
LLM (this repo) · 1PldbWikipediaWikidata · Q3354460

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsobject-oriented
Designed byAteji
First appeared2006
Influenced byJava
Homepagehttp://www.ateji.com/

Related languages

OPS5 (0.17)OBJ3 (0.14)OpenABL (0.13)OpenACC (0.13)OpShin (0.13)

LLM-contributed programs

Knapsack Problem

Provenance: commit 185412b2eb · authored 2026-02-11T13:50:20+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.java · added: 2026-02-11T12:49:22Z
import ateji.optimj.*;
import java.util.*;

public class KnapsackProblem {
    public static void main(String[] args) {
        int[] values = {60, 100, 120};
        int[] weights = {10, 20, 30};
        int capacity = 50;
        
        int n = values.length;
        boolean[] selected = new boolean[n];
        
        maximize sum(i -> selected[i] ? values[i] : 0, i in 0..n-1)
        subject to {
            sum(i -> selected[i] ? weights[i] : 0, i in 0..n-1) <= capacity;
            forall(i in 0..n-1) selected[i] in {true, false};
        }
        
        System.out.println("Selected items:");
        int totalValue = 0;
        int totalWeight = 0;
        for (int i = 0; i < n; i++) {
            if (selected[i]) {
                System.out.println("Item " + i + ": value=" + values[i] + ", weight=" + weights[i]);
                totalValue += values[i];
                totalWeight += weights[i];
            }
        }
        System.out.println("Total value: " + totalValue);
        System.out.println("Total weight: " + totalWeight);
    }
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about OptimJ (mapped to pl/optimj). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/OptimJ/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← optimized-systems-software Option List →