Skip to content

Commit cbd4d13

Browse files
committed
version number
1 parent a8b8e52 commit cbd4d13

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
lazy val commonSettings = Seq(
33
name := "Princess",
44
organization := "uuverifiers",
5-
version := "unstable-SNAPSHOT",
5+
version := "2022-07-01",
66
homepage := Some(url("https://philipp.ruemmer.org/princess.shtml")),
77
licenses := Seq("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")),
88
scmInfo := Some(ScmInfo(

src/ap/CmdlMain.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import ap.util.{Debug, Seqs, Timeout}
5050

5151
object CmdlMain {
5252

53-
val version = "unstable build"
53+
val version = "2022-07-01"
5454

5555
/**
5656
* Flag to enable stack traces being fully printed, for problems

src/ap/proof/tree/RandomDataSource.scala

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* arithmetic with uninterpreted predicates.
44
* <http://www.philipp.ruemmer.org/princess.shtml>
55
*
6-
* Copyright (C) 2017 Philipp Ruemmer <[email protected]>
6+
* Copyright (C) 2017-2022 Philipp Ruemmer <[email protected]>
77
*
88
* Redistribution and use in source and binary forms, with or without
99
* modification, are permitted provided that the following conditions are met:
@@ -63,6 +63,12 @@ abstract class RandomDataSource {
6363
*/
6464
def nextInt(bound : Int) : Int
6565

66+
/**
67+
* Pick a random elements of the given sequence.
68+
*/
69+
def pick[A](objects : IndexedSeq[A]) : A =
70+
objects(nextInt(objects.size))
71+
6672
/**
6773
* Shuffle the given sequence
6874
*/
@@ -79,6 +85,15 @@ abstract class RandomDataSource {
7985
}
8086
}
8187

88+
/**
89+
* Shuffle the given sequence
90+
*/
91+
def shuffleSeq[A](seq : Seq[A]) : Seq[A] = {
92+
val buf = seq.toBuffer
93+
shuffle(buf)
94+
buf.toIndexedSeq
95+
}
96+
8297
/**
8398
* Shuffle the given sequence, and return the new ordering
8499
*/

0 commit comments

Comments
 (0)