-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1f55aa
commit 7a6221a
Showing
21 changed files
with
234 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
name: CI | ||
on: | ||
# schedule: [{cron: '0 0 * * *'}] | ||
schedule: [{cron: '0 0 * * *'}] | ||
push: {branches: master} | ||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2.3.1 | ||
- uses: omelkonian/setup-agda@v0 | ||
- uses: omelkonian/setup-agda@master | ||
with: | ||
agda-version: 2.6.1 | ||
stdlib-version: 1.3 | ||
libraries: omelkonian/formal-prelude#v0.1 | ||
agda-version: 2.6.3 | ||
stdlib-version: 1.7.2 | ||
libraries: omelkonian/formal-prelude#3cb8424 | ||
main: Main | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ribbon: true | ||
rts: -K256M -H1G -M8G -A128M | ||
measure-typechecking: 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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{-# OPTIONS --rewriting #-} | ||
module Main where | ||
|
||
-- ** Basic UTxO definitions | ||
|
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,38 @@ | ||
module StateMachine.Examples.DoubleSatisfactionProblem where | ||
|
||
open import Prelude.Default | ||
open import UTxO.Value | ||
open import UTxO.Types | ||
open import UTxO.TxUtilities | ||
open import UTxO.Validity | ||
open import StateMachine.Base | ||
|
||
data State : Set where | ||
counter : ℤ → State | ||
|
||
data Input : Set where | ||
inc : Input | ||
|
||
instance | ||
IsData-CS : IsData State | ||
toData ⦃ IsData-CS ⦄ (counter i) = I i | ||
fromData ⦃ IsData-CS ⦄ (I i) = just (counter i) | ||
fromData ⦃ IsData-CS ⦄ _ = nothing | ||
from∘to ⦃ IsData-CS ⦄ (counter i) = refl | ||
from-inj ⦃ IsData-CS ⦄ (I i) (counter .i) refl = refl | ||
|
||
IsData-CI : IsData Input | ||
toData ⦃ IsData-CI ⦄ inc = LIST [] | ||
fromData ⦃ IsData-CI ⦄ (LIST []) = just inc | ||
fromData ⦃ IsData-CI ⦄ _ = nothing | ||
from∘to ⦃ IsData-CI ⦄ inc = refl | ||
from-inj ⦃ IsData-CI ⦄ (LIST []) inc refl = refl | ||
|
||
CounterSM : StateMachine State Input | ||
isInitial CounterSM (counter (+ 0) ) = true | ||
isInitial CounterSM (counter _ ) = false | ||
-- isFinal CounterSM (counter (+ 10)) = false | ||
-- isFinal CounterSM _ = false | ||
step CounterSM (counter i) inc = | ||
just (counter (Data.Integer.suc i) , def Default-TxConstraints) | ||
origin CounterSM = nothing |
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
Oops, something went wrong.