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

Integrating types 8: using new types in the checker core #668

Merged
merged 42 commits into from
Mar 23, 2021

Conversation

konnov
Copy link
Collaborator

@konnov konnov commented Mar 22, 2021

This is the final piece of the puzzle. The translation rules to SMT are now using TlaType1 as input as well. Unfortunately, I don't know yet, whether we can get rid of the intermediate type CellT that is used in the rewriting process. So you will see that in some cases TlaType1 is translated to CellT and back. The reason is that CellT is slightly reacher than TlaType1. For instance, CellT has power sets and infinite sets, whereas TlaType1 has just sets.

I did not anticipate that several rewriting rules had to be changed. The reason is that we now infer types from top to the bottom, instead of bottom to the top. As a result, sets can now contain records that have different (though compatible) record types. In the old implementation, all records were immediately normalized to the most general type by padding them with extra fields. We cannot do it any longer, so translation of several operators on records became more nuanced.

As with previous PRs on this feature, we should check that no stupid bugs were introduced and open issues on the follow-up design improvements and refactoring. This has been too many changes for one feature. Once the review is done, we should merge this feature, cut a new release, clearly mark it as unstable and improve in the next month (or two ;-)).

Since the changes have been touching large portions of the codebase, I would prefer bumping the version by several increments, like 0.15.0, so the users would clearly see that it is not just one more release, but something much more different.

  • Tests added for any new code
  • Ran make fmt-fix (or had formatting run automatically on all files edited)
  • Documentation added for any new functionality
  • Entry added to UNRELEASED.md for any new functionality

konnov and others added 30 commits March 20, 2021 14:28
@konnov konnov changed the base branch from unstable to igor/with-snowcat7 March 22, 2021 08:03
@konnov konnov mentioned this pull request Mar 22, 2021
16 tasks
Copy link
Contributor

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I gave this a very cursory view, as discussed in meeting, the context of these PRs and the time pressured don't allow for proper reviews, so no guarantees on my signoff ;)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon
@konnov konnov merged commit 26686de into igor/with-snowcat7 Mar 23, 2021
@konnov konnov deleted the igor/with-snowcat8 branch March 23, 2021 19:25
konnov added a commit that referenced this pull request Mar 23, 2021
* a temporary fix for the old type annotations

* a fix for lazy annotations of nullary operators

* fix SymbTransGenerator

* fixed plenty of integration tests

* fixed a bug in ITE, found by Jure

* made the TLC config parser type-aware

* add type annotations to the tests

* made VCGenerator type-aware

* moved TlaType1, TypedPredefs, and TypingException to lir, to break cyclic dependencies

* fixing types in TestConstAndDefRewriter

* made TlcConfigImporter type-aware

* fixed TestTlcConfigImporter

* removed the reference to lir.

* Integrating types 8: using new types in the checker core (#668)

* migrated rewriting rules to use the types inferred by snowcat

* forbid the old type annotations

* fixed FunExcept

* the error about old type annotations is qualified as a normal user error

* fixed: set constructor, map, and in

* fix the CHOOSE rule

* removed the old type annotations, as they are no longer supported

* Mad TestSymbStateRewriterBool, AndRule, and OrRule type-aware

* made TestSymbStateRewriterInt typed

* fixed all but one tests in TestSymbStateRewriterAssignment

* remove the tests that are labelled as ignore

* fix a funny bug in caching expressions

* fix arena corruption in PowSetCtorRule

* fix a bug in Builder: produced Int instead of Nat

* equality throws when incomparable types are met

* fixed an error message for infinite sets

* made tests in TestSymbStateRewriterSet type-aware

* eliminated the old TrivialTypeFinder and ModelChecker, no need to maintain them

* fix a bug in FunExceptRule

* fix TestSymbStateRewriterFun

* fix TestSymbStateRewriterStr and TestSymbStateRewriterTuple

* fix TestSymbStateRewriterRecord and a bug in EXCEPT

* fix TestCherryPick

* remove the unit test that is covered by TestKeramelizer

* fix TestSymbStateRewriterChoose

* fix TestSymbStateRewriterControl

* fix TestSymbStateRewriterExpand

* fix TestSymbStateRewriterFiniteSets

* TestSymbStateRewriterFunSet

* fix TestSymbStateRewriterRecFun

* fix TestSymbStateRewriterSequence

* fix TestSeqModelChecker

* fix TestSymbStateDecoder

* fix TestSymbStateRewriterTlc

* old annotations are expected to throw an error now

* fix TestSymbStateRewriterPowerset

* fixed cherry picking of records that have compatible but different domains

* fixed type annotations in SimpT1

* fix cherry-picking of records that was broken in Paxos

* removed --with-snowcat from CLI

* changelog

* Integrating types 9: a few bugfixes (#671)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon
konnov added a commit that referenced this pull request Mar 23, 2021
* add a watchdog listener

* close #647: Desugarer preprocesses the general case of EXCEPT

* unrelease notes

* type-aware test for Desugarer

* made Desugarer type-aware!

* fixed a type bug that was found by the type watchdog

* propagating types in AssignmentOperatorIntroduction

* made SkolemizationMarker type-aware

* made ExpansionMarker type-aware

* fixed TestSymbTransGenerator

* moved the integration tests to test/tla

* removed the Paxos tests, which is already in the integration tests

* enabled snowcat by default, as the preprocessing is type-aware

* Integrating types 7: victory over enthropy (#663)

* a temporary fix for the old type annotations

* a fix for lazy annotations of nullary operators

* fix SymbTransGenerator

* fixed plenty of integration tests

* fixed a bug in ITE, found by Jure

* made the TLC config parser type-aware

* add type annotations to the tests

* made VCGenerator type-aware

* moved TlaType1, TypedPredefs, and TypingException to lir, to break cyclic dependencies

* fixing types in TestConstAndDefRewriter

* made TlcConfigImporter type-aware

* fixed TestTlcConfigImporter

* removed the reference to lir.

* Integrating types 8: using new types in the checker core (#668)

* migrated rewriting rules to use the types inferred by snowcat

* forbid the old type annotations

* fixed FunExcept

* the error about old type annotations is qualified as a normal user error

* fixed: set constructor, map, and in

* fix the CHOOSE rule

* removed the old type annotations, as they are no longer supported

* Mad TestSymbStateRewriterBool, AndRule, and OrRule type-aware

* made TestSymbStateRewriterInt typed

* fixed all but one tests in TestSymbStateRewriterAssignment

* remove the tests that are labelled as ignore

* fix a funny bug in caching expressions

* fix arena corruption in PowSetCtorRule

* fix a bug in Builder: produced Int instead of Nat

* equality throws when incomparable types are met

* fixed an error message for infinite sets

* made tests in TestSymbStateRewriterSet type-aware

* eliminated the old TrivialTypeFinder and ModelChecker, no need to maintain them

* fix a bug in FunExceptRule

* fix TestSymbStateRewriterFun

* fix TestSymbStateRewriterStr and TestSymbStateRewriterTuple

* fix TestSymbStateRewriterRecord and a bug in EXCEPT

* fix TestCherryPick

* remove the unit test that is covered by TestKeramelizer

* fix TestSymbStateRewriterChoose

* fix TestSymbStateRewriterControl

* fix TestSymbStateRewriterExpand

* fix TestSymbStateRewriterFiniteSets

* TestSymbStateRewriterFunSet

* fix TestSymbStateRewriterRecFun

* fix TestSymbStateRewriterSequence

* fix TestSeqModelChecker

* fix TestSymbStateDecoder

* fix TestSymbStateRewriterTlc

* old annotations are expected to throw an error now

* fix TestSymbStateRewriterPowerset

* fixed cherry picking of records that have compatible but different domains

* fixed type annotations in SimpT1

* fix cherry-picking of records that was broken in Paxos

* removed --with-snowcat from CLI

* changelog

* Integrating types 9: a few bugfixes (#671)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon
konnov added a commit that referenced this pull request Mar 23, 2021
…type-aware (#657)

* bugfix: translating labels

* fixing types in Unroller and Inliner

* moved and rewrote TestInlinerofUserOper, made it type-aware

* made TestUnroller type-aware

* made ParameterNormalizer type-aware

* made TestUnroller and Unroller type-aware

* running the type checker right after the parser

* a reference to the closed issue

* Integrating types 6: made Desugarer type aware (#658)

* add a watchdog listener

* close #647: Desugarer preprocesses the general case of EXCEPT

* unrelease notes

* type-aware test for Desugarer

* made Desugarer type-aware!

* fixed a type bug that was found by the type watchdog

* propagating types in AssignmentOperatorIntroduction

* made SkolemizationMarker type-aware

* made ExpansionMarker type-aware

* fixed TestSymbTransGenerator

* moved the integration tests to test/tla

* removed the Paxos tests, which is already in the integration tests

* enabled snowcat by default, as the preprocessing is type-aware

* Integrating types 7: victory over enthropy (#663)

* a temporary fix for the old type annotations

* a fix for lazy annotations of nullary operators

* fix SymbTransGenerator

* fixed plenty of integration tests

* fixed a bug in ITE, found by Jure

* made the TLC config parser type-aware

* add type annotations to the tests

* made VCGenerator type-aware

* moved TlaType1, TypedPredefs, and TypingException to lir, to break cyclic dependencies

* fixing types in TestConstAndDefRewriter

* made TlcConfigImporter type-aware

* fixed TestTlcConfigImporter

* removed the reference to lir.

* Integrating types 8: using new types in the checker core (#668)

* migrated rewriting rules to use the types inferred by snowcat

* forbid the old type annotations

* fixed FunExcept

* the error about old type annotations is qualified as a normal user error

* fixed: set constructor, map, and in

* fix the CHOOSE rule

* removed the old type annotations, as they are no longer supported

* Mad TestSymbStateRewriterBool, AndRule, and OrRule type-aware

* made TestSymbStateRewriterInt typed

* fixed all but one tests in TestSymbStateRewriterAssignment

* remove the tests that are labelled as ignore

* fix a funny bug in caching expressions

* fix arena corruption in PowSetCtorRule

* fix a bug in Builder: produced Int instead of Nat

* equality throws when incomparable types are met

* fixed an error message for infinite sets

* made tests in TestSymbStateRewriterSet type-aware

* eliminated the old TrivialTypeFinder and ModelChecker, no need to maintain them

* fix a bug in FunExceptRule

* fix TestSymbStateRewriterFun

* fix TestSymbStateRewriterStr and TestSymbStateRewriterTuple

* fix TestSymbStateRewriterRecord and a bug in EXCEPT

* fix TestCherryPick

* remove the unit test that is covered by TestKeramelizer

* fix TestSymbStateRewriterChoose

* fix TestSymbStateRewriterControl

* fix TestSymbStateRewriterExpand

* fix TestSymbStateRewriterFiniteSets

* TestSymbStateRewriterFunSet

* fix TestSymbStateRewriterRecFun

* fix TestSymbStateRewriterSequence

* fix TestSeqModelChecker

* fix TestSymbStateDecoder

* fix TestSymbStateRewriterTlc

* old annotations are expected to throw an error now

* fix TestSymbStateRewriterPowerset

* fixed cherry picking of records that have compatible but different domains

* fixed type annotations in SimpT1

* fix cherry-picking of records that was broken in Paxos

* removed --with-snowcat from CLI

* changelog

* Integrating types 9: a few bugfixes (#671)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon
konnov added a commit that referenced this pull request Mar 24, 2021
* annotated all tests and fixed some

* Integrating types 5: made Inliner, Unroller, and ParameterNormalizer type-aware (#657)

* bugfix: translating labels

* fixing types in Unroller and Inliner

* moved and rewrote TestInlinerofUserOper, made it type-aware

* made TestUnroller type-aware

* made ParameterNormalizer type-aware

* made TestUnroller and Unroller type-aware

* running the type checker right after the parser

* a reference to the closed issue

* Integrating types 6: made Desugarer type aware (#658)

* add a watchdog listener

* close #647: Desugarer preprocesses the general case of EXCEPT

* unrelease notes

* type-aware test for Desugarer

* made Desugarer type-aware!

* fixed a type bug that was found by the type watchdog

* propagating types in AssignmentOperatorIntroduction

* made SkolemizationMarker type-aware

* made ExpansionMarker type-aware

* fixed TestSymbTransGenerator

* moved the integration tests to test/tla

* removed the Paxos tests, which is already in the integration tests

* enabled snowcat by default, as the preprocessing is type-aware

* Integrating types 7: victory over enthropy (#663)

* a temporary fix for the old type annotations

* a fix for lazy annotations of nullary operators

* fix SymbTransGenerator

* fixed plenty of integration tests

* fixed a bug in ITE, found by Jure

* made the TLC config parser type-aware

* add type annotations to the tests

* made VCGenerator type-aware

* moved TlaType1, TypedPredefs, and TypingException to lir, to break cyclic dependencies

* fixing types in TestConstAndDefRewriter

* made TlcConfigImporter type-aware

* fixed TestTlcConfigImporter

* removed the reference to lir.

* Integrating types 8: using new types in the checker core (#668)

* migrated rewriting rules to use the types inferred by snowcat

* forbid the old type annotations

* fixed FunExcept

* the error about old type annotations is qualified as a normal user error

* fixed: set constructor, map, and in

* fix the CHOOSE rule

* removed the old type annotations, as they are no longer supported

* Mad TestSymbStateRewriterBool, AndRule, and OrRule type-aware

* made TestSymbStateRewriterInt typed

* fixed all but one tests in TestSymbStateRewriterAssignment

* remove the tests that are labelled as ignore

* fix a funny bug in caching expressions

* fix arena corruption in PowSetCtorRule

* fix a bug in Builder: produced Int instead of Nat

* equality throws when incomparable types are met

* fixed an error message for infinite sets

* made tests in TestSymbStateRewriterSet type-aware

* eliminated the old TrivialTypeFinder and ModelChecker, no need to maintain them

* fix a bug in FunExceptRule

* fix TestSymbStateRewriterFun

* fix TestSymbStateRewriterStr and TestSymbStateRewriterTuple

* fix TestSymbStateRewriterRecord and a bug in EXCEPT

* fix TestCherryPick

* remove the unit test that is covered by TestKeramelizer

* fix TestSymbStateRewriterChoose

* fix TestSymbStateRewriterControl

* fix TestSymbStateRewriterExpand

* fix TestSymbStateRewriterFiniteSets

* TestSymbStateRewriterFunSet

* fix TestSymbStateRewriterRecFun

* fix TestSymbStateRewriterSequence

* fix TestSeqModelChecker

* fix TestSymbStateDecoder

* fix TestSymbStateRewriterTlc

* old annotations are expected to throw an error now

* fix TestSymbStateRewriterPowerset

* fixed cherry picking of records that have compatible but different domains

* fixed type annotations in SimpT1

* fix cherry-picking of records that was broken in Paxos

* removed --with-snowcat from CLI

* changelog

* Integrating types 9: a few bugfixes (#671)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon

* fixed the accidental bug introduced in refactoring
konnov added a commit that referenced this pull request Mar 24, 2021
…es type-aware (#650)

* made Normalizer type-aware

* Refactored Builder, introduced UntypedPredefs and TypedPredefs, removed several implicits

* fix TestReplaceFixed

* fix TestChangeListener

* fix TestLetInExpander

* fix TestIncrementalRenaming

* fix TestBuilder

* fix TestSourceStore

* fix TestSanyImporter

* fix Keramelizer and TestKeramelizer

* fix TestDesugarer

* fix TestExprOptimizer

* fix TestOperAppToLetInDef

* fix TestUnroller

* fix TestAssignmentStrategyEncoder

* fix TestSmtFreeSTE

* fix TestSymbTransGenerator

* fix TestRewriterKeraSet

* fix TestExpansionMarker

* fix TestSkolemizationMarker

* fix TestSparseOracle

* fix oracles

* fix more tests

* fix AbstractTestTransitionExecutorImpl

* fox TestSymbStateRewriterSequence

* fix TestSymbStateRewriterInt

* a quick test for Normalizer and a bug fix in Normalizer

* fixed the copy-pasted test

* fix formatting

* fixed after comments by Jure

* changed two expressions to the IR form, for consistency

* addressed the comments by Shon

* Integrating types 4: migrated tests to Snowcat (#652)

* annotated all tests and fixed some

* Integrating types 5: made Inliner, Unroller, and ParameterNormalizer type-aware (#657)

* bugfix: translating labels

* fixing types in Unroller and Inliner

* moved and rewrote TestInlinerofUserOper, made it type-aware

* made TestUnroller type-aware

* made ParameterNormalizer type-aware

* made TestUnroller and Unroller type-aware

* running the type checker right after the parser

* a reference to the closed issue

* Integrating types 6: made Desugarer type aware (#658)

* add a watchdog listener

* close #647: Desugarer preprocesses the general case of EXCEPT

* unrelease notes

* type-aware test for Desugarer

* made Desugarer type-aware!

* fixed a type bug that was found by the type watchdog

* propagating types in AssignmentOperatorIntroduction

* made SkolemizationMarker type-aware

* made ExpansionMarker type-aware

* fixed TestSymbTransGenerator

* moved the integration tests to test/tla

* removed the Paxos tests, which is already in the integration tests

* enabled snowcat by default, as the preprocessing is type-aware

* Integrating types 7: victory over enthropy (#663)

* a temporary fix for the old type annotations

* a fix for lazy annotations of nullary operators

* fix SymbTransGenerator

* fixed plenty of integration tests

* fixed a bug in ITE, found by Jure

* made the TLC config parser type-aware

* add type annotations to the tests

* made VCGenerator type-aware

* moved TlaType1, TypedPredefs, and TypingException to lir, to break cyclic dependencies

* fixing types in TestConstAndDefRewriter

* made TlcConfigImporter type-aware

* fixed TestTlcConfigImporter

* removed the reference to lir.

* Integrating types 8: using new types in the checker core (#668)

* migrated rewriting rules to use the types inferred by snowcat

* forbid the old type annotations

* fixed FunExcept

* the error about old type annotations is qualified as a normal user error

* fixed: set constructor, map, and in

* fix the CHOOSE rule

* removed the old type annotations, as they are no longer supported

* Mad TestSymbStateRewriterBool, AndRule, and OrRule type-aware

* made TestSymbStateRewriterInt typed

* fixed all but one tests in TestSymbStateRewriterAssignment

* remove the tests that are labelled as ignore

* fix a funny bug in caching expressions

* fix arena corruption in PowSetCtorRule

* fix a bug in Builder: produced Int instead of Nat

* equality throws when incomparable types are met

* fixed an error message for infinite sets

* made tests in TestSymbStateRewriterSet type-aware

* eliminated the old TrivialTypeFinder and ModelChecker, no need to maintain them

* fix a bug in FunExceptRule

* fix TestSymbStateRewriterFun

* fix TestSymbStateRewriterStr and TestSymbStateRewriterTuple

* fix TestSymbStateRewriterRecord and a bug in EXCEPT

* fix TestCherryPick

* remove the unit test that is covered by TestKeramelizer

* fix TestSymbStateRewriterChoose

* fix TestSymbStateRewriterControl

* fix TestSymbStateRewriterExpand

* fix TestSymbStateRewriterFiniteSets

* TestSymbStateRewriterFunSet

* fix TestSymbStateRewriterRecFun

* fix TestSymbStateRewriterSequence

* fix TestSeqModelChecker

* fix TestSymbStateDecoder

* fix TestSymbStateRewriterTlc

* old annotations are expected to throw an error now

* fix TestSymbStateRewriterPowerset

* fixed cherry picking of records that have compatible but different domains

* fixed type annotations in SimpT1

* fix cherry-picking of records that was broken in Paxos

* removed --with-snowcat from CLI

* changelog

* Integrating types 9: a few bugfixes (#671)

* a better error message

* fix the structure of EXCEPT expressions + add support for sequences

* fixed the comment by Shon

* fixed the accidental bug introduced in refactoring
This was referenced Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants