Packages

  • package root
    Definition Classes
    root
  • package be
    Definition Classes
    root
  • package opimedia
    Definition Classes
    be
  • package scala_par_am
    Definition Classes
    opimedia
  • object Main extends App

    Scala-Par-AM is a modified version of Scala-AM with the goal to study the parallelization of abstract interpretation, focused on analysis of Scheme programs.

    Scala-Par-AM is a modified version of Scala-AM with the goal to study the parallelization of abstract interpretation, focused on analysis of Scheme programs. Some unused parts of Scala-AM have been removed. The essential parts are in the machine/ sub-directory.

    This main program executes some abstract machines on some Scheme programs depending of some parameters and print results in TSV format (data separated by tabulation).

    Run with --help command line parameter to show all options:

    $ java -jar scala-par-am.jar --help
    

    Or directly with the shell script that also set some JVM configurations:

    $ ./scala-par-am.sh --help
    

    This example:

    $ ./scala-par-am.sh --files "Scheme-examples/OPi/factorial*.scm" --machines SeqAAMLS,ParAAMLSAPart,ParAAMCPart --processes 1,4,2
    
    runs on files that match the "Scheme-examples/OPi/factorial*.scm" path with machine SeqAAMLS on 1 process, with machine ParAAMLSAPart on 4 and 2 processes, and with machine ParAAMCPart with 1, 4 and 2 processes.

    scala-par-am.jar can be downloaded directly https://bitbucket.org/OPiMedia/scala-par-am/downloads/

    scala-am.jar must be accessible in the classpath to use oldAAM machine. Download it if necessary: https://bitbucket.org/OPiMedia/scala-am/downloads/

    Depending of command line parameters, for each lattice specified, for each bound, for each address, for each file Scheme program, for default step and/or step with filter, for each machine and for each number of processes this program do the following:

    1. The input Scheme program is parsed. It is done by:

    • Parsing the file as a list of s-expressions (exp/SExp.scala, exp/SExpParser.scala)
    • Compiling these s-expressions into Scheme expressions (exp/scheme/Scheme.scala)

    2. To run the program, we need an abstract machine and some semantics. Semantics definitions have to implement the Semantics interface (semantics/Semantics.scala).

    3. Once the abstract machine is created and we have a semantics for the program we want to analyze, the abstract machine can perform its evaluation, relying on methods of the semantics class to know how to evaluate expressions. The abstract machine only deals with which states to evaluate in which order, where to store values, where to store continuations, how to push and pop continuations, etc. The semantics encode what to do when encountering a program construct. For example, the semantics can tell what to evaluate next, that a continuation needs to be pushed, or that a variable needs to be updated. The abstract machine will then respectively evaluate the expression needed, push the continuation, or update the variable.

    Multiple abstract machine implementations are available, defined in the machine/ directory. Every abstract machine implementation has to implement the AbstractMachine interface (machine/AbstractMachine.scala).

    List of all available machines:

    • oldAAM: to call AAMNS (AAM No Subsumption) of Scala-AM https://bitbucket.org/OPiMedia/scala-am
    • SeqAAM: sequential machine where the worklist implemented with a list of states
    • SeqAAMS: sequential machine where the worklist implemented with a set of states
    • SeqAAMLS: sequential machine where the worklist implemented with a list of sets of states
    • SeqAAMLSH: SeqAAMLS that includes to the worklist only the not halted states
    • ParAAMLSAState: ParAAM-L-SA-state for Parallel AAM - Loop - SenderAggregator - state
    • ParAAMLSASet: ParAAM-L-SA-set for Parallel AAM - Loop - SenderAggregator - set
    • ParAAMLSAPart: ParAAM-L-SA-part for Parallel AAM - Loop - SenderAggregator - part
    • ParAAMCSState: ParAAM-C-S-state for Parallel AAM - Concurrent - Sender - state
    • ParAAMCSSet: ParAAM-C-S-set for Parallel AAM - Concurrent - Sender - set
    • ParAAMCSPart: ParAAM-C-S-part for Parallel AAM - Concurrent - Sender - part
    • ParAAMCState: ParAAM-C-state for Parallel AAM - Concurrent - state
    • ParAAMCSet: ParAAM-C-set for Parallel AAM - Concurrent - set
    • ParAAMCPart: ParAAM-C-part for Parallel AAM - Concurrent - part
    • ParAAMCHybrid: ParAAM-C-hybrid
    • ParAAMCSetH: ParAAM-C-set-halt
    • ParAAMCPartH: ParAAM-C-part-halt
    • ParAAMCHybridH: ParAAM-C-hybrid-halt

    The abstract machine also uses a lattice to represent values. Lattices should implement the JoinLattice trait that can be found in lattice/JoinLattice.scala, which provides the basic features of a lattice.

    Source https://bitbucket.org/OPiMedia/scala-par-am/src/master/scala-par-am/src/main/scala/Main.scala

    Authors:

    Olivier Pirson

    Quentin Stiévenart (for the original Scala-AM that composes the biggest part of this project)

    Definition Classes
    scala_par_am
    Version

    June 18, 2020

  • ParamsConfig

case class ParamsConfig(root: String = "", exceptsFilename: String = "", lattices: Seq[Configuration.Lattice.Value] = List(Configuration.Lattice.TypeSet), bounds: Seq[Int] = List(100), addresses: Seq[Configuration.Address.Value] = ..., filenamesPattern: String = "regex:.+\\.scm", stepFilters: Seq[Boolean] = List(false), machines: Seq[Configuration.Machine.Value] = ..., processes: Seq[Int] = List(1), filenamePrepare: String = "", nbRepetition: Int = 1, timeout: FiniteDuration = FiniteDuration(1, "day"), betweenTime: FiniteDuration = FiniteDuration(1, "second"), headerEnabled: Boolean = true, infoHeaderEnabled: Boolean = false, statsEnabled: Boolean = false, statsEscaped: Boolean = false, kamonEnabled: Boolean = false, outputGraphEnabled: Boolean = false, statsOutputGraphEnabled: Boolean = false, dotGraphEnabled: Boolean = false, isListMachines: Boolean = false, justListEnabled: Boolean = false, estimationTime: FiniteDuration = FiniteDuration(1, "second")) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParamsConfig
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParamsConfig(root: String = "", exceptsFilename: String = "", lattices: Seq[Configuration.Lattice.Value] = List(Configuration.Lattice.TypeSet), bounds: Seq[Int] = List(100), addresses: Seq[Configuration.Address.Value] = ..., filenamesPattern: String = "regex:.+\\.scm", stepFilters: Seq[Boolean] = List(false), machines: Seq[Configuration.Machine.Value] = ..., processes: Seq[Int] = List(1), filenamePrepare: String = "", nbRepetition: Int = 1, timeout: FiniteDuration = FiniteDuration(1, "day"), betweenTime: FiniteDuration = FiniteDuration(1, "second"), headerEnabled: Boolean = true, infoHeaderEnabled: Boolean = false, statsEnabled: Boolean = false, statsEscaped: Boolean = false, kamonEnabled: Boolean = false, outputGraphEnabled: Boolean = false, statsOutputGraphEnabled: Boolean = false, dotGraphEnabled: Boolean = false, isListMachines: Boolean = false, justListEnabled: Boolean = false, estimationTime: FiniteDuration = FiniteDuration(1, "second"))

Value Members

  1. val addresses: Seq[Configuration.Address.Value]
  2. val betweenTime: FiniteDuration
  3. val bounds: Seq[Int]
  4. val dotGraphEnabled: Boolean
  5. val estimationTime: FiniteDuration
  6. val exceptsFilename: String
  7. val filenamePrepare: String
  8. val filenamesPattern: String
  9. val headerEnabled: Boolean
  10. val infoHeaderEnabled: Boolean
  11. val isListMachines: Boolean
  12. val justListEnabled: Boolean
  13. val kamonEnabled: Boolean
  14. val lattices: Seq[Configuration.Lattice.Value]
  15. val machines: Seq[Configuration.Machine.Value]
  16. val nbRepetition: Int
  17. val outputGraphEnabled: Boolean
  18. val processes: Seq[Int]
  19. val root: String
  20. val statsEnabled: Boolean
  21. val statsEscaped: Boolean
  22. val statsOutputGraphEnabled: Boolean
  23. val stepFilters: Seq[Boolean]
  24. val timeout: FiniteDuration
  25. def toString(): String
    Definition Classes
    ParamsConfig → AnyRef → Any