Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordered signatures can not have "exactly 0" instances #143

Open
edmcman opened this issue Mar 19, 2021 · 3 comments
Open

Ordered signatures can not have "exactly 0" instances #143

edmcman opened this issue Mar 19, 2021 · 3 comments
Labels
food-for-thought Open problems
Milestone

Comments

@edmcman
Copy link

edmcman commented Mar 19, 2021

module Foo

// Uncommenting the following line results in no instance being found
open util/ordering[ZeroSig]

sig ZeroSig {}

// Sat
run {} for 3 but exactly 1 ZeroSig
// Unsat
run {} for 3 but exactly 0 ZeroSig

This is affecting me because I have an ordered Sig that I occasionally need to be empty (i.e., exactly 0).

@pkriens
Copy link
Contributor

pkriens commented Dec 23, 2021

@dnjackson could you comment?

@alcinocunha
Copy link

The ordering module uses directly the total order definition from Kodkod, which requires that at least one element exists: first and last are always defined. We could have a different implementation of the ordering module that allowed empty sigs, but then we could not rely directly on the Kodkod implementation, and we would loose on efficiency. Maybe we need to add a note to the documentation of the module clarifying that the scope must be at least 1.

@nmacedo nmacedo added the food-for-thought Open problems label Apr 11, 2023
@grayswandyr grayswandyr added this to the A6.2 milestone Apr 14, 2023
@grayswandyr
Copy link
Contributor

After discussion: just update the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
food-for-thought Open problems
Projects
None yet
Development

No branches or pull requests

5 participants