diff --git a/docs/spec/generated/AvlTree_methods.tex b/docs/spec/generated/AvlTree_methods.tex index 98fe28c7e2..677f5af983 100644 --- a/docs/spec/generated/AvlTree_methods.tex +++ b/docs/spec/generated/AvlTree_methods.tex @@ -60,7 +60,7 @@ \subsubsection{\lst{AvlTree.keyLength} method (Code 100.3)} \hline \bf{Description} & - \\ + \\ \hline \bf{Parameters} & @@ -215,6 +215,15 @@ \subsubsection{\lst{AvlTree.contains} method (Code 100.9)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Checks if an entry with key `key` exists in this tree using proof `proof`. + * Throws exception if proof is incorrect + + * @note CAUTION! Does not support multiple keys check, use [[getMany]] instead. + * Return `true` if a leaf with the key `key` exists + * Return `false` if leaf with provided key does not exist. + * @param key a key of an element of this authenticated dictionary. + * @param proof + */ \\ @@ -241,6 +250,15 @@ \subsubsection{\lst{AvlTree.get} method (Code 100.10)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Perform a lookup of key `key` in this tree using proof `proof`. + * Throws exception if proof is incorrect + * + * @note CAUTION! Does not support multiple keys check, use [[getMany]] instead. + * Return Some(bytes) of leaf with key `key` if it exists + * Return None if leaf with provided key does not exist. + * @param key a key of an element of this authenticated dictionary. + * @param proof + */ \\ @@ -267,6 +285,13 @@ \subsubsection{\lst{AvlTree.getMany} method (Code 100.11)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Perform a lookup of many keys `keys` in this tree using proof `proof`. + * + * @note CAUTION! Keys must be ordered the same way they were in lookup before proof was generated. + * For each key return Some(bytes) of leaf if it exists and None if is doesn't. + * @param keys keys of elements of this authenticated dictionary. + * @param proof + */ \\ @@ -293,6 +318,15 @@ \subsubsection{\lst{AvlTree.insert} method (Code 100.12)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Perform insertions of key-value entries into this tree using proof `proof`. + * Throws exception if proof is incorrect + * + * @note CAUTION! Pairs must be ordered the same way they were in insert ops before proof was generated. + * Return Some(newTree) if successful + * Return None if operations were not performed. + * @param operations collection of key-value pairs to insert in this authenticated dictionary. + * @param proof + */ \\ @@ -319,6 +353,15 @@ \subsubsection{\lst{AvlTree.update} method (Code 100.13)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Perform updates of key-value entries into this tree using proof `proof`. + * Throws exception if proof is incorrect + * + * @note CAUTION! Pairs must be ordered the same way they were in update ops before proof was generated. + * Return Some(newTree) if successful + * Return None if operations were not performed. + * @param operations collection of key-value pairs to update in this authenticated dictionary. + * @param proof + */ \\ @@ -345,6 +388,15 @@ \subsubsection{\lst{AvlTree.remove} method (Code 100.14)} \begin{tabularx}{\textwidth}{| l | X |} \hline \bf{Description} & + /** Perform removal of entries into this tree using proof `proof`. + * Throws exception if proof is incorrect + * Return Some(newTree) if successful + * Return None if operations were not performed. + * + * @note CAUTION! Keys must be ordered the same way they were in remove ops before proof was generated. + * @param operations collection of keys to remove from this authenticated dictionary. + * @param proof + */ \\ diff --git a/docs/spec/generated/SCollection_methods.tex b/docs/spec/generated/SCollection_methods.tex index a283a0e03c..d78b423136 100644 --- a/docs/spec/generated/SCollection_methods.tex +++ b/docs/spec/generated/SCollection_methods.tex @@ -296,8 +296,6 @@ \subsubsection{\lst{SCollection.flatMap} method (Code 12.15)} \hline \bf{Description} & Builds a new collection by applying a function to all elements of this collection and using the elements of the resulting collections. - Function \lst{f} is constrained to be of the form \lst{x => x.someProperty}, otherwise - it is illegal. Returns a new collection of type \lst{Coll[B]} resulting from applying the given collection-valued function \lst{f} to each element of this collection and concatenating the results. \\ @@ -324,7 +322,7 @@ \subsubsection{\lst{SCollection.patch} method (Code 12.19)} \noindent \begin{tabularx}{\textwidth}{| l | X |} \hline - \bf{Description} & \\ + \bf{Description} & Produces a new Coll where a slice of elements in this Coll is replaced by another Coll. \\ \hline \bf{Parameters} & @@ -348,7 +346,7 @@ \subsubsection{\lst{SCollection.updated} method (Code 12.20)} \noindent \begin{tabularx}{\textwidth}{| l | X |} \hline - \bf{Description} & \\ + \bf{Description} & A copy of this Coll with one single replaced element. \\ \hline \bf{Parameters} & diff --git a/docs/spec/generated/predeftypes.tex b/docs/spec/generated/predeftypes.tex index 1d71cdec3f..2ed5172c0e 100644 --- a/docs/spec/generated/predeftypes.tex +++ b/docs/spec/generated/predeftypes.tex @@ -1,27 +1,31 @@ -\lst{Boolean} & $1$ & \lst{true} & \lst{true} & \lst{true} & \lst{false} & $\Set{\lst{true}, \lst{false}}$ \\ +\lst{Boolean} & $1$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{false} & $\Set{\lst{true}, \lst{false}}$ \\ \hline -\lst{Byte} & $2$ & \lst{true} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{7} \dots 2^{7}-1}$~\ref{sec:type:Byte} \\ +\lst{Byte} & $2$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{7} \dots 2^{7}-1}$~\ref{sec:type:Byte} \\ \hline -\lst{Short} & $3$ & \lst{true} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{15} \dots 2^{15}-1}$~\ref{sec:type:Short} \\ +\lst{Short} & $3$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{15} \dots 2^{15}-1}$~\ref{sec:type:Short} \\ \hline -\lst{Int} & $4$ & \lst{true} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{31} \dots 2^{31}-1}$~\ref{sec:type:Int} \\ +\lst{Int} & $4$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{31} \dots 2^{31}-1}$~\ref{sec:type:Int} \\ \hline -\lst{Long} & $5$ & \lst{true} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{63} \dots 2^{63}-1}$~\ref{sec:type:Long} \\ +\lst{Long} & $5$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{63} \dots 2^{63}-1}$~\ref{sec:type:Long} \\ \hline -\lst{BigInt} & $6$ & \lst{true} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{255} \dots 2^{255}-1}$~\ref{sec:type:BigInt} \\ +\lst{BigInt} & $6$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{true} & $\Set{-2^{255} \dots 2^{255}-1}$~\ref{sec:type:BigInt} \\ \hline -\lst{GroupElement} & $7$ & \lst{true} & \lst{true} & \lst{true} & \lst{false} & $\Set{p \in \lst{SecP256K1Point}}$ \\ +\lst{GroupElement} & $7$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{false} & $\Set{p \in \lst{SecP256K1Point}}$ \\ \hline -\lst{SigmaProp} & $8$ & \lst{true} & \lst{true} & \lst{true} & \lst{false} & Sec.~\ref{sec:type:SigmaProp} \\ +\lst{SigmaProp} & $8$ & \lst{isConst} & \lst{true} & \lst{true} & \lst{false} & Sec.~\ref{sec:type:SigmaProp} \\ \hline -\lst{Box} & $99$ & \lst{false} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Box} \\ +\lst{Any} & $97$ & \lst{isConst} & \lst{true} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Any} \\ \hline -\lst{AvlTree} & $100$ & \lst{true} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:AvlTree} \\ +\lst{Unit} & $98$ & \lst{isConst} & \lst{true} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Unit} \\ \hline -\lst{Context} & $101$ & \lst{false} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Context} \\ +\lst{Box} & $99$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Box} \\ \hline -\lst{Header} & $104$ & \lst{true} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Header} \\ +\lst{AvlTree} & $100$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:AvlTree} \\ \hline -\lst{PreHeader} & $105$ & \lst{true} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:PreHeader} \\ +\lst{Context} & $101$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Context} \\ \hline -\lst{Global} & $106$ & \lst{true} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Global} \\ \ No newline at end of file +\lst{Header} & $104$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Header} \\ +\hline +\lst{PreHeader} & $105$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:PreHeader} \\ +\hline +\lst{Global} & $106$ & \lst{isConst} & \lst{false} & \lst{false} & \lst{false} & Sec.~\ref{sec:type:Global} \\ \ No newline at end of file diff --git a/docs/spec/spec.pdf b/docs/spec/spec.pdf index c3ba73e746..7615fa57f6 100644 Binary files a/docs/spec/spec.pdf and b/docs/spec/spec.pdf differ