Skip to content

Commit

Permalink
enabled scalafix organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
nikololiahim committed May 20, 2022
1 parent 2193d2b commit bd5bca5
Show file tree
Hide file tree
Showing 31 changed files with 196 additions and 157 deletions.
2 changes: 1 addition & 1 deletion .scalafix.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
rules = [
ExplicitResultTypes,
NoAutoTupling,
RemoveUnused,
OrganizeImports,
DisableSyntax,
LeakingImplicitClassVal,
NoValInForComprehension,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.polystat.odin.analysis

import cats._
import cats.data.{EitherNel, NonEmptyList}
import cats.data.EitherNel
import cats.data.NonEmptyList
import cats.effect.Sync
import cats.syntax.all._
import fs2.Stream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
package org.polystat.odin.analysis.liskov

import cats.data.EitherNel
import org.polystat.odin.analysis.utils.inlining.Inliner.{
AnalysisInfo,
ObjectTreeForAnalysis
}
import org.polystat.odin.core.ast.EONamedBnd
import org.polystat.odin.parser.eo.Parser
import cats.syntax.parallel._
import org.polystat.odin.analysis.unjustifiedassumptions.Analyzer.{
getMethodsInfo,
processMethod
}
import org.polystat.odin.analysis.utils.inlining.{
Inliner,
MethodInfo,
MethodInfoForAnalysis
}
import org.polystat.odin.analysis.unjustifiedassumptions.Analyzer.getMethodsInfo
import org.polystat.odin.analysis.unjustifiedassumptions.Analyzer.processMethod
import org.polystat.odin.analysis.utils.inlining.Inliner
import org.polystat.odin.analysis.utils.inlining.Inliner.AnalysisInfo
import org.polystat.odin.analysis.utils.inlining.Inliner.ObjectTreeForAnalysis
import org.polystat.odin.analysis.utils.inlining.MethodInfo
import org.polystat.odin.analysis.utils.inlining.MethodInfoForAnalysis
import org.polystat.odin.analysis.utils.logicalextraction.ExtractLogic.checkImplication
import org.polystat.odin.core.ast.EONamedBnd
import org.polystat.odin.parser.eo.Parser

object Analyzer {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.polystat.odin.analysis.mutualrec.advanced

import cats.MonadError
import cats.data.{EitherNel, NonEmptyList => Nel}
import cats.data.EitherNel
import cats.data.{NonEmptyList => Nel}
import cats.syntax.apply._
import cats.syntax.either._
import cats.syntax.flatMap._
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package org.polystat.odin.analysis.mutualrec.advanced

import scala.annotation.tailrec
import org.polystat.odin.analysis.mutualrec.advanced.Program._

import scala.annotation.tailrec

object CallGraph {

type CallGraph = Map[MethodName, Set[MethodName]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ import cats._
import cats.data.Chain
import cats.effect._
import cats.implicits._
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.mutualrec.naive.services.MethodAttribute
import org.polystat.odin.analysis.mutualrec.naive.services.MethodAttribute.MethodInfo
import org.polystat.odin.analysis.mutualrec.naive.services.TopLevelObjects
import org.polystat.odin.analysis.mutualrec.naive.services.TopLevelObjects.createTopLevelObjectsWithRefs
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.mutualrec.naive.services.{
MethodAttribute,
TopLevelObjects
}
import org.polystat.odin.core.ast.EOArray
import org.polystat.odin.core.ast.EOBndExpr
import org.polystat.odin.core.ast.EOCopy
import org.polystat.odin.core.ast.EODot
import org.polystat.odin.core.ast.EOObj
import org.polystat.odin.core.ast.EOProg
import org.polystat.odin.core.ast.EOSimpleApp
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast.{
EOArray,
EOBndExpr,
EOCopy,
EODot,
EOObj,
EOProg,
EOSimpleApp
}

package object naive {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package org.polystat.odin.analysis.mutualrec.naive.services

import cats.data.OptionT
import cats.effect.Sync
import cats.effect.Ref
import cats.effect.Sync
import cats.implicits._
import org.polystat.odin.analysis.mutualrec.naive.exceptions.DuplicatedMethodAttributes
import MethodAttribute.createMethodAttribute
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.mutualrec.naive.exceptions.DuplicatedMethodAttributes
import org.polystat.odin.core.ast.EOBndExpr
import org.polystat.odin.core.ast.EOObj
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast.{EOBndExpr, EOObj}

import MethodAttribute.createMethodAttribute

trait TopLevelObject[F[_]] {
def objName: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@ package org.polystat.odin.analysis.mutualrec.naive.services
import cats.data.OptionT
import cats.effect.Sync
import cats.implicits._
import org.polystat.odin.analysis.mutualrec.naive.exceptions.{
DecorateeNotFound,
UnsupportedDecoration
}
import TopLevelObject.createTopLevelObject
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.mutualrec.naive.exceptions.DecorateeNotFound
import org.polystat.odin.analysis.mutualrec.naive.exceptions.UnsupportedDecoration
import org.polystat.odin.core.ast.EOApp
import org.polystat.odin.core.ast.EOBndExpr
import org.polystat.odin.core.ast.EOCopy
import org.polystat.odin.core.ast.EODecoration
import org.polystat.odin.core.ast.EOObj
import org.polystat.odin.core.ast.EOSimpleApp
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast.{
EOApp,
EOBndExpr,
EOCopy,
EODecoration,
EOObj,
EOSimpleApp
}

import scala.annotation.tailrec

import TopLevelObject.createTopLevelObject

trait TopLevelObjects[F[_]] {
def objects: F[Vector[TopLevelObject[F]]]
def add(objName: String, obj: EOObj[EOExprOnly]): F[Unit]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
package org.polystat.odin.analysis.unjustifiedassumptions

import org.polystat.odin.analysis.utils.logicalextraction.SMTUtils.Info
import cats.data.{EitherNel, NonEmptyList => Nel}
import cats.data.EitherNel
import cats.data.{NonEmptyList => Nel}
import cats.syntax.align._
import cats.syntax.traverse._
import org.polystat.odin.analysis.utils.inlining.Inliner.AnalysisInfo
import org.polystat.odin.analysis.utils.inlining.{
MethodInfoForAnalysis,
ObjectTree
}
import org.polystat.odin.analysis.utils.logicalextraction.ExtractLogic.{
checkImplication,
extractInfo,
mkEqualsBndAttr
}
import org.polystat.odin.analysis.utils.inlining.MethodInfoForAnalysis
import org.polystat.odin.analysis.utils.inlining.ObjectTree
import org.polystat.odin.analysis.utils.logicalextraction.ExtractLogic.checkImplication
import org.polystat.odin.analysis.utils.logicalextraction.ExtractLogic.extractInfo
import org.polystat.odin.analysis.utils.logicalextraction.ExtractLogic.mkEqualsBndAttr
import org.polystat.odin.analysis.utils.logicalextraction.SMTUtils
import org.polystat.odin.analysis.utils.logicalextraction.SMTUtils.Info
import org.polystat.odin.core.ast._
import smtlib.theories.Core.{And, True}
import smtlib.theories.Core.And
import smtlib.theories.Core.True
import smtlib.theories.Ints.IntSort
import smtlib.trees.Terms._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
package org.polystat.odin.analysis.utils

import cats.{Applicative, Eval, Foldable, Id, Monoid}
import cats.Applicative
import cats.Eval
import cats.Foldable
import cats.Id
import cats.Monoid
import cats.implicits.catsSyntaxSemigroup
import cats.implicits.toFoldableOps
import cats.implicits.toFunctorOps
import com.github.tarao.nonempty.collection.NonEmpty
import higherkindness.droste.data.Fix
import Optics.{lenses, traversals}
import cats.implicits.{catsSyntaxSemigroup, toFoldableOps, toFunctorOps}
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

import Optics.{lenses, traversals}

object Abstract {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
package org.polystat.odin.analysis.utils

import cats.Applicative
import cats.implicits.{catsSyntaxTuple2Semigroupal, toFunctorOps, toTraverseOps}
import cats.implicits.catsSyntaxTuple2Semigroupal
import cats.implicits.toFunctorOps
import cats.implicits.toTraverseOps
import com.github.tarao.nonempty.collection.NonEmpty
import higherkindness.droste.data.Fix
import monocle.Lens
import monocle.Optional
import monocle.Prism
import monocle.Traversal
import monocle.macros.GenLens
import monocle.{Lens, Optional, Prism, Traversal}
import org.polystat.odin.analysis.utils.inlining.types.CopyArgs
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

object Optics {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
package org.polystat.odin.analysis.utils.inlining

import cats.data.{EitherNel, NonEmptyList => Nel}
import cats.data.EitherNel
import cats.data.{NonEmptyList => Nel}
import cats.syntax.align._
import cats.syntax.apply._
import cats.syntax.either._
import cats.syntax.functor._
import cats.syntax.parallel._
import higherkindness.droste.data.Fix
import monocle.Iso
import monocle.Lens
import monocle.Optional
import monocle.macros.GenLens
import monocle.{Iso, Lens, Optional}
import org.polystat.odin.analysis.utils.Abstract.modifyExpr
import LocatorContext.setLocators
import LocateMethods._
import org.polystat.odin.analysis.utils.Optics._
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

import scala.annotation.tailrec

import LocatorContext.setLocators
import LocateMethods._

object Inliner {

/* The following steps are performed here
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import monocle.Iso
import org.polystat.odin.analysis.utils.Abstract.foldAst
import org.polystat.odin.analysis.utils.Optics._
import org.polystat.odin.analysis.utils.inlining
import types._
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

import types._

object LocateCalls {

def hasNoReferencesToPhi(binds: Vector[EOBnd[Fix[EOExpr]]]): Boolean = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import cats.data.{NonEmptyList => Nel}
import cats.syntax.foldable._
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.ObjectName
import LocateCalls._
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

import LocateCalls._

object LocateMethods {

def parseParentName(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package org.polystat.odin.analysis.utils.inlining

import cats.data.{EitherNel, NonEmptyList => Nel}
import cats.data.EitherNel
import cats.data.{NonEmptyList => Nel}
import higherkindness.droste.data.Fix
import org.polystat.odin.analysis.utils.Optics._
import org.polystat.odin.analysis.utils.Abstract.modifyExprWithState
import org.polystat.odin.analysis.utils.Optics._
import org.polystat.odin.core.ast._
import org.polystat.odin.core.ast.astparams.EOExprOnly

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ import cats.syntax.apply._
import cats.syntax.foldable._
import cats.syntax.functor._
import cats.syntax.traverse._
import types._
import monocle.Optional
import org.polystat.odin.analysis.ObjectName
import org.polystat.odin.backend.eolang.ToEO.instances._
import org.polystat.odin.backend.eolang.ToEO.ops._
import org.polystat.odin.core.ast.EOBndExpr
import org.polystat.odin.core.ast.EONamedBnd
import org.polystat.odin.core.ast.EOObj
import org.polystat.odin.core.ast.astparams.EOExprOnly
import org.polystat.odin.core.ast.{EOBndExpr, EONamedBnd, EOObj}
import monocle.Optional
import org.polystat.odin.analysis.ObjectName

import types._

sealed trait BndPlaceholder
final case class MethodPlaceholder(name: EONamedBnd) extends BndPlaceholder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package org.polystat.odin.analysis.utils.inlining

import com.github.tarao.nonempty.collection.NonEmpty
import monocle.Optional
import org.polystat.odin.core.ast.{EOBnd, EOObj}
import org.polystat.odin.core.ast.EOBnd
import org.polystat.odin.core.ast.EOObj
import org.polystat.odin.core.ast.astparams.EOExprOnly

object types {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package org.polystat.odin.analysis.utils.logicalextraction

import ap.SimpleAPI
import ap.SimpleAPI.FunctionalityMode
import cats.data.{EitherNel, NonEmptyList => Nel}
import cats.data.EitherNel
import cats.data.{NonEmptyList => Nel}
import cats.syntax.either._
import cats.syntax.traverse._
import higherkindness.droste.data.Fix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
package org.polystat.odin.analysis.utils.logicalextraction

import org.polystat.odin.core.ast.EONamedBnd
import smtlib.theories.Core.{BoolSort, True}
import smtlib.theories.Core.BoolSort
import smtlib.theories.Core.True
import smtlib.theories.Ints.IntSort
import smtlib.trees.Commands.FunDef
import smtlib.trees.Terms.{
Exists,
Forall,
FunctionApplication,
Identifier,
Let,
QualifiedIdentifier,
SNumeral,
SSymbol,
SimpleIdentifier,
SortedVar,
Term
}
import smtlib.trees.Terms.Exists
import smtlib.trees.Terms.Forall
import smtlib.trees.Terms.FunctionApplication
import smtlib.trees.Terms.Identifier
import smtlib.trees.Terms.Let
import smtlib.trees.Terms.QualifiedIdentifier
import smtlib.trees.Terms.SNumeral
import smtlib.trees.Terms.SSymbol
import smtlib.trees.Terms.SimpleIdentifier
import smtlib.trees.Terms.SortedVar
import smtlib.trees.Terms.Term

import scala.annotation.tailrec

Expand Down
Loading

0 comments on commit bd5bca5

Please sign in to comment.