Variable (@NotNull String name, @NotNull ImperativeCommand.Environment env) { Declaration declaration = Declaration.generate(name, env); int nAssignments = env.generateValue(Generator.integers(0, 3), null); List<Assignment> assignments = Stream.generate(() -> Assignment.generate(name, env)).limit(nAssignments).collect(Collectors.toList()); return new Variable(declaration, assignments); }