Skip to content

Commit

Permalink
Update type-system.md
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-johnson-4 authored Feb 1, 2025
1 parent 88e51fa commit 7b29cc0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions type-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,3 @@ Many novel type systems can be expressed as Phi Types.
The term "Phi Type" comes from the more widely recognized Phi Functions in Single Static Assignment form.
A Phi Function is used to merge variables coming from two separate parent code paths.
A Phi Type is similarly used to merge types coming from two separate parent code paths.

Example:

$$\frac{if \quad condition \quad then \quad truecase \quad else \quad falsecase}{logically \quad merge \quad truecase \quad and \quad falsecase}$$

becomes

$$\frac{if \quad condition \quad then \quad truecase \quad else \quad falsecase}{φ(truecase,falsecase)}$$

so only a new phi function needs to be defined.

Phi types can also have state transitions decorated onto the inference graph.
For example the `fclose` function will cause a state transition from `FileState::Open` to `FileState::Closed`.

0 comments on commit 7b29cc0

Please sign in to comment.