Skip to content

Commit 343413a

Browse files
committed
Merge branch 'BlockstreamResearch-master'
2 parents 7d7c304 + 365fc88 commit 343413a

9 files changed

Lines changed: 23 additions & 26 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
# 0.1.0 - 2025-04-10
1+
# 0.2.0 - 2025-07-29
22

3+
* Renamed from [Simfony](https://crates.io/crates/simfony)
34
* Initial release. Not recommended for production use.

Cargo.lock

Lines changed: 8 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "simplicityhl"
3-
version = "0.1.0"
3+
version = "0.2.0"
44
authors = ["sanket1729 <sanket1729@gmail.com>"]
55
license = "CC0-1.0"
66
homepage = "https://github.com/BlockstreamResearch/SimplicityHL"
@@ -26,7 +26,7 @@ pest = "2.1.3"
2626
pest_derive = "2.7.1"
2727
serde = { version = "1.0.188", features = ["derive"], optional = true }
2828
serde_json = { version = "1.0.105", optional = true }
29-
simplicity-lang = { version = "0.4.0" }
29+
simplicity-lang = { version = "0.5.0" }
3030
miniscript = "12.3.1"
3131
either = "1.12.0"
3232
itertools = "0.13.0"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Simplicity introduces a groundbreaking low-level programming language and machin
2929
The distinguishing aspects that set Simplicity apart from conventional programming languages are:
3030

3131
- **Distinct Programming Paradigm**: Simplicity's programming model requires a paradigm shift from conventional programming. It hinges on reasoning about programs in a functional sense with a focus on combinators. This intricacy surpasses even popular functional languages like Haskell, with its own unique challenges.
32-
- **Exceptional Low-Level Nature**: Unlike high-level languages such as JavaScript or Python, Simplicity operates at an extremely low level, resembling assembly languages. This design choice enables easier reasoning about the formal semantics of programs, but is really work on directly.
32+
- **Exceptional Low-Level Nature**: Unlike high-level languages such as JavaScript or Python, Simplicity operates at an extremely low level, resembling assembly languages. This design choice enables easier reasoning about the formal semantics of programs, but is rarely worked on directly.
3333

3434
## SimplicityHL
3535

36-
SimplicityHL is a high-level language that compiles to Simplicity. It maps programming concepts from Simplicity onto programming concepts that developers are more familar with. In particular, Rust is a popular language whose functional aspects fit Simplicity well. SimplicityHL aims to closely resemble Rust.
36+
SimplicityHL is a high-level language that compiles to Simplicity. It maps programming concepts from Simplicity onto programming concepts that developers are more familiar with. In particular, Rust is a popular language whose functional aspects fit Simplicity well. SimplicityHL aims to closely resemble Rust.
3737

3838
Just how Rust is compiled to assembly language, SimplicityHL is compiled to Simplicity. Just how writing Rust doesn't necessarily produce the most efficient assembly, writing SimplicityHL doesn't necessarily produce the most efficient Simplicity code. The compilers try to optimize the target code they produce, but manually written target code can be more efficient. On the other hand, a compiled language is much easier to read, write and reason about. Assembly is meant to be consumed by machines while Rust is meant to be consumed by humans. Simplicity is meant to be consumed by Bitcoin full nodes while SimplicityHL is meant to be consumed by Bitcoin developers.
3939

clippy.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
msrv = "1.78.0"
22
# We have an error type, `RichError`, of size 144. This is pushing it but probably fine.
33
large-error-threshold = 145
4+
5+
doc-valid-idents = [ "SimplicityHL" ]

doc/environment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ During the translation, we can ignore the source type of Simplicity expressions
2222

2323
Target types are handled by contexts.
2424

25-
We obtain context Ctx(Ξ) from environment Ξ by mapping each variable `a` from Ξ to the target type of Ξ(`x`):
25+
We obtain context Ctx(Ξ) from environment Ξ by mapping each variable `x` from Ξ to the target type of Ξ(`x`):
2626

2727
Ctx(Ξ)(`x`) = B if Ξ(`x`) = a: A → B
2828

@@ -37,7 +37,7 @@ As we translate `s` to Simplicity, we need an environment that maps the variable
3737

3838
If `p` is just a variable `p = a`, then the environment is simply [`a` ↦ iden: A → A].
3939

40-
If `p` is a product of two variables `p = (a, b)`, then the environment is [`a` ↦ take iden: A × B → A, `b` ↦ drop iden: A × B → B.
40+
If `p` is a product of two variables `p = (a, b)`, then the environment is [`a` ↦ take iden: A × B → A, `b` ↦ drop iden: A × B → B].
4141

4242
"take" and "drop" are added as we go deeper in the product hierarchy. The pattern `_` is ignored.
4343

doc/translation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Then ⟦`b; c`⟧Ξ = comp (pair ⟦`b`⟧Ξ ⟦`c`⟧Ξ) (drop iden): A → C
7878

7979
If Ctx(Ξ) ⊩ `b`: B
8080

81-
If Product(PEnv(B, `p`), Ξ) ⊩ c: C
81+
If Product(PEnv(B, `p`), Ξ) ⊩ `c`: C
8282

8383
Then ⟦`let p: B = b; c`⟧Ξ = comp (pair ⟦`b`⟧Ξ iden) ⟦`c`⟧Product(PEnv(B, `p`), Ξ): A → C
8484

@@ -90,7 +90,7 @@ If Product(PEnv(B, `x`), Ξ) ⊩ `b`: D
9090

9191
If Product(PEnv(C, `y`), Ξ) ⊩ `c`: D
9292

93-
Then ⟦`match a { Left(x) => a, Right(y) => b, }`⟧Ξ = comp (pair ⟦a⟧Ξ iden) (case ⟦b⟧Product(PEnv(B, `x`), Ξ) ⟦c⟧Product(PEnv(C, `y`), Ξ)): A → D
93+
Then ⟦`match a { Left(x) => b, Right(y) => c, }`⟧Ξ = comp (pair ⟦`a`⟧Ξ iden) (case ⟦`b`⟧Product(PEnv(B, `x`), Ξ) ⟦`c`⟧Product(PEnv(C, `y`), Ξ)): A → D
9494

9595
## Left unwrap
9696

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ mod tests {
405405
impl TestCase<SatisfiedProgram> {
406406
#[allow(dead_code)]
407407
pub fn print_encoding(self) -> Self {
408-
let (program_bytes, witness_bytes) = self.program.redeem().encode_to_vec();
408+
let (program_bytes, witness_bytes) = self.program.redeem().to_vec_with_witness();
409409
println!(
410410
"Program:\n{}",
411411
Base64Display::new(&program_bytes, &STANDARD)

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn run() -> Result<(), String> {
7979

8080
if let Some(witness) = witness_opt {
8181
let satisfied = compiled.satisfy(witness)?;
82-
let (program_bytes, witness_bytes) = satisfied.redeem().encode_to_vec();
82+
let (program_bytes, witness_bytes) = satisfied.redeem().to_vec_with_witness();
8383
println!(
8484
"Program:\n{}",
8585
Base64Display::new(&program_bytes, &STANDARD)
@@ -89,7 +89,7 @@ fn run() -> Result<(), String> {
8989
Base64Display::new(&witness_bytes, &STANDARD)
9090
);
9191
} else {
92-
let program_bytes = compiled.commit().encode_to_vec();
92+
let program_bytes = compiled.commit().to_vec_without_witness();
9393
println!(
9494
"Program:\n{}",
9595
Base64Display::new(&program_bytes, &STANDARD)

0 commit comments

Comments
 (0)