Unix filesystem and graph constraints Nicolas Jeannerod Journ´ ees PPS, October 12, 2017 Nicolas Jeannerod Journ´ ees PPS October 12, 2017 1 / 21
The CoLiS project T1 Shell Script P Paris L Lille S Saclay P Compiler S,P CoLiS Program T3 T2 Deep Embedding Translator Symbolic Tree Tree Interpreter S,P Execution Constraints Transducers L,P Incremental Equivalence Simplification Test Nicolas Jeannerod Journ´ ees PPS October 12, 2017 2 / 21
The CoLiS project T1 Shell Script P Paris L Lille S Saclay P Compiler S,P CoLiS Program T3 T2 Deep Embedding Translator Symbolic Tree Tree Interpreter S,P Execution Constraints Transducers L,P Incremental Equivalence Simplification Test Nicolas Jeannerod Journ´ ees PPS October 12, 2017 2 / 21
Description of file systems Unix file system Table of Contents 1. Description of file systems Unix file system Static description Directory update 2. Tree constraints Definitions Basic constraints Existential and first order constraints Nicolas Jeannerod Journ´ ees PPS October 12, 2017 3 / 21
Description of file systems Unix file system Unix file system / usr etc lib lib root libc.so libc.so.6 Basically a tree with labelled nodes and edges; There can be sharing at the leafs (hard link between files); There can be pointers to other parts of the tree (symbolic links) which may form cycles. Nicolas Jeannerod Journ´ ees PPS October 12, 2017 4 / 21
Description of file systems Unix file system Unix file system / usr etc lib lib root libc.so libc.so.6 Basically a tree with labelled nodes and edges; There can be sharing at the leafs (hard link between files); There can be pointers to other parts of the tree (symbolic links) which may form cycles. Nicolas Jeannerod Journ´ ees PPS October 12, 2017 4 / 21
Description of file systems Unix file system Unix file system / usr etc lib lib root libc.so libc.so.6 Basically a tree with labelled nodes and edges; There can be sharing at the leafs (hard link between files); There can be pointers to other parts of the tree (symbolic links) which may form cycles. Nicolas Jeannerod Journ´ ees PPS October 12, 2017 4 / 21
Description of file systems Unix file system Unix file system / usr etc lib lib root libc.so libc.so.6 Basically a tree with labelled nodes and edges; There can be sharing at the leafs (hard link between files); There can be pointers to other parts of the tree (symbolic links) which may form cycles. Nicolas Jeannerod Journ´ ees PPS October 12, 2017 4 / 21
Description of file systems Static description Table of Contents 1. Description of file systems Unix file system Static description Directory update 2. Tree constraints Definitions Basic constraints Existential and first order constraints Nicolas Jeannerod Journ´ ees PPS October 12, 2017 5 / 21
Description of file systems Static description Static description / usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description / usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description r usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description r usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description r usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description r usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Static description Static description r usr etc v w lib skel x u ∅ ocaml � � ∃ u, v, x, w. r [ usr ] v ∧ v [ lib ] x ∧ x [ ocaml ] ↑ � r � ∧ r [ etc ] w ∧ w [ skel ] u ∧ u ∅ � Nicolas Jeannerod Journ´ ees PPS October 12, 2017 6 / 21
Description of file systems Directory update Table of Contents 1. Description of file systems Unix file system Static description Directory update 2. Tree constraints Definitions Basic constraints Existential and first order constraints Nicolas Jeannerod Journ´ ees PPS October 12, 2017 7 / 21
Description of file systems Directory update Directory update r r ′ usr usr etc etc v w w v ′ mkdir /usr/lib/ocaml lib lib x x ′ ocaml ocaml y ′ ∅ We want something like: r ′ = r [ usr → v ′ ] ∧ v ′ = v [ lib → x ′ ] ∧ x ′ = x [ ocaml → y ′ ] ∧ y ′ ∅ Nicolas Jeannerod Journ´ ees PPS October 12, 2017 8 / 21
Description of file systems Directory update Directory update r r ′ usr usr etc etc v w w v ′ mkdir /usr/lib/ocaml lib lib x x ′ ocaml ocaml y ′ ∅ We want something like: r ′ = r [ usr → v ′ ] ∧ v ′ = v [ lib → x ′ ] ∧ x ′ = x [ ocaml → y ′ ] ∧ y ′ ∅ Nicolas Jeannerod Journ´ ees PPS October 12, 2017 8 / 21
Description of file systems Directory update Directory update r r ′ usr usr etc etc v w w v ′ mkdir /usr/lib/ocaml lib lib x x ′ ocaml ocaml y ′ ∅ We want something like: r ′ = r [ usr → v ′ ] ∧ v ′ = v [ lib → x ′ ] ∧ x ′ = x [ ocaml → y ′ ] ∧ y ′ ∅ Nicolas Jeannerod Journ´ ees PPS October 12, 2017 8 / 21
Description of file systems Directory update Directory update r r ′ usr usr etc etc v w w v ′ mkdir /usr/lib/ocaml lib lib x x ′ ocaml ocaml y ′ ∅ We want something like: r ′ = r [ usr → v ′ ] ∧ v ′ = v [ lib → x ′ ] ∧ x ′ = x [ ocaml → y ′ ] ∧ y ′ ∅ Nicolas Jeannerod Journ´ ees PPS October 12, 2017 8 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Description of file systems Directory update Er.. is that really what we want? Asymmetric: y = x [ f → v ] Makes it hard to eliminate variables: y = x [ f → v ] ∧ z = x [ g → w ] Contains in fact two pieces of information: “ y and x are different in f , identical everywhere else”: y ∼ f x “ y points to v through f ”: y [ f ] v Nicolas Jeannerod Journ´ ees PPS October 12, 2017 9 / 21
Recommend
More recommend