-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename and improve the Plutus foundation page #6488
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d356508
Rename and improve the Plutus foundation page
zliu41 7172bbc
Merge branch 'master' of github.com:IntersectMBO/plutus into zliu41/f…
zliu41 36c4701
Update doc/docusaurus/docs/essential-concepts/plutus-core-and-plutus-…
zliu41 4bce283
Address comments
zliu41 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
doc/docusaurus/docs/essential-concepts/plutus-core-and-plutus-tx.md
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,47 @@ | ||
--- | ||
sidebar_position: 10 | ||
--- | ||
|
||
# Plutus Core and Plutus Tx | ||
|
||
Understanding the roles and relationships between different languages is key to the effective and efficient development of smart contracts. | ||
|
||
## Untyped Plutus Core | ||
|
||
Untyped Plutus Core (UPLC), also known simply as Plutus Core or Plutus, is a low-level, Turing-complete language based on untyped lambda calculus, a simple and well-established computational model that dates back to the 1930s. | ||
Thanks to its simplicity and extensive academic research, the need for updates or modifications to the language over time is minimal, ensuring long-term stability. | ||
It also facilitates the creation of simple, formally verified evaluators. | ||
|
||
Along with UPLC and its evaluator, we provide a compiler from Plutus Tx, a subset of Haskell, to UPLC. | ||
However, UPLC can be an easy compilation target for any language that supports functional-style programming, in particular immutable data and higher-order functions, both of which are widely adopted today in programming languages, and are particularly suited to Cardano's UTXO ledger model, where UTXOs are immutable. | ||
|
||
UPLC is the code that runs on-chain, i.e., by every node validating the transaction, using an interpreter known as the CEK machine. | ||
A UPLC program included in a Cardano transaction is often referred to as a Plutus script or a Plutus validator. | ||
|
||
### Typed Plutus Core and Plutus IR | ||
|
||
Typed Plutus Core (TPLC) is the intrinsically typed counterpart of UPLC. | ||
It is based on higher-order polymorphic lambda calculus (System Fω). | ||
zliu41 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
TPLC serves as a low-level intermediate representation (IR) for the Plutus Tx compiler. | ||
TPLC is closely related to UPLC, and compiling TPLC into UPLC is simply a matter of erasing types. | ||
|
||
Plutus IR (PIR) is a high-level IR also used by the Plutus Tx compiler. | ||
It extends TPLC by adding recursive bindings and recursive data types. | ||
The fact that recursion is explicit in PIR, rather than encoded using fixed point operators as in TPLC and UPLC, makes PIR significantly more readable than TPLC and UPLC. | ||
When optimizing the cost or size of Plutus scripts written in Plutus Tx, it is usually useful to look into PIR. | ||
|
||
## Plutus Tx | ||
|
||
Plutus Tx, the primary focus of this user guide, is a high-level language for writing the validation logic of the contract, the logic that determines whether a transaction is allowed to perform things such as spending a UTXO, minting or burning assets, and more. | ||
Plutus Tx is not a new language, but rather a subset of Haskell, and it is compiled into UPLC. | ||
|
||
There are several other high-level languages available as alternatives to Plutus Tx, all of which compile to UPLC. | ||
See [Overview of Languages Compiling to UPLC](../delve-deeper/languages.md) for more information. | ||
|
||
## Further reading | ||
|
||
The formal details of Plutus Core are in its [specification](https://github.com/IntersectMBO/plutus#specifications-and-design). | ||
|
||
The design is discussed in our [technical report](https://plutus.cardano.intersectmbo.org/resources/plutus-report.pdf). | ||
zliu41 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
PIR is discussed in [_Unraveling recursion: compiling an IR with recursion to System F_](https://iohk.io/en/research/library/papers/unraveling-recursion-compiling-an-ir-with-recursion-to-system-f/). |
39 changes: 0 additions & 39 deletions
39
doc/docusaurus/docs/essential-concepts/plutus-foundation.md
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 10 | ||
sidebar_position: 15 | ||
--- | ||
|
||
# Plutus platform | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could be more specific and say eUTXO instead of UTXO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think UTXO is much more frequently used. eUTXO is typically mentioned when emphasizing the difference between eUTXO and UTXO.