1
0
forked from GitHub/gf-core

expose the random generation API

This commit is contained in:
Krasimir Angelov
2024-01-12 19:08:58 +01:00
parent 1a840d5cee
commit 73b4b68460
3 changed files with 61 additions and 1 deletions

View File

@@ -114,6 +114,15 @@ class PGF:
"""
...
def generateRandom(cat : Type, depth : int = 5) -> tuple[Expr,float]:
"""
Generates a random abstract syntax trees of the given type.
The depth parameter specifies the maximal distance between
the root and a leaf in the tree. The float value in
the result is the probability of the tree.
"""
...
def newTransaction(self) -> Transaction:
"""
Starts a new transaction which makes it possible to update