- 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
// ************************************ | |
// Git のコミットグラフのモデル | |
// ************************************ | |
open util/ordering[Time] | |
// ------------------------------------ | |
// グラフの構成要素 | |
// ------------------------------------ |
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
// ************************************************** | |
// 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
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
Require Import Ascii String. | |
Open Scope string_scope. | |
Definition Q : string := " | |
Eval compute in "" | |
Require Import Ascii String. | |
Open Scope string_scope. | |
Definition Q : string := "" ++ """" ++ Q ++ """" ++ ""."" ++ Q.". | |
Eval compute in " | |
Require Import Ascii String. | |
Open Scope string_scope. |
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 {} | |
// 簡略化のため、コインの額面とジュースの種類はそれぞれ 1 種類とする |
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
(******************************************************) | |
(** //// Validation of the "filter" Function //// *) | |
(******************************************************) | |
Require Import List Bool Lt. | |
Section Filter. | |
(*////////////////////////////////////////////////////*) |
前回の勉強会では Promela の文法要素と基本的な SPIN の使い方を眺めたので、今回は LTL 式を用いた性質検査およびハンズオンを行う。
SPIN の LTL は命題論理の拡張となっており、各論理式の真偽が状態に依存する。
NewerOlder