You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.
joshreich edited this page Dec 5, 2014
·
5 revisions
Every Pyretic program must have a main method and import at minimum the Pyretic core library. The main method must return an instance of Pyretic's Policy class (or any descendant class). See here for some basic Pyretic policies and combinators.
For example, one of the simplest Pyretic programs you can write is
from pyretic.lib.corelib import *
def main():
return flood()
Generally you will probably want to import the Pyretic standard library as well (contains some useful functions for setting breakpoints, helpful print functions, and some convience filter policies).
from pyretic.lib.std import *
In a more advanced example, a main function can take input in the normal way