Commit Graph

81 Commits

Author SHA1 Message Date
Eric Mertens
c7504ea3c9
renderOneLine should render to one line (#1759)
renderOneLine should render to one line

Previously the implementation was using layoutCompat with the hope that this operation rendered to a single line. It doesn't. This function is only used in the obscure :dumptests command where rendering to a single line is important for the file format.
2024-10-01 16:05:24 -07:00
Ryan Scott
16d2786c7d Fix splitV when splitting empty sequence to type [inf][0]
Previously, `splitV` would assume that if you were splitting a value `val` into
something of type `[inf][each]`, then `val` must be a stream of type of `[inf *
each]` (i.e., of type `[inf]`). This is not true in the corner case where
`each` equals `0`, however. In that case, `val` is of type `[0]`, which is a
word, not a stream. As such, we need to ensure that we do not call `fromSeq` on
`val`, which crashes if `val` is not a stream or sequence.

Fixes #1749.
2024-09-18 14:37:04 -04:00
Iavor Diatchki
496de4c8e1 Fix typo. 2024-09-17 11:16:29 -07:00
Iavor Diatchki
34f6f5b300 Update CHANGES 2024-09-17 11:08:50 -07:00
Ryan
9c6c31177c Add Next sections to change logs. 2024-08-20 09:47:39 -06:00
Ryan
8ea4fcaba9 Prepare Cryptol 3.2 release: Updates to changelog 2024-08-20 09:42:12 -06:00
Eric Mertens
4ca062966e
Initial implementation of :check-docstrings (#1682)
* Update all commands to track their results

* Implement REPL :check-docstrings command

This command checks that all of the unlabeled and "repl" labeled
codeblocks in docstrings can successfully evaluate as REPL commands.

Cryptol will now indicate exit failure if any of REPL commands fail,
making it possible to use in automated testing.

:check-docstrings internal implementation is set up to track results
of subcommands in support for integration into a remote server API
endpoint.

* Implement :focus

* Add some :check-docstring test cases

* Update changelog

* Update CrashCourse.tex now that more commands are checked

* Require repl and convert \r\n to \n in lexer
2024-07-18 15:44:16 -07:00
Ryan Scott
6e417aa3d1 Abort early after type-checking malformed constraint guards
Checking ill-typed constraint guards for exhaustivity can cause Cryptol to
panic. If we detect any type errors after type-checking the guards, we now
abort early and report any recorded errors instead of proceeding to check
exhaustivity.

Fixes #1593. Fixes #1693.
2024-07-02 07:16:05 -04:00
Iavor Diatchki
128411e605 Merge branch 'master' into issue_1691
# Conflicts:
#	CHANGES.md
2024-07-01 09:57:15 -07:00
Iavor S. Diatchki
bbd08f4efd
Update CHANGES.md
Co-authored-by: Ryan Scott <rscott@galois.com>
2024-07-01 09:34:56 -07:00
Ryan Scott
fbbbb8f56f
Check for syntactically invalid constraint guards in the parser (#1686)
Numeric constraint guards have very particular syntactic requirements:

* They must always be used in top-level definitions.
* Their definitions must always be accompanied by a top-level type signature.

Previously, we checked these requirements in a combination of places in the
parser and the typechecker. The checks in the typechecker weren't very
thorough, however, and they failed to catch local definitions without type
signatures that use constraint guards, as seen in #1685.

This patch moves all of these syntactic checks to the parser (in
`Cryptol.Parser.ExpandPropGuards`). We now recurse into expressions to check
for local definition that use constraint guards and error if we encounter one.
This ensures that by the time we reach the typechecker, all constraint guard
expressions are at least syntactically valid.

Fixes #1685.
2024-07-01 07:13:36 -04:00
Iavor Diatchki
e55470c90b Update CHANGES 2024-06-28 04:51:16 -07:00
Ryan Scott
7ab8ca5820
Finalize 3.1.0 dates (#1625)
(cherry picked from commit 3cf3210578)
2024-02-06 14:37:55 -05:00
Ryan Scott
c2493d00d1 Release dates for changelogs 2024-02-03 08:45:44 -05:00
Ryan Scott
4d6334771d CHANGELOG: Mention all closed issues and PRs 2024-02-03 08:45:44 -05:00
Ryan Scott
e3a3eb71ff Bump changelog versions for 3.1.0 2024-02-03 07:36:29 -05:00
Ryan Scott
4e6e5d8010 Mention enums in CHANGES.md 2024-02-01 17:02:06 -05:00
Ryan Scott
ed40d6f974
Respect VWord/VSeq invariants in parmap implementation (#1579)
Previously, `parmap` could incorrectly return a `VWord` when the element type
was not `Bit`, and it could also return a `VSeq` when the element type was
`Bit`. This changes the implementation of `parmap` to use the `mkSeq` smart
constructor, which properly chooses what sort of `GenValue` to return depending
on the element type.

Fixes #1578.
2023-10-10 07:44:17 -04:00
Bretton
5a7746799a CHANGES: Cryptol implementation of foreign decls 2023-08-22 14:04:04 -07:00
Iavor Diatchki
064f391a04 Update CHANGES 2023-08-09 16:30:11 -07:00
Kevin Quick
a51c7ec79a
Fix doc ref in CHANGES and use better wording. 2023-06-27 14:02:01 -07:00
Ryan Scott
f25efc310d Release dates for changelogs 2023-06-26 08:59:51 -04:00
Ryan Scott
82dca5fdbc CHANGELOG: Mention all closed issues and PRs 2023-06-23 13:17:39 -04:00
Ryan Scott
8e362bf611 Mention #1363 in the CHANGELOG 2023-06-23 13:17:37 -04:00
Ryan Scott
c6d8996754 Mention #1502 in the CHANGELOG 2023-06-23 13:02:32 -04:00
Ryan Scott
d55fc18fa3 Mention #1388 in the CHANGELOG 2023-06-23 13:02:32 -04:00
Ryan Scott
8f64a5bc76 Bump changelog versions to 3.0.0 2023-06-23 13:02:32 -04:00
Kevin Quick
76d8dc6313
Update references to online documentation to point to the new URL. 2023-06-22 13:05:03 -07:00
Ian Sweet
24a708b929 bring up to date with functors-merge 2023-03-24 12:16:40 -04:00
Iavor Diatchki
c9bdd5de3f Merge branch 'master' into functors-merge
# Conflicts:
#	CHANGES.md
2023-03-24 09:09:32 -07:00
Ian Sweet
6ee9220a53 cryptol module docs: tightened some writing, fixed some typos, and introduced the term 'functor' as it was used without definition. 2023-03-23 11:05:11 -04:00
Ryan Scott
7542f45808 CHANGES: Add disclaimer about Windows sbv-cvc5 2023-03-06 11:01:37 -05:00
Ryan Scott
c810821d10 Add CVC5 support
This patch:

* Makes the necessary changes on the `cryptol` and `cryptol-remote-api` side
  needed add `cvc5`, `w4-cvc5`, and `sbv-cvc5` solvers. This requires SBV 9.1
  or later to include the changes from LeventErkok/sbv#630, which re-exports
  CVC5-related functionality from all of the places that Cryptol imports from.
* Adds a test case to ensure that basic CVC5 support works.
* Updates the CI and Dockerfile to ensure that CVC5 is included from the
  `what4-solvers` bindists.

Fixes #1503.
2023-03-06 10:45:19 -05:00
Iavor Diatchki
1f1e56c70a File/module dependencies without loading 2022-12-01 16:23:04 -08:00
Iavor Diatchki
3a66cea2c7 Make the REPL and Python API more similar
* Also adds a test
* updates CHANGES
* Add `file_deps` to synchronous and single_connection
2022-11-29 11:14:10 -08:00
Iavor S. Diatchki
68a0ff358d
Merge pull request #1468 from GaloisInc/T1465
Improve the documentation of `fromInteger`
2022-11-21 16:16:38 -08:00
Iavor Diatchki
aa8969d64a Update CHANGES to mention set-seed and new-seed 2022-11-21 10:32:00 -08:00
Iavor Diatchki
11c0efe1d8 Fixup line numbers in docs and update CHANGES 2022-11-21 10:24:56 -08:00
Iavor Diatchki
d5fb4d4e20 Fix name of syntax highlight file. 2022-10-26 13:32:26 -07:00
Iavor Diatchki
5173c8effe Update CHANGES 2022-10-26 13:30:53 -07:00
Iavor Diatchki
e6acf4ecb7 Add info to the CHANGES files 2022-09-28 09:37:12 +03:00
Ryan Scott
4367eee0d1
Make fromTo and friends return VWord when appropriate (#1436)
Previous, `fromTo` and related functions would always return a `VSeq`. If the
type happened to be a `Bit`, this would violate the internal invariant that
sequences of `Bit`s are always represented with `VWord`s, leading to the panics
observed in #1435. This patch fixes the issue by using the `mkSeq` smart
constructor, which chooses between `VWord` and `VSeq` depending on the sequence
type.

Fixes #1435.
2022-09-17 10:48:15 -04:00
Iavor Diatchki
9d6319078f Update the CHANGES files 2022-09-03 12:05:08 +03:00
Bretton
08fa31c0d5 CHANGES: Move new features before bug fixes 2022-08-31 11:41:25 -07:00
Bretton
1be45cfc20 Merge branch 'master' into update-changes-md 2022-08-31 11:37:40 -07:00
Bretton
130ae18573 Add :time to CHANGES.md 2022-08-29 23:05:58 -07:00
Bretton
752bb86325 CHANGES: Mention warnPrefixAssoc option 2022-08-29 22:29:35 -07:00
Bretton
29053f47a5 Update CHANGES.md with language changes 2022-08-29 22:23:57 -07:00
Ryan Scott
c37a71b4c5 Fix off-by-one error in What4 implementation of (@)
In the case where the index is a symbolic `Integer` and the sequence is of
length `n`, the What4 backend mistakenly chose `n` to be the largest possible
index. This corrects it to instead be `n - 1`.

Fixes #1359.
2022-06-02 10:15:41 -04:00
Ryan Scott
cf89e99f00 2.13.0 changelog entries 2022-05-12 09:23:20 -04:00