Skip to content

Instantly share code, notes, and snippets.

View radustoenescu's full-sized avatar

Radu Stoenescu radustoenescu

  • Politehnica Bucharest
  • Bucharest
View GitHub Profile
@radustoenescu
radustoenescu / policy.md
Last active October 21, 2020 13:48
Policy language description and examples
rule:                   name(params) WHEN activation_condition
                                     [LET bindings]
                                     THEN actions
                                     [EXPIRES trigger]
                                     [PRIORITY val]
activation_condition:   bool_exp
binding            :   variable = expression ...
expression          :   variable | header_fields | arithm_op ...
@radustoenescu
radustoenescu / docker.md
Created January 7, 2020 11:52
docker notes

Dockerfile + docker build . => Docker image

docker tag 66c76cea05bb image_name

docker run -i -t --name container_name image_name

@radustoenescu
radustoenescu / know.md
Last active January 13, 2020 07:25
list of nice things

bash

!$ - last argument of prev command

!* - all arguments of prev command

python

virtualenv env

translation unit
extern vs. static linkage
@radustoenescu
radustoenescu / software-analysis.md
Last active December 16, 2019 14:55
software analysis

automatically discover useful facts about programs dynamic tools can only infer likely invariants abstract state <- collections of concrete states

static alanysis sacrifices completeness?! but soundness is ok

iterative approximation

sound - all claims are true (no false positives) complete- if there is anything to claim, it will be claimed (no false negatives)

@radustoenescu
radustoenescu / software-analysis.md
Created December 16, 2019 14:52
software analysis

automatically discover useful facts about programs dynamic tools can only infer likely invariants abstract state <- collections of concrete states

static alanysis sacrifices completeness?! but soundness is ok

iterative approximation

sound - all claims are true (no false positives) complete- if there is anything to claim, it will be claimed (no false negatives)

@radustoenescu
radustoenescu / software-analysis.md
Created December 16, 2019 14:52
software analysis

automatically discover useful facts about programs dynamic tools can only infer likely invariants abstract state <- collections of concrete states

static alanysis sacrifices completeness?! but soundness is ok

iterative approximation

sound - all claims are true (no false positives) complete- if there is anything to claim, it will be claimed (no false negatives)

Little typer

  • Normal forms
  • Sameness according to a type
  • 2 values the same <-> same normal form
  • values the same if same constructor applied to the same values
  • expression with constructor at top -> value
  • constructors are the direct way of constructing expressions of that type
  • value enough because the top-level ctor will dictate what happens next
  • eliminators take apart values created by data constructors
  • lambda is data ctor for functions
@radustoenescu
radustoenescu / llvm-build.sh
Last active December 30, 2019 14:38
make llvm
apt-get install -y libssl-dev python zlib1g make clang re2c lld
git clone https://github.com/llvm/llvm-project.git
git clone https://github.com/martine/ninja.git
git clone https://github.com/Kitware/CMake.git
cd ninja/
CXX=clang++ ./configure.py --bootstrap
cp ninja /usr/bin/
cd ..