Skip to content

Further work on typestate_check #336

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

Closed
wants to merge 1 commit into from

Conversation

catamorphism
Copy link
Contributor

Lots of work on typestate_check, seems to get a lot of the way
through checking the standard library.

  • Added for, for_each, assign_op, bind, cast, put, check, break,
    and cont. (I'm not sure break and cont are actually handled correctly.)
  • Fixed side-effect bug in seq_preconds so that unioning the
    preconditions of a sequence of statements or expressions
    is handled correctly.
  • Pass poststate correctly through a stmt_decl.
  • Handle expr_ret and expr_fail properly (after execution of a ret
    or fail, everything is true -- this is needed to handle ifs and alts
    where one branch is a ret or fail)
  • Fixed bug in set_prestate_ann where a thing that needed to be
    mutated wasn't getting passed as an alias
  • Fixed bug in how expr_alt was treated (zero is not the identity
    for intersect, who knew, right?)
  • Update logging to reflect log_err vs. log
  • Fixed find_locals so as to return all local decls and exclude
    function arguments.
  • Make union_postconds work on an empty vector (needed to handle
    empty blocks correctly)
  • Added _vec.cat_options, which takes a list of option[T] to a list
    of T, ignoring any Nones
  • Added two test cases.

Lots of work on typestate_check, seems to get a lot of the way
through checking the standard library.

* Added for, for_each, assign_op, bind, cast, put, check, break,
and cont. (I'm not sure break and cont are actually handled correctly.)

* Fixed side-effect bug in seq_preconds so that unioning the
preconditions of a sequence of statements or expressions
is handled correctly.

* Pass poststate correctly through a stmt_decl.

* Handle expr_ret and expr_fail properly (after execution of a ret
or fail, everything is true -- this is needed to handle ifs and alts
where one branch is a ret or fail)

* Fixed bug in set_prestate_ann where a thing that needed to be
mutated wasn't getting passed as an alias

* Fixed bug in how expr_alt was treated (zero is not the identity
for intersect, who knew, right?)

* Update logging to reflect log_err vs. log

* Fixed find_locals so as to return all local decls and exclude
function arguments.

* Make union_postconds work on an empty vector (needed to handle
empty blocks correctly)

* Added _vec.cat_options, which takes a list of option[T] to a list
of T, ignoring any Nones

* Added two test cases.
oli-obk pushed a commit to oli-obk/rust that referenced this pull request Sep 19, 2017
Valiation: Identify write locks using an abstract lvalue
dlrobertson pushed a commit to dlrobertson/rust that referenced this pull request Nov 29, 2018
workingjubilee pushed a commit to workingjubilee/rustc that referenced this pull request May 10, 2023
Skip building wasm-bindgen-test on non-wasm targets
carolynzech pushed a commit to carolynzech/rust that referenced this pull request May 7, 2025
This is an automated PR to merge library subtree updates from 2025-04-07
(rust-lang/rust@2fa8b11) to 2025-04-21
(rust-lang/rust@b8c54d6) (inclusive)
into main. `git merge` resulted in conflicts, which require manual
resolution. Files were commited with merge conflict markers. **Do not
remove or edit the following annotations:**
git-subtree-dir: library
git-subtree-split: 2ab28f3

---------

Signed-off-by: xizheyin <[email protected]>
Signed-off-by: Petros Angelatos <[email protected]>
Signed-off-by: Huang Qi <[email protected]>
Signed-off-by: Ayush Singh <[email protected]>
Signed-off-by: Alice Ryhl <[email protected]>
Co-authored-by: Ralf Jung <[email protected]>
Co-authored-by: Chris Denton <[email protected]>
Co-authored-by: Matthias Krüger <[email protected]>
Co-authored-by: DaniPopes <[email protected]>
Co-authored-by: bors <[email protected]>
Co-authored-by: Jacob Pratt <[email protected]>
Co-authored-by: beetrees <[email protected]>
Co-authored-by: Thalia Archibald <[email protected]>
Co-authored-by: Mads Marquart <[email protected]>
Co-authored-by: Christopher Durham <[email protected]>
Co-authored-by: James Wainwright <[email protected]>
Co-authored-by: joboet <[email protected]>
Co-authored-by: Mara Bos <[email protected]>
Co-authored-by: Rafael Bachmann <[email protected]>
Co-authored-by: xizheyin <[email protected]>
Co-authored-by: Benoît du Garreau <[email protected]>
Co-authored-by: Nikolai Kuklin <[email protected]>
Co-authored-by: Frank King <[email protected]>
Co-authored-by: Daniel Henry-Mantilla <[email protected]>
Co-authored-by: Scott McMurray <[email protected]>
Co-authored-by: mejrs <[email protected]>
Co-authored-by: okaneco <[email protected]>
Co-authored-by: clubby789 <[email protected]>
Co-authored-by: Takayuki Maeda <[email protected]>
Co-authored-by: Daniel Bloom <[email protected]>
Co-authored-by: Trevor Gross <[email protected]>
Co-authored-by: Jake Wharton <[email protected]>
Co-authored-by: bjorn3 <[email protected]>
Co-authored-by: Guillaume Gomez <[email protected]>
Co-authored-by: Kornel <[email protected]>
Co-authored-by: Calder Coalson <[email protected]>
Co-authored-by: Stuart Cook <[email protected]>
Co-authored-by: github-actions <[email protected]>
Co-authored-by: izarma <[email protected]>
Co-authored-by: Bennet Bleßmann <[email protected]>
Co-authored-by: Celina G. Val <[email protected]>
Co-authored-by: Jonathan Gruner <[email protected]>
Co-authored-by: Stan Manilov <[email protected]>
Co-authored-by: Gabriel Bjørnager Jensen <[email protected]>
Co-authored-by: lincot <[email protected]>
Co-authored-by: timesince <[email protected]>
Co-authored-by: Boxy <[email protected]>
Co-authored-by: oyvindln <[email protected]>
Co-authored-by: Alice Ryhl <[email protected]>
Co-authored-by: Folkert de Vries <[email protected]>
Co-authored-by: Bastian Kersting <[email protected]>
Co-authored-by: Petros Angelatos <[email protected]>
Co-authored-by: Jesus Checa Hidalgo <[email protected]>
Co-authored-by: Michael Howell <[email protected]>
Co-authored-by: Ricardo Fernández Serrata <[email protected]>
Co-authored-by: GenYuLi <[email protected]>
Co-authored-by: Chris Denton <[email protected]>
Co-authored-by: Amanieu d'Antras <[email protected]>
Co-authored-by: Sky <[email protected]>
Co-authored-by: Huang Qi <[email protected]>
Co-authored-by: Ayush Singh <[email protected]>
Co-authored-by: 0x79de <[email protected]>
Co-authored-by: binarycat <[email protected]>
Co-authored-by: Glyn Normington <[email protected]>
Co-authored-by: Tamir Duberstein <[email protected]>
Co-authored-by: Josh Triplett <[email protected]>
Co-authored-by: Bastian Kersting <[email protected]>
Co-authored-by: Lyndon Brown <[email protected]>
Co-authored-by: Patrick Mooney <[email protected]>
Co-authored-by: gitbot <git@bot>
Co-authored-by: Michael Tautschnig <[email protected]>
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.

1 participant