Skip to content

Instantly share code, notes, and snippets.

View gabriel-fallen's full-sized avatar

Alexander Chichigin gabriel-fallen

  • Kontur
  • Tbilisi, Georgia
View GitHub Profile
@gabriel-fallen
gabriel-fallen / wasm.pi
Last active September 1, 2022 18:59
Simple AST->WASM (text format) compiler.
%% Primitive AST->WASM (text format) compiler.
%% Type =
%% | bool
%% | int
%% | float
%% | void
show_type(bool) = "i32".
show_type(int) = "i32".
@gabriel-fallen
gabriel-fallen / insert_sort_loop_inv_preserv_why3.v
Created October 6, 2019 17:08
Verifying insertion sort with Why3.
(* This file is generated by Why3's Coq driver *)
(* Beware! Only edit allowed sections below *)
Require Import BuiltIn.
Require BuiltIn.
Require HighOrd.
Require int.Int.
Require map.Map.
(* Why3 assumption *)
Inductive ref (a:Type) :=
@gabriel-fallen
gabriel-fallen / Fibonacci_Sums.thy
Created August 18, 2019 12:42
Some theorems about Fibonacci numbers sums in Isabelle/HOL
theory Fibonacci_Sums
imports Main
begin
(* Isabelle/HOL/Isar *)
section \<open>Fibonacci numbers and their sums\<close>
fun fib :: "nat \<Rightarrow> nat" where
"fib 0 = 0" |
@gabriel-fallen
gabriel-fallen / AliasingTests.fs
Last active March 12, 2019 15:31
Trying to build an aliasing CFPQ.
namespace Tests
open System.Diagnostics
open NUnit.Framework
open AbstractAnalysis.Common
open Yard.Generators.Common.DataStructures
open Yard.Generators.GLL.AbstractParser
open Yard.Generators.GLL.ParserCommon
open GrammarCombinator.Combinators
@gabriel-fallen
gabriel-fallen / YCTest.fs
Created February 4, 2019 14:21
YaccConstructor test
namespace Test
open AbstractAnalysis.Common
open Yard.Generators.Common.DataStructures
open Yard.Generators.GLL
open Yard.Generators.GLL.AbstractParser
open GrammarCombinator.Combinators
module Test =
@gabriel-fallen
gabriel-fallen / gallery.json
Created September 26, 2018 16:17
Sample image gallery with thumbnails data.
@gabriel-fallen
gabriel-fallen / kickstarter.ows
Created September 13, 2018 18:32
Orange example workspace with Kickstarter dataset.
<?xml version='1.0' encoding='utf-8'?>
<scheme description="" title="" version="2.0">
<nodes>
<node id="0" name="Datasets" position="(246.0, 333.0)" project_name="Orange3" qualified_name="Orange.widgets.data.owdatasets.OWDataSets" title="Datasets" version="" />
<node id="1" name="Data Table" position="(424.0, 61.0)" project_name="Orange3" qualified_name="Orange.widgets.data.owtable.OWDataTable" title="Data Table" version="" />
<node id="2" name="Data Info" position="(298.0, 69.0)" project_name="Orange3" qualified_name="Orange.widgets.data.owdatainfo.OWDataInfo" title="Data Info" version="" />
<node id="3" name="Naive Bayes" position="(445.0, 446.0)" project_name="Orange3" qualified_name="Orange.widgets.model.ownaivebayes.OWNaiveBayes" title="Naive Bayes" version="" />
<node id="4" name="Test &amp; Score" position="(646.0, 444.0)" project_name="Orange3" qualified_name="Orange.widgets.evaluate.owtestlearners.OWTestLearners" title="Test &amp; Score" version="" />
<node id="5" name="ROC Analysis" pos
@gabriel-fallen
gabriel-fallen / menu.json
Last active August 13, 2018 17:52
Example for an example
[
{
"name": "Home",
"url": "/"
},
{
"name": "About",
"url": "/about",
"submenu": [
{
@gabriel-fallen
gabriel-fallen / Parser.hs
Last active March 6, 2018 17:03
Pseudohaskell for continuation-based XML SAX-parser
module Parser where
import Control.Monad.Cont
import Control.Monad.Except
import Data.ByteString
import Streaming
import qualified Streaming.Prelude as S
import Xeno.Streaming
-- | A record we want to parse from beneath unknown layers of XML
@gabriel-fallen
gabriel-fallen / Radix.thy
Created November 12, 2017 14:55
Equational proof that "treesort = radixsort" in Isabelle
theory Radix
imports Main
begin
primrec fold_right :: "('a ⇒ 'b ⇒ 'b) ⇒ 'b ⇒ 'a list ⇒ 'b" where
"fold_right f x [] = x" |
"fold_right f x (h#t) = f h (fold_right f x t)"
primrec ordered :: "('a ⇒ 'b::ord) list ⇒ 'a ⇒ 'a ⇒ bool" where
"ordered [] _ _ = True" |