Skip to content

Commit

Permalink
version number
Browse files Browse the repository at this point in the history
  • Loading branch information
pruemmer committed Jun 30, 2022
1 parent a8b8e52 commit cbd4d13
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lazy val commonSettings = Seq(
name := "Princess",
organization := "uuverifiers",
version := "unstable-SNAPSHOT",
version := "2022-07-01",
homepage := Some(url("https://philipp.ruemmer.org/princess.shtml")),
licenses := Seq("BSD-3-Clause" -> url("https://opensource.org/licenses/BSD-3-Clause")),
scmInfo := Some(ScmInfo(
Expand Down
2 changes: 1 addition & 1 deletion src/ap/CmdlMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import ap.util.{Debug, Seqs, Timeout}

object CmdlMain {

val version = "unstable build"
val version = "2022-07-01"

/**
* Flag to enable stack traces being fully printed, for problems
Expand Down
17 changes: 16 additions & 1 deletion src/ap/proof/tree/RandomDataSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* arithmetic with uninterpreted predicates.
* <http://www.philipp.ruemmer.org/princess.shtml>
*
* Copyright (C) 2017 Philipp Ruemmer <[email protected]>
* Copyright (C) 2017-2022 Philipp Ruemmer <[email protected]>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -63,6 +63,12 @@ abstract class RandomDataSource {
*/
def nextInt(bound : Int) : Int

/**
* Pick a random elements of the given sequence.
*/
def pick[A](objects : IndexedSeq[A]) : A =
objects(nextInt(objects.size))

/**
* Shuffle the given sequence
*/
Expand All @@ -79,6 +85,15 @@ abstract class RandomDataSource {
}
}

/**
* Shuffle the given sequence
*/
def shuffleSeq[A](seq : Seq[A]) : Seq[A] = {
val buf = seq.toBuffer
shuffle(buf)
buf.toIndexedSeq
}

/**
* Shuffle the given sequence, and return the new ordering
*/
Expand Down

0 comments on commit cbd4d13

Please sign in to comment.