Skip to content

Instantly share code, notes, and snippets.

@LCamel
Last active July 23, 2025 03:29
Show Gist options
  • Save LCamel/2b757a03ee2eb3db9ff21ed55b5be199 to your computer and use it in GitHub Desktop.
Save LCamel/2b757a03ee2eb3db9ff21ed55b5be199 to your computer and use it in GitHub Desktop.
GCL digHoles: old source
json: decoding request
JSON content: {"filePath":"/workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl"}
json: decoding succeeded
Reload handler >>>> /workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl
load: start
ask file state ref
ask file state map
lookup file state map
found
source read
===================================================
con A, B : Int { A > 0 }
var gcd : Int -> Int -> Int
var x, y : Int
x, y := A, B
{ gcd x y = gcd A B,
bnd: x + y }
do x < y -> y := y - x
| x > y -> x := x - y
od
?
{ x = gcd A B }
===================================================
source parsed
should dig holes
< DigHoles [/workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl [169-170] 12:1-2]222
load: end
Reload handler <<<< /workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl
holes digged
load: start
ask file state ref
ask file state map
lookup file state map
found
source read
===================================================
con A, B : Int { A > 0 }
var gcd : Int -> Int -> Int
var x, y : Int
x, y := A, B
{ gcd x y = gcd A B,
bnd: x + y }
do x < y -> y := y - x
| x > y -> x := x - y
od
?
{ x = gcd A B }
===================================================
source parsed
should dig holes
< DigHoles [/workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl [169-170] 12:1-2]222
load: end
STextDocumentDidChange start
ask file state ref
ask file state map
lookup file state map
found
====== /workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl ======
ask file state ref
ask file state map
lookup file state map
found
loaded
[]
=======================
didChange: fileState modified
ask file state ref
ask file state map
lookup file state map
found
didChange: upate notification sent
STextDocumentDidChange end
holes digged
load: start
ask file state ref
ask file state map
lookup file state map
found
source read
===================================================
con A, B : Int { A > 0 }
var gcd : Int -> Int -> Int
var x, y : Int
x, y := A, B
{ gcd x y = gcd A B,
bnd: x + y }
do x < y -> y := y - x
| x > y -> x := x - y
od
[!
!]
{ x = gcd A B }
===================================================
source parsed
all holes digged
abstract program generated
program elaborated
fileState created
fileState updated
load: success
ask file state ref
ask file state map
lookup file state map
found
load: update notification sent
load: end
STextDocumentDidChange start
ask file state ref
ask file state map
lookup file state map
found
====== /workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl ======
ask file state ref
ask file state map
lookup file state map
found
loaded
[(8,/workspaces/gcl-all/gcl-vscode/example/gcd_2.gcl [-1--1] 12:1-16:3)]
=======================
didChange: fileState modified
ask file state ref
ask file state map
lookup file state map
found
didChange: upate notification sent
STextDocumentDidChange end
semantic token: start
ask file state ref
ask file state map
lookup file state map
found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment