Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
7b7ce2c
refactor: new function loadAndTranslateModule, extracted from importM…
mtullsen Sep 16, 2025
8d13529
comments and whitespace
mtullsen Sep 18, 2025
bd45dc9
refactor: move code for generating CryptolModule into mkCryptolModule
mtullsen Sep 18, 2025
81b9358
refactors
mtullsen Sep 18, 2025
b62f08e
improve fail message
mtullsen Sep 18, 2025
4a02ab7
comments.
mtullsen Sep 18, 2025
714c946
refactor: fold loadAndTranslateModule
mtullsen Sep 18, 2025
1ab9fb2
comments, refactors
mtullsen Sep 18, 2025
cedfc1b
refactor: make names more consistent
mtullsen Sep 18, 2025
9b506dc
improve comments
mtullsen Sep 19, 2025
f7d7289
comments, refactors (re-ordering, folding locatedUnknown, new mkImport)
mtullsen Sep 19, 2025
2e14804
refactor (with dead code, thus no compile), in prep for ...
mtullsen Sep 20, 2025
2f1be10
generalize the internals of "CryptolModule" (as seen on command-line)…
mtullsen Sep 21, 2025
02d7ba0
refactors, comments, whitespace
mtullsen Sep 24, 2025
9a2c60d
revert (misguided) c923c717b
mtullsen Sep 24, 2025
cd08921
comments: move/improve; change whitespace/identing
mtullsen Sep 24, 2025
fcc8312
refactor: re-plumb to get more arguments to `extractDefFromExtCryptol…
mtullsen Sep 24, 2025
3da7325
finish "generalize the internals of "CryptolModule" by finishing extr…
mtullsen Sep 24, 2025
a2f007b
comments
mtullsen Sep 25, 2025
b7c396b
plumb ?fileReader down.
mtullsen Sep 25, 2025
e01cf80
refactor mkCryptolModule (inline internals and simplify)
mtullsen Sep 27, 2025
ca92a09
wibble to improve messages (info and error)
mtullsen Sep 27, 2025
e467c69
refactor
mtullsen Sep 28, 2025
d64f18b
Improve how we show a ECM_LoadedModule to the user.
mtullsen Sep 28, 2025
5cabdad
comments
mtullsen Sep 28, 2025
417a171
new tests
mtullsen Sep 28, 2025
c34c2c6
refactors (minor) and improving comments.
mtullsen Oct 5, 2025
be1276d
add new *.cry tests
mtullsen Oct 6, 2025
9eae17d
documentation (first draft)
mtullsen Oct 6, 2025
d0eb432
documentation
mtullsen Oct 6, 2025
3d1c1b7
refactor: fold; whitespace
mtullsen Oct 6, 2025
fd5d0f0
rename test
mtullsen Oct 8, 2025
4073748
comments
mtullsen Oct 8, 2025
46f9faf
tweak F.cry test module
mtullsen Oct 8, 2025
86a32e2
add debugging code (temporarily)
mtullsen Oct 8, 2025
93d1544
refactor (modulo debug logging details); tweaking .cry tests
mtullsen Oct 8, 2025
d369374
checkpoint (logging code shows proposed new code)
mtullsen Oct 9, 2025
91d8447
refactor (turning logging messages into org outline)
mtullsen Oct 9, 2025
881f24e
checkpoint
mtullsen Oct 11, 2025
b4e9c3f
refactor, plus fixing nmsPr (based on nmsTopLevels)
mtullsen Oct 11, 2025
0c36794
checkpoint: compiles
mtullsen Oct 11, 2025
ea4fcda
checkpoint: many things working, publics in submodules now missing.
mtullsen Oct 11, 2025
aaff5fc
refactor: renaming
mtullsen Oct 11, 2025
f76bf7a
more logging, ensure it is off by default
mtullsen Oct 11, 2025
461bcf1
comments
mtullsen Oct 11, 2025
c517452
fix `computeNamingEnv`
mtullsen Oct 11, 2025
a5656dd
Update tests (now that they pass).
mtullsen Oct 11, 2025
dc1179a
bump deps/cryptol
mtullsen Oct 11, 2025
0d3ce38
refactor (with previous bump): move functions to deps/cryptol
mtullsen Oct 11, 2025
a89ed12
fixup the merge
mtullsen Oct 11, 2025
e6f370f
whitespace, and elaborate comments
mtullsen Oct 12, 2025
8e5c80f
Tweak the tests (defined correctly, more comments, all passing).
mtullsen Oct 12, 2025
9cd0c39
remove debugging code
mtullsen Oct 12, 2025
af613c1
update doc/developer
mtullsen Oct 12, 2025
cd67cce
Update CHANGES.md with doc for submodules and changed cryptol_load be…
mtullsen Oct 12, 2025
bdc77a6
remove doc file, moved to Issue #2701.
mtullsen Oct 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,40 @@ This release supports [version
Accordingly, the second and third `String` arguments to
`write_coq_cryptol_primitives_for_sawcore` have been removed.

* The behavior of `cryptol_load` has changed, previously when we had
this

A <- cryptol_load "A1.cry" -- A1::** are added to {{A::**}}
A <- cryptol_load "A2.cry" -- A2::** are added to {{A::**}}

the `A` in 2nd line would shadow the first `A`, and for each
symbol `s` from "A2.cry", that symbol may shadow any duplicate
symbol `s` from "A1.cry" and this would also leave symbols from
"A1.cry" in the Cryptol environment.

The new behavior is that the same two commands now work
identically to the following

import "A.cry" as A
import "A2.cry" as A

and as a result
- no shadowing occurs
- importing ambiguous symbols is allowed
- referring to ambiguous (qualified) symbols is an error.

## New Features

* When one does `import ...` and `cryptol_load` at the SAWScript CLI,
you can now access submodules in the loaded modules. Both these
will "import" submodules recursively and make no distinction between
normal and `private` variables. As a result, SAWScript code can
refer to *every* definition in the loaded module.

You can reference public and private definitions in sub-modules via
`::` qualifiers, just as is done in Cryptol code.


* The Cryptol import syntax has been extended.
- You can now import Cryptol module names, including qualified module
names (which are resolved via the Cryptol load path) as well as
Expand Down
2 changes: 1 addition & 1 deletion crux-mir-comp/src/Mir/Cryptol.hs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ loadCryptolFunc col sig modulePath name = do
let ?fileReader = BS.readFile
ce <- liftIO (readIORef (mirCryEnv mirState))
let modName = Cry.textToModName modulePath
ce' <- liftIO $ SAW.importModule sc ce (Right modName) Nothing SAW.PublicAndPrivate Nothing
ce' <- liftIO $ SAW.importCryptolModule sc ce (Right modName) Nothing SAW.PublicAndPrivate Nothing
liftIO (writeIORef (mirCryEnv mirState) ce')
-- (m, _ce') <- liftIO $ SAW.loadCryptolModule sc ce (Text.unpack modulePath)
-- tt <- liftIO $ SAW.extractDefFromCryptolModule m (Text.unpack name)
Expand Down
Loading
Loading