Skip to content

Commit

Permalink
Rust catch-up (#273)
Browse files Browse the repository at this point in the history
* Add wands to the ast

Signed-off-by: Sacha Ayoun <[email protected]>

* Add a wands set to the pstate

Signed-off-by: Sacha Ayoun <[email protected]>

* defunctorize things that are only ever instantiated to be symbolic

Signed-off-by: Sacha Ayoun <[email protected]>

* some fixes

Signed-off-by: Sacha Ayoun <[email protected]>

* Can produce and consume wands

Signed-off-by: Sacha Ayoun <[email protected]>

* basic support for wands in WISL

Signed-off-by: Sacha Ayoun <[email protected]>

* Add package to the syntax, start implementing

Signed-off-by: Sacha Ayoun <[email protected]>

* magic wand is implemented!

Signed-off-by: Sacha Ayoun <[email protected]>

* add parsing for magic wands

Signed-off-by: Sacha Ayoun <[email protected]>

* adds non-empty check for packaging wands

Signed-off-by: Sacha Ayoun <[email protected]>

* use consumer and producers insteda of get/set/rem

Signed-off-by: Sacha Ayoun <[email protected]>

* Add splitting mechanism, can't implement its usage in unifier yet

Signed-off-by: Sacha Ayoun <[email protected]>

* license date update

Signed-off-by: Sacha Ayoun <[email protected]>

* implement master unification plans

Signed-off-by: Sacha Ayoun <[email protected]>

* splitting mechanism for wand footprint consumption is working!

Signed-off-by: Sacha Ayoun <[email protected]>

* package lcmd improve printing

Signed-off-by: Sacha Ayoun <[email protected]>

* some extensions

Signed-off-by: Sacha Ayoun <[email protected]>

* removing batteries, updating printbox yada yada yada

Signed-off-by: Sacha Ayoun <[email protected]>

* remove printbox_text dependency of core

Signed-off-by: Sacha Ayoun <[email protected]>

* extract_head passes in Gillian-Rust

Signed-off-by: Sacha Ayoun <[email protected]>

* fix pretty printing of apply_lem

Signed-off-by: Sacha Ayoun <[email protected]>

* attempt at something

Signed-off-by: Sacha Ayoun <[email protected]>

* Revert "attempt at something"

This reverts commit a9b728c.

* add shl infix for Expr

Signed-off-by: Sacha Ayoun <[email protected]>

* forgot to expose

Signed-off-by: Sacha Ayoun <[email protected]>

* add utility

Signed-off-by: Sacha Ayoun <[email protected]>

* slight optim of div

Signed-off-by: Sacha Ayoun <[email protected]>

* helpers

Signed-off-by: Sacha Ayoun <[email protected]>

* temp hack

Signed-off-by: Sacha Ayoun <[email protected]>

* adds implication to the language of formulae

Signed-off-by: Sacha Ayoun <[email protected]>

* udpate z3

Signed-off-by: Sacha Ayoun <[email protected]>

* Revert "udpate z3"

This reverts commit 6730699.

* specialized simpl

* add support for repeat operation

Signed-off-by: Sacha Ayoun <[email protected]>

* expose Expr.list_repeat

Signed-off-by: Sacha Ayoun <[email protected]>

* debug

Signed-off-by: Sacha Ayoun <[email protected]>

* can learn last element of a list also

Signed-off-by: Sacha Ayoun <[email protected]>

* second step of merge, kanillian but only the trivial part

* done

* esy-gmp fix

* fix normalisation of pure expressions

Signed-off-by: Sacha Ayoun <[email protected]>

* PC.Dummy exposes annot type

* forgot to expose in mli

---------

Signed-off-by: Sacha Ayoun <[email protected]>
  • Loading branch information
giltho authored Dec 12, 2023
1 parent 5ac2402 commit c7bbb9e
Show file tree
Hide file tree
Showing 106 changed files with 4,213 additions and 3,923 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
with:
python-version: "3.10"
- name: Installing esy
run: sudo npm install -g esy@0.6.12 --unsafe-perm
run: sudo npm install -g esy@0.7.2 --unsafe-perm
- name: Installing Python prerequisites
run: sudo pip install sphinx furo
- name: Restore Cache
id: restore-cache
uses: actions/cache@v3
with:
path: _export
key: ${{ runner.os }}-esy-0.6.12-${{ hashFiles('esy.lock/index.json') }}
key: ${{ runner.os }}-esy-0.7.2-${{ hashFiles('esy.lock/index.json') }}
restore-keys: |
${{ runner.os }}-esy-0.6.12-
${{ runner.os }}-esy-0.7.2-
- name: Esy install
run: "esy install"
- name: Import Cache
Expand Down Expand Up @@ -280,9 +280,9 @@ jobs:
uses: actions/cache@v3
with:
path: _export
key: docker-esy-0.6.12-${{ hashFiles('esy.lock/index.json') }}
key: docker-esy-0.7.2-${{ hashFiles('esy.lock/index.json') }}
restore-keys: |
docker-esy-0.6.12-
docker-esy-0.7.2-
- name: build and export docker image
uses: docker/build-push-action@v4
with:
Expand Down
25 changes: 1 addition & 24 deletions Gillian-C/lib/CMemory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -151,27 +151,4 @@ let execute_action name heap params =
| AMem Free -> execute_free heap params
| AMem Move -> execute_move heap params
| AGEnv GetDef -> execute_genvgetdef heap params
| AMem
( GetSingle
| SetSingle
| RemSingle
| GetArray
| SetArray
| RemArray
| GetBounds
| SetBounds
| RemBounds
| GetHole
| SetHole
| RemHole
| GetZeros
| SetZeros
| RemZeros
| GetFreed
| SetFreed
| RemFreed ) ->
failwith
(Printf.sprintf
"%s is an action related to a General Assertion, it should never be \
called during a concrete execution"
name)
| AMem SetZeros -> failwith "cannot execute set_zeros in concrete memory"
86 changes: 0 additions & 86 deletions Gillian-C/lib/LActions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,7 @@ type mem_ac =
| Load
| Free
| Move
| GetSingle
| SetSingle
| RemSingle
| GetArray
| SetArray
| RemArray
| GetHole
| SetHole
| RemHole
| GetZeros
| SetZeros
| RemZeros
| GetBounds
| SetBounds
| RemBounds
| GetFreed
| SetFreed
| RemFreed

type genv_ac = GetDef
type ac = AGEnv of genv_ac | AMem of mem_ac
Expand All @@ -38,36 +21,6 @@ type ga = Single | Array | Hole | Zeros | Bounds | Freed

let is_overlapping_asrt _ = false

let ga_to_setter ga =
AMem
(match ga with
| Single -> SetSingle
| Array -> SetArray
| Hole -> SetHole
| Zeros -> SetZeros
| Bounds -> SetBounds
| Freed -> SetFreed)

let ga_to_getter ga =
AMem
(match ga with
| Single -> GetSingle
| Array -> GetArray
| Hole -> GetHole
| Zeros -> GetZeros
| Bounds -> GetBounds
| Freed -> GetFreed)

let ga_to_deleter ga =
AMem
(match ga with
| Single -> RemSingle
| Array -> RemArray
| Hole -> RemHole
| Zeros -> RemZeros
| Bounds -> RemBounds
| Freed -> RemFreed)

(* Then serialization and deserialization functions *)

let mem_prefix = "mem"
Expand All @@ -82,24 +35,7 @@ let str_mem_ac = function
| Load -> "load"
| Move -> "move"
| Free -> "free"
| GetSingle -> "getSingle"
| SetSingle -> "setSingle"
| RemSingle -> "remSingle"
| GetArray -> "getArray"
| SetArray -> "setArray"
| RemArray -> "remArray"
| GetBounds -> "getBounds"
| SetBounds -> "setBounds"
| RemBounds -> "remBounds"
| GetHole -> "getHole"
| SetHole -> "setHole"
| RemHole -> "remHole"
| GetZeros -> "getZeros"
| SetZeros -> "setZeros"
| RemZeros -> "remZeros"
| GetFreed -> "getFreed"
| SetFreed -> "setFreed"
| RemFreed -> "remFreed"

let mem_ac_from_str = function
| "alloc" -> Alloc
Expand All @@ -110,24 +46,7 @@ let mem_ac_from_str = function
| "load" -> Load
| "free" -> Free
| "move" -> Move
| "getSingle" -> GetSingle
| "setSingle" -> SetSingle
| "remSingle" -> RemSingle
| "getArray" -> GetArray
| "setArray" -> SetArray
| "remArray" -> RemArray
| "getBounds" -> GetBounds
| "setBounds" -> SetBounds
| "remBounds" -> RemBounds
| "getHole" -> GetHole
| "setHole" -> SetHole
| "remHole" -> RemHole
| "getZeros" -> GetZeros
| "setZeros" -> SetZeros
| "remZeros" -> RemZeros
| "getFreed" -> GetFreed
| "setFreed" -> SetFreed
| "remFreed" -> RemFreed
| s -> failwith ("Unkown Memory Action : " ^ s)

let str_genv_ac = function
Expand Down Expand Up @@ -168,11 +87,6 @@ let ga_from_str = function
| "mem_freed" -> Freed
| str -> failwith ("Unkown memory assertion : " ^ str)

let ga_to_action_str action str = ga_from_str str |> action |> str_ac
let ga_to_setter_str = ga_to_action_str ga_to_setter
let ga_to_getter_str = ga_to_action_str ga_to_getter
let ga_to_deleter_str = ga_to_action_str ga_to_deleter

(** Additional stuff *)

let is_overlapping_asrt_str str = ga_from_str str |> is_overlapping_asrt
26 changes: 0 additions & 26 deletions Gillian-C/lib/LActions.mli
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,7 @@ type mem_ac =
| Load
| Free
| Move
| GetSingle
| SetSingle
| RemSingle
| GetArray
| SetArray
| RemArray
| GetHole
| SetHole
| RemHole
| GetZeros
| SetZeros
| RemZeros
| GetBounds
| SetBounds
| RemBounds
| GetFreed
| SetFreed
| RemFreed

type genv_ac = GetDef

Expand All @@ -45,19 +28,10 @@ val str_ac : ac -> string
(** Deserializes a string into an action *)
val ac_from_str : string -> ac

(** {3 Global assertion and their actions} *)

val ga_to_setter : ga -> ac
val ga_to_getter : ga -> ac
val ga_to_deleter : ga -> ac

(** {3 Global assertion serialization } *)

val str_ga : ga -> string
val ga_from_str : string -> ga
val ga_to_setter_str : string -> string
val ga_to_getter_str : string -> string
val ga_to_deleter_str : string -> string

(** {3 Gillian-related things} *)

Expand Down
Loading

0 comments on commit c7bbb9e

Please sign in to comment.