jacopy.proof.strategies.PortfolioStrategy

class jacopy.proof.strategies.PortfolioStrategy(strategies)

Bases: Strategy

Try a sequence of strategies; the first that closes wins.

The mechanized form of the symbolic-p policy (“try the operator-level route first, fall back to unrolling”): each member strategy gets a chance in order, and only when all of them fail does the portfolio raise — with a combined message naming every member’s failure so the caller sees the whole picture, and carrying the last member’s diagnostic report.

__init__(strategies)
Return type:

None

Methods

__init__(strategies)

prove(lhs, rhs, *[, registry, engine])

Produce a ProofChain witnessing lhs == rhs.

Attributes

name

strategies

prove(lhs, rhs, *, registry=None, engine=None)

Produce a ProofChain witnessing lhs == rhs.

Raises ProofFailure if the strategy cannot close the gap. Implementations may ignore either registry or engine depending on how they work.

Parameters:
Return type:

ProofChain