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

(Unnecessary use of cardinality): Upper-bound too large for given BitWidth #54

Open
tnelson opened this issue Dec 17, 2020 · 3 comments
Labels

Comments

@tnelson
Copy link
Owner

tnelson commented Dec 17, 2020

E.g.,

******************** testing ./forge-core/examples/booleanLogic.rkt
uncaught exception: "Upper bound too large for given BitWidth; Sig: #(struct:Sig Formula (relation 1 "Formula" (Formula) univ) #f #t #f (Var Not And Or)), Upper-bound: 8, Max-int: 7"

Right now we're always encoding bounds numerically, even when we don't have to.

@tnelson
Copy link
Owner Author

tnelson commented Feb 15, 2024

Note that Alloy encodes such bounds using some disj ... rather than counting.

@tnelson tnelson added bounds and removed SHALL:21 labels Mar 24, 2024
@tnelson
Copy link
Owner Author

tnelson commented Oct 23, 2024

@k-mouline As I review our older issues, I'm wondering: is this causing any trouble for our theory-of-relations translation? Sometimes Forge will produce a cardinality constraint on the size of a sig. Alloy does something smarter: it produces a some disj atom0, atom1, ... constraint that has the same effect.

@tnelson
Copy link
Owner Author

tnelson commented Oct 28, 2024

This doesn't seem to be a performance gain in general -- negating the above is slow. Worth looking again into what Alloy does, as they are surely not doing something as inefficient as what I just tried.

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

No branches or pull requests

2 participants