-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1568 from GaloisInc/foreign-cryptol-def-fixes
Fixes for handling `foreign` functions
- Loading branch information
Showing
8 changed files
with
73 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#include <stdint.h> | ||
|
||
uint8_t f(uint8_t x) { | ||
return x; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
foreign f : Bit -> Bit | ||
f x = ~ g x | ||
|
||
foreign g : Bit -> Bit | ||
g x = ~ f x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
:! make -s ffi-fallback-rec | ||
:l ffi-fallback-rec.cry | ||
g True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
Loading dynamic library ffi-fallback-rec.so | ||
[warning] Could not load all foreign implementations for module Main: | ||
Could not load foreign implementation for binding g | ||
Fallback cryptol implementations will be used if available | ||
False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
Loading dynamic library ffi-fallback-rec.dylib | ||
[warning] Could not load all foreign implementations for module Main: | ||
Could not load foreign implementation for binding g | ||
Fallback cryptol implementations will be used if available | ||
False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Loading module Cryptol | ||
Loading module Cryptol | ||
Loading module Main | ||
Loading dynamic library ffi-fallback-rec.dll | ||
[warning] Could not load all foreign implementations for module Main: | ||
Could not load foreign implementation for binding g | ||
Fallback cryptol implementations will be used if available | ||
False |