<s> from calvin . actor . actor import Actor , ActionResult , manage , condition <EOL> class SumCap ( Actor ) : <EOL> """<STR_LIT>""" <EOL> @ manage ( [ '<STR_LIT>' ] ) <EOL> def init ( self ) : <EOL> self . sum = <NUM_LIT:0> <EOL> @ condition ( [ '<STR_LIT>' ] , [ '<STR_LIT>' ] ) <EOL> def sum ( self , input ) : <EOL> self . sum = self . sum + input <EOL> return ActionResult ( production = ( self . sum , ) ) <EOL> action_priority = ( sum , ) <EOL> requires = [ "<STR_LIT>" ] <EOL> test_set = [ <EOL> { <EOL> '<STR_LIT>' : { '<STR_LIT>' : [ <NUM_LIT:5> ] } , <EOL> '<STR_LIT>' : { '<STR_LIT>' : [ <NUM_LIT:5> ] } , <EOL> '<STR_LIT>' : [ lambda self : self . sum == <NUM_LIT:5> ] <EOL> } , <EOL> { <EOL> '<STR_LIT>' : { '<STR_LIT>' : [ <NUM_LIT:1> , <NUM_LIT:2> , <NUM_LIT:3> ] } , <EOL> '<STR_LIT>' : { '<STR_LIT>' : [ <NUM_LIT:6> , <NUM_LIT:8> , <NUM_LIT:11> ] } , <EOL> '<STR_LIT>' : [ lambda self : self . sum == <NUM_LIT:11> ] <EOL> } <EOL> ] </s>
