Regular model checking
Regular Model Checking Made Simple and Efficient
Regular Model Checking Without Transducers
Model Checking of Safety Properties
Finite presentations of infinite structures: Paper / Slide
Tuesday, December 27, 2016
Friday, November 25, 2016
DOA Tools and Mods
Documents
- Overview - http://bbs.3dmgame.com/thread-4791938-1-1.html
- Editing texture - https://www.ptt.cc/bbs/AC_In/M.1429727192.A.74B.html
- Using AutoLink - http://w11.zetaboards.com/SFxT_Mods/topic/11582418/1/
DLC Tools
Mods
Monday, November 14, 2016
Tuesday, November 8, 2016
C# performance notes
- for v.s foreach
1. for loops on List are a bit more than 2 times cheaper than foreach loops on List.
2. Looping on Array is around 2 times cheaper than looping on List.
3. As a consequence, looping on Array using for is 5 times cheaper than looping on List using foreach.
4. LinkedList only allows foreach loops, as it would take quadratic time to loop a LinkedList through indices.
5. Looping overheads: for < foreach; Array ~ List < ArrayList < LinkedList - Everything stored in an ArrayList is an object. So be careful of the boxing/unboxing overhead.
- String concatenation overheads are negligible outside loops.
Monday, October 3, 2016
Monday, May 16, 2016
Monday, May 9, 2016
Graph logics
The paper Simulate transitive closure using FO logic uses first-order theorem provers to prove transitive closures of certain binary predicates.
Courcelle's theorem
Courcelle's theorem
Friday, April 29, 2016
Sunday, April 10, 2016
Converts videos to WebM with aconv/ffmpeg
Using aconv:
http://daniemon.com/blog/how-to-convert-videos-to-webm-with-ffmpeg/
Using ffmpeg:
http://trac.ffmpeg.org/wiki/Encode/VP8
Example code:
http://daniemon.com/blog/how-to-convert-videos-to-webm-with-ffmpeg/
Using ffmpeg:
http://trac.ffmpeg.org/wiki/Encode/VP8
Example code:
ffmpeg -i $INPUT -c:v libvpx -crf 4 -b:v 10M -c:a libvorbis $OUTPUTThe above command converts the input file to webm with a variable bitrate in a constant quality mode, which ensures that every frame achieve a certain quality level. In this command,
-b:v 10M
sets the maximum allowed bitrate to 10 MBit/s and -crf 4
sets the constant quality to 4 (best quality).
Sunday, March 20, 2016
Dafny resources
Overviews
1. Getting Started with Dafny (with language reference); a shorter html version.2. Using Dafny, an Automatic Program Verifier (slide)
3. Dafny: An Automatic Program Verifier for Functional Correctness
4. Dafny: Statically Verifying Functional Correctness.
5. Type system of Dafny / Proving theorems with Dafny.
5. Type system of Dafny / Proving theorems with Dafny.
Lecture notes
Verified programming in DafnyForums & blogs
Dafny questions on StackOverflow / The official Dafny forum / Lexical scopeAdvanced topics
Non-determinismData refinement
Calculational proof
Triggers
Thursday, March 10, 2016
Git notes
Basics
Add new changes to the last commit:git commit FILES --amend (-m "new messages")See staged changes
git diff --stagedModify commit and update date
git commit --amend --date="Mon Mar 7 22:40:51 2016 +0800" GIT_COMMITTER_DATE="Mon Mar 7 22:40:51 2016 +0800" git commit --amendDelete remote branch at repo origin
git push origin :BRANCH_NAMEreflog helps you recover a deleted branch or a commit deleted by hard-reset:
git log --walk-reflogs # get SHA of the deleted commitTo recover a commit, use
git reset --hard COMMIT_SHA # recover the deleted commitTo recover a branch, use
git branch BRANCH_NAME BRANCH_HEAD_SHA # recover the branch
Work with branch
1. First checkout to a feature branch and work there.2. Go back to the master branch and make commits.
3. Rebase master in the feature branch.
Create a new branch starting from a commit:
git branch BRANCH_NAME COMMIT_SHASome Git log formats:
git log --oneline git log --oneline --stat git log --oneline --graph git log --oneline --patchUse recursive merge instead of fast-forward merge to keep commits in the feature branch after merging:
git checkout master git merge --no-ff BRANCH_NAME
Fix line feeds
1. Suppose you have a project of which the contributors work on both Linux/OSX and Windows. On Linux/Cygwin/OSX, you should setgit config --global core.autocrlf inputto fix Windows LFs that get introduced. On Windows, you should set
git config --global core.autocrlf trueto change LF to CR/LF on checkout and convert back to LF on commit. So the line feeds in the project are always LF. When running the Git installer for Windows, you should choose "Checkout Windows-style, commit Unix-style line endings", which automatically sets core.autocrlf to true.
2. Sometimes, your project contains files for both Linux and Windows (e.g., a .NET project with Cygwin bash scripts). In such case, the line-feed conflicts cannot be resolved by simply setting autocrlf. One solution to this problem is to set
git config --global core.whitespace cr-at-eolThis basically tells Git that an end-of-line CR is not an error. As a result, those annoying ^M characters in Windows files no longer appear at the end of lines in
git diff
, git show
, etc. Note that extra spaces at the end of a line still show as errors (highlighted in red) in the diff.Submodules
1. Clone a repo as a submodule of the current repogit submodule add REPO_URL DIRNAME cd DIRNAME git checkout master2. Note that if we commit changes in a submodule, we also have to commit its parent repo to point to head of the new submodule. Hence, whenever you update a submodule, you need to commit and push twice---one for the submodule and one for its parent repo. To avoid chores, you can do the following in the parent repo:
a) Use
git push --recurse-submodules=check
. This option can check whether you have un-pushed submodules. Orb) Use
git push --recurse-submodules=on-demand
. This way submodules that need it will be pushed automatically.3. To clone a repo that contains submodules, we have to initialize the submodules after clone the repo:
git submodule initUpdate the submodules to get the files inside:
git submodule updateNote that each time after you update a submodule, you will be put in a "headless" state, i.e., in a non-existing branch. We have to checkout to a branch (such as master) and do our work there.
Friday, March 4, 2016
IDE shortcuts
Visual Studio:
http://visualstudioshortcuts.com/2015/
IntelliJ Idea:
https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard.pdf
http://visualstudioshortcuts.com/2015/
IntelliJ Idea:
https://www.jetbrains.com/idea/docs/IntelliJIDEA_ReferenceCard.pdf
Saturday, February 6, 2016
Loop invariant resources
Synthesis
Inferring loop invariants using post-conditions:http://se.ethz.ch/~meyer/publications/proofs/invariant_inference.pdf
Generating loop invariants using predicate abstraction
https://hal.inria.fr/inria-00615623/document
Boogie uses abstract interpretation to infer loop invariants:
http://research.microsoft.com/en-us/um/people/leino/papers/krml160.pdf
Tools
Boogie overview slidehttp://webcourse.cs.technion.ac.il/236800/Winter2010-2011/ho/WCFiles/Boogie.pdf
Saturday, January 16, 2016
Friday, January 8, 2016
NF, HNF and WHNF
WHNF: a lambda expr or a constructor
HNF: a lambda expr where the function body is a NF
NF: a term that contains no beta regex
A discussion in SO about stack overflow is particularly interesting to me. I thought the strict version of foldl evaluates to NF, but it in fact only evaluates to WHNF. This is why summing up tuples doesn't evaluate the components, another thing I misunderstood.
HNF: a lambda expr where the function body is a NF
NF: a term that contains no beta regex
A discussion in SO about stack overflow is particularly interesting to me. I thought the strict version of foldl evaluates to NF, but it in fact only evaluates to WHNF. This is why summing up tuples doesn't evaluate the components, another thing I misunderstood.
Subscribe to:
Posts (Atom)