
Hi, I'm Petra, a human-focused (not AI)
formal programming method and linter that reduces risk in critical business and cyber development projects. Its time to switch on.
public final class Light {
private final Power power = new Power();
private final Control control = new Control(); @Initial
public boolean off() { return power.off() || control.off(); }
public boolean on() { return power.on() && control.on(); } public void toggle() {
if (off()){
sep(()->{power.turnOn();},()->{control.turnOn();});
assert(on());
} else if (on()){
sep(()->{power.turnOff();},()->{control.turnOff();});
assert(off());
}
}
}
We offer Petra tools, training, and consulting services to your technology team and partners.
Petra has been developed at Cognition Box Limited, London, UK.