- TL;DR: オンライン実行環境作ってるよ (WIP)
- https://github.com/y-taka-23/dncl-playground
- https://elm-jp.connpass.com/event/280401/
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
module signal | |
enum LightState { On, Off, Blink } | |
abstract sig Light { | |
var state: one LightState | |
} | |
one sig Red, Green extends Light {} |
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
#!/bin/bash | |
rm -f cut.mov | |
rm -f palette.png | |
rm -f encoded.gif | |
rm -f output.gif | |
ffmpeg -ss 10 -to 15 -i input.mov -c copy cut.mov | |
ffmpeg -i cut.mov -vf fps=30,scale=340:-1:flags=lanczos,palettegen palette.png | |
ffmpeg -i cut.mov -i palette.png -filter_complex "fps=30,scale=340:-1:flags=lanczos[x];[x][1:v]paletteuse" encoded.gif |
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
module Sample where | |
import Language.Haskell.Liquid.Prelude ( liquidError ) | |
{-@ safeHead :: { xs:[a] | len xs > 0 } -> a @-} | |
safeHead [] = liquidError "empty list" | |
safeHead (x : _) = x | |
-- badUsage = safeHead [] -- => Liquid Type Mismatch |
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
open util/ordering[Time] | |
sig Time {} | |
abstract sig Event { | |
pre, post : Time, | |
} { | |
post = pre.next | |
} |
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
// ************************************ | |
// 命題論理のシークエント計算のモデル | |
// ************************************ | |
// 論理式 | |
abstract sig Formula {} | |
// 原子命題 | |
sig Atom extends Formula {} |
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
// ************************************************** | |
// AWS セキュリティグループのモデル | |
// ************************************************** | |
// 通信プロトコル | |
enum Protocol { TCP, UDP, ICMP } | |
// 通信ポート | |
sig Port {} |
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
Parameter A : Type. | |
Parameter beq_A : A -> A -> bool. | |
Section Uniq. | |
Require Import Arith List. | |
Hypothesis beq_A_true : forall x y : A, | |
beq_A x y = true -> x = y. | |
Hypothesis beq_A_false : forall x y : A, |
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
/* | |
* Resource Sharing Problem (Example for Deadlock) | |
*/ | |
mtype = { LOCK, UNLOCK }; | |
proctype Client(chan to_res1, to_res2) { | |
if | |
:: to_res1 ! LOCK(_pid); | |
to_res2 ! LOCK(_pid); |
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
IDENTIFICATION DIVISION. | |
PROGRAM-ID. DEATH-MARCH-05. | |
DATA DIVISION. | |
WORKING-STORAGE SECTION. | |
77 FB-STR PIC X(153). | |
77 CNT PIC 9(2) VALUE 1. | |
77 QUOT PIC 9(2). | |
77 REM-3 PIC 9(1). | |
77 REM-5 PIC 9(1). |
NewerOlder