Skip to content

Commit

Permalink
Fix some typos in the isle language reference (#4248)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt authored Jun 8, 2022
1 parent 5033f99 commit 8238175
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cranelift/isle/docs/language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ can represent various concepts in a compiler backend: values, but also
machine instructions or parts of those instructions ("integer
immediate value encodable in machine's particular format"), or
abstract bundles of information with invariants or guarantees encoded
in the type system ("load that I can sink", "instruciton that produces
in the type system ("load that I can sink", "instruction that produces
flags").

ISLE's other key departure from many other systems is its first-class
Expand Down Expand Up @@ -729,10 +729,10 @@ a `T2`. Concretely:
(decl Translate (T1) T2)
(rule (Translate (T1.A ...)
(T2.X ...)))
(rule (Translate (T1.B ...)
(T2.Y ...)))
(rule (Translate (T1.A ...))
(T2.X ...))
(rule (Translate (T1.B ...))
(T2.Y ...))
```

This gets to the heart of rewrite-system-based computation, and has
Expand Down Expand Up @@ -764,8 +764,8 @@ one could have:
(decl TranslateToMachine1 (IR) Machine1)
(decl TranslateToMachine2 (IR) Machine2)
(rule (TranslateToMachine1 (IR.add a b) (Machine1.add a b)))
(rule (TranslateToMachine2 (IR.add a b) (Machine2.weird_inst a b)))
(rule (TranslateToMachine1 (IR.add a b)) (Machine1.add a b))
(rule (TranslateToMachine2 (IR.add a b)) (Machine2.weird_inst a b))
```

and then both translations are available. We are "rewriting" from `IR`
Expand Down Expand Up @@ -908,7 +908,7 @@ This also works in the extractor position: for example, if one writes
(decl iadd (Value Value) Inst)
(rule (lower (iadd (iadd a b) c))
...))
...)
(convert Inst Value defining_instruction)
```
Expand Down

0 comments on commit 8238175

Please sign in to comment.