Comments (6)
Debug log: So far, I've discovered that
UNION { [d -> r] : d \in {{0}} }
finds a "counterexample",
Funs(part_dom, r) == UNION { [{0} -> r] }
triggers the rewriter error, but
Funs(part_dom, r) == [{0} -> r]
does not, even though they are all semantically equivalent. This is definitely some sort of bug. Investigating further.
from apalache.
Found the following (potentially related) issue:
When trying to evaluate
Inv == [{0} -> {1}] = UNION { [d -> {1}] : d \in {{0}} }
Apalache reports
...
PASS #13: BoundedChecker I@16:12:47.639
State 0: Checking 1 state invariants I@16:12:48.574
<unknown>: checker error: Unexpected equality test over types FinFunSet[CellTFrom(Set(Int)), CellTFrom(Set(Int))] and CellTFrom(Set((Int -> Int))) E@16:12:48.608
at.forsyte.apalache.infra.AdaptedException: <unknown>: checker error: Unexpected equality test over types FinFunSet[CellTFrom(Set(Int)), CellTFrom(Set(Int))] and CellTFrom(Set((Int -> Int)))
at at.forsyte.apalache.infra.passes.PassChainExecutor$.run(PassChainExecutor.scala:39)
...
from apalache.
Rewriting the above as X = Y \iff \A x \in X: x \in Y /\ \A x \in Y: x \in X
, we see that Apalache finds a violation of
Inv ==
LET X == [{0} -> {1}]
Y == UNION { [d -> {1}] : d \in {{0}} }
IN
/\ \A f \in X: f \in Y
/\ \A f \in Y: f \in X
Which is 100% inceorrect
from apalache.
Interestingly, Apalache agrees that Y \subseteq X
, but not X \subseteq Y
. Hypothesis: \A f \in Y
is treated as the empty forall.
from apalache.
Got it down to a minimal problematic input:
---- MODULE test ----
EXTENDS Integers, Apalache
Inv == [x \in {0} |-> 1] \in UNION { [d -> {1}] : d \in {{0}} }
Init == TRUE
Next == TRUE
====
The fundamental issue, is that { [d -> {1}] : d \in {{0}} }
creates symbolic function sets (Which Apalache does not handle, unless they're being selected from, or quantified over). These sets' contents are unconstrained cells.
Inv == \A S \in { [d -> {1}] : d \in {{0}} }: \A f \in S: f[0] = 1
does not trigger the incorrect violation, so it's likely that UNION
is a key contributor to this bug.
from apalache.
Note that #2778 closes this issue, but the original input should still fail with an error instead of producing bogus CEs.
from apalache.
Related Issues (20)
- Unexpected exception HOT 2
- Document Apalache config format + options
- A set filter over PowSet[FinSet[Int]] is not implemented
- Add warning for misplaced occurrence of `oneOf` when parsing from quint
- Raise error when an unexpanded type constant is found in quint IR output
- `parse` command adds superfluous `EXTENDS` statement HOT 2
- Use `parse` to format modules. HOT 2
- Unhandled Exception (java.util.NoSuchElementException: None.get) on empty file input HOT 4
- Crash with `funArrays` encoding HOT 2
- Typechecking crashes with `IllegalArgumentException: Unsupported expression` on unbounded quantification (e.g., `\A x: P`). HOT 8
- Operator overriding in annotations
- Include constant value assignments in ITF
- Allow specifying types in separate files
- Name clash leads to operator being incorrectly marked as recursive HOT 3
- Extend the server to be able to reply with formatted TLA+ generated from the IR HOT 1
- Pretty printing the apalache IR into TLA+ does not sanitize identifiers
- Assignments in quint `init` operators need to be unprimed HOT 2
- TLA+ pretty printer produces `[]` on empty tuples, which is invalid syntax
- Add support for Quint's `allListsUpTo`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apalache.