Skip to content

Speed up full_analysis by using implication relations between properties #96

Description

@DominikPeters

The package offers the function abcvoting.properties.full_analysis(profile, committee) with the following description:

Test all implemented properties for the given committee.

Returns a dictionary with the following keys: “pareto”, “jr”, “pjr”, “ejr”, “ejr+”, “fjr”, “priceability”, “stable-priceability” and “core”. The values are True or False, depending on whether this property is satisfied.

https://abcvoting.readthedocs.io/en/latest/properties.html#abcvoting.properties.full_analysis

This function could be sped up by using logical implications between the axioms. For example, begin by checking EJR+. If yes, then no need to check jr/pjr/ejr. Then check JR. If no, then no need to check pjr/ejr/ejr+/fjr/core.

Such implications are already placed in the tests:

logical_implications = [
(is_stable_priceable, is_priceable),
(is_stable_priceable, brute_force_core),
(brute_force_core, brute_force_FJR),
(brute_force_FJR, brute_force_EJR),
(is_priceable, brute_force_PJR),
(brute_force_EJR, brute_force_PJR),
(brute_force_PJR, is_JR),
(is_EJR_plus, brute_force_EJR),
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions