Commit graph

24 commits

Author SHA1 Message Date
Markus Himmel
197bc6cb66
feat: redefine String, part one (#10304)
This PR redefines `String` to be the type of byte arrays `b` for which
`b.IsValidUtf8`.

This moves the data model of strings much closer to the actual data
representation at runtime.

In the near future, we will

- provide variants of `String.Pos` and `Substring` that only allow for
valid positions
- redefine all `String` functions to be much closer to their C++
implementations

In the near-to-medium future we will then provide comprehensive
verification of `String` based on these refactors.
2025-09-18 11:36:52 +00:00
Leonardo de Moura
7b8ade5ee4 test: String.get' and String.next' 2022-11-09 17:02:49 -08:00
Leonardo de Moura
3862e7867b refactor: make String.Pos opaque
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`

closes #410
2022-03-20 10:47:13 -07:00
Wojciech Nawrocki
b2d712a766 fix: Substring.splitOn 2021-07-19 09:55:37 +02:00
Wojciech Nawrocki
f3ab908888 fix: substring APIs 2021-01-15 13:29:22 -08:00
Leonardo de Moura
db9e390b4d chore: remove new_frontend from tests 2020-10-25 09:16:38 -07:00
Leonardo de Moura
c58252ad74 chore: move more tests to new frontend 2020-09-13 16:13:20 -07:00
Sebastian Ullrich
b2714d36ef fix: String: take/drop characters, not bytes 2020-08-11 18:24:47 -07:00
Sebastian Ullrich
8cb387e599 chore(tests/lean/extract): reactivate some #eval tests 2019-09-19 18:12:51 +02:00
Leonardo de Moura
40943f84f3 chore(tests): fix tests 2019-07-17 10:46:35 -07:00
Leonardo de Moura
2cbdb287c3 chore(tests): fix/disable some tests 2019-03-21 15:11:05 -07:00
Sebastian Ullrich
f34d37c371 chore(tests): port tests, fix at least compiler tests 2019-03-21 15:11:05 -07:00
Leonardo de Moura
d0ccaa1083 chore(tests/lean): fix tests
TODO: `io` modifications performed yesterday may have affected `eval`.
2018-11-15 10:56:03 -08:00
Sebastian Ullrich
80745ba776 chore(library/init/data/string/basic): rename string.iterator's next_to_string to remaining_to_string
The old name implied that `curr` was not part of its result
2018-07-05 10:42:37 +02:00
Leonardo de Moura
77993c967d chore(tests/lean): restore string tests 2018-04-26 17:36:41 -07:00
Leonardo de Moura
6234c60aae chore(*): disable test suite 2018-04-10 12:56:55 -07:00
Leonardo de Moura
394e0d5f0a refactor(library/init): remove has_cmp and is_ordering type classes
Now, `cmp` is just a fixed helper function.
In the future, we will be able to use (more efficient) specialized
versions during code generation by defining simp rules.
2017-11-14 08:33:24 -08:00
Leonardo de Moura
e53f8021ec feat(library/vm/vm_string): add builtin VM implementation for string.cmp 2017-10-23 10:55:26 -07:00
Leonardo de Moura
10184315fb feat(library/vm/vm_string): add builtin VM implementation for string.has_decidable_eq 2017-10-23 10:55:26 -07:00
Leonardo de Moura
a9e884cc1d fix(library/vm/vm_string): bug at string.iterator.remove VM builtin implementation 2017-10-23 10:55:26 -07:00
Leonardo de Moura
f8ce142da7 fix(library/vm/vm_string): bug at string.iterator.insert VM builtin implementation 2017-10-23 10:55:26 -07:00
Leonardo de Moura
e30f2f6604 fix(library/vm/vm): bug at update_vm_constructor 2017-10-23 10:55:26 -07:00
Leonardo de Moura
47a8c2baef fix(library/vm/vm_string): missing VM builtin for string_imp projections 2017-10-23 10:55:26 -07:00
Leonardo de Moura
ffb2464f1f fix(library/vm/vm_string): missing VM builtin for string.iterator_imp projections 2017-10-23 10:55:26 -07:00