diff --git a/Modules/Lore/src/main/scala/lore/dsl/BoundInteraction.scala b/Modules/Lore/src/main/scala/lore/dsl/BoundInteraction.scala index 646de7a51..716745fb1 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/BoundInteraction.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/BoundInteraction.scala @@ -1,8 +1,10 @@ package lore.dsl -import rescala.Lul.dynamicTicket -import rescala.core.ReSource -import rescala.default.* +import reactives.Lul.dynamicTicket +import reactives.core.ReSource +import reactives.default.* +import reactives.operator.Interface.State as BundleState + import scala.quoted.{Expr, Quotes, Type} import scala.reflect.ClassTag @@ -11,7 +13,7 @@ def constructBoundInteractionWithRequires[ST <: Tuple, S <: Tuple, A](interactio expr: Expr[(ST, A) => Boolean]) (using Quotes, Type[ST], Type[S], Type[A]): Expr[BoundInteraction[ST, S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(requires = $interaction.requires :+ Requires(inputs, fun, ${ showPredicateCode(expr) })) } @@ -20,7 +22,7 @@ def constructBoundInteractionWithEnsures[ST <: Tuple, S <: Tuple, A](interaction expr: Expr[(ST, A) => Boolean]) (using Quotes, Type[ST], Type[S], Type[A]): Expr[BoundInteraction[ST, S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(ensures = $interaction.ensures :+ Ensures(inputs, fun, ${ showPredicateCode(expr) })) } @@ -63,7 +65,9 @@ case class BoundInteraction[ST <: Tuple, S <: Tuple, A] private[dsl](private[dsl } modifies.zip(res).asInstanceOf[Seq[(Var[Any], Any)]].map { case (source, v) => source.set(v) } + () } + } } diff --git a/Modules/Lore/src/main/scala/lore/dsl/DSL.scala b/Modules/Lore/src/main/scala/lore/dsl/DSL.scala index b8b485964..0ca3b2b5f 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/DSL.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/DSL.scala @@ -1,7 +1,8 @@ package lore.dsl -import rescala.core.{AdmissionTicket, ReSource, StaticTicket} -import rescala.default.* +import reactives.core.{AdmissionTicket, ReSource, StaticTicket} +import reactives.default.* +import reactives.operator.Interface.State as BundleState import scala.quoted.* diff --git a/Modules/Lore/src/main/scala/lore/dsl/DSLTest.scala b/Modules/Lore/src/main/scala/lore/dsl/DSLTest.scala index 0800628a2..fcc990e2a 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/DSLTest.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/DSLTest.scala @@ -1,8 +1,8 @@ package lore.dsl import lore.dsl.Ex -import rescala.default.Var as Source -import rescala.default.Signal as Derived +import reactives.default.Var as Source +import reactives.default.Signal as Derived object DSLTest { @main @@ -18,7 +18,7 @@ object DSLTest { Invariant { b.value < 25 } - + val add10: BoundInteraction[Tuple1[Int], Tuple1[Source[Int]], Int] = Interaction[Int, Int] .requires[Int]((t, _) => t < 20) @@ -73,4 +73,4 @@ class Test[S <: NonEmptyTuple, T <: NonEmptyTuple](val s: S, val t: T) { val x: Test[Int *: Int *: (Int, Int), Box[Int] *: Box[Int] *: (Box[Int], Box[Int])] = Test((1, 2), (Box(1), Box(2))) .append(3) .append(4) -*/ \ No newline at end of file +*/ diff --git a/Modules/Lore/src/main/scala/lore/dsl/Interaction.scala b/Modules/Lore/src/main/scala/lore/dsl/Interaction.scala index 7923ed5fb..2c90e7899 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/Interaction.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/Interaction.scala @@ -1,7 +1,7 @@ package lore.dsl import lore.dsl.* -import rescala.default.{Var as Source, *} +import reactives.default.{Var as Source, *} import scala.annotation.targetName @@ -138,5 +138,5 @@ implicit object Ex { BoundInteraction[(T1, T2, T3, T4, T5), (Source[T1], Source[T2], Source[T3], Source[T4], Source[T5]), A] = BoundInteraction(m.requires, m.ensures, m.executes, (source1, source2, source3, source4, source5)) } - + } diff --git a/Modules/Lore/src/main/scala/lore/dsl/InteractionWithExecutes.scala b/Modules/Lore/src/main/scala/lore/dsl/InteractionWithExecutes.scala index 39ad0a6a1..52711e929 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/InteractionWithExecutes.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/InteractionWithExecutes.scala @@ -1,7 +1,7 @@ package lore.dsl -import rescala.core.ReSource -import rescala.default.BundleState +import reactives.core.ReSource +import reactives.operator.Interface.State as BundleState import scala.quoted.{Expr, Quotes, Type} @@ -9,7 +9,7 @@ def constructInteractionWithExecutesWithRequires[S <: Tuple, A](interaction: Exp expr: Expr[(S, A) => Boolean]) (using Quotes, Type[S], Type[A]): Expr[InteractionWithExecutes[S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(requires = $interaction.requires :+ Requires(inputs, fun, ${ showPredicateCode(expr) })) } @@ -18,7 +18,7 @@ def constructInteractionWithExecutesWithEnsures[S <: Tuple, A](interaction: Expr expr: Expr[(S, A) => Boolean]) (using Quotes, Type[S], Type[A]): Expr[InteractionWithExecutes[S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(ensures = $interaction.ensures :+ Ensures(inputs, fun, ${ showPredicateCode(expr) })) } diff --git a/Modules/Lore/src/main/scala/lore/dsl/InteractionWithModifies.scala b/Modules/Lore/src/main/scala/lore/dsl/InteractionWithModifies.scala index 7f99bc9da..6a5ac77cc 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/InteractionWithModifies.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/InteractionWithModifies.scala @@ -1,7 +1,9 @@ package lore.dsl -import rescala.core.ReSource -import rescala.default.* +import reactives.core.ReSource +import reactives.default.* +import reactives.operator.Interface.State as BundleState + import scala.quoted.{Expr, Quotes, Type} @@ -9,7 +11,7 @@ def constructInteractionWithModifiesWithRequires[ST <: Tuple, S <: Tuple, A](int expr: Expr[(ST, A) => Boolean]) (using Quotes, Type[ST], Type[S], Type[A]): Expr[InteractionWithModifies[ST, S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(requires = $interaction.requires :+ Requires(inputs, fun, ${ showPredicateCode(expr) })) } @@ -18,7 +20,7 @@ def constructInteractionWithModifiesWithEnsures[ST <: Tuple, S <: Tuple, A](inte expr: Expr[(ST, A) => Boolean]) (using Quotes, Type[ST], Type[S], Type[A]): Expr[InteractionWithModifies[ST, S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(ST, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) val newEns = Ensures(inputs, fun, ${ showPredicateCode(expr) }) diff --git a/Modules/Lore/src/main/scala/lore/dsl/Invariant.scala b/Modules/Lore/src/main/scala/lore/dsl/Invariant.scala index 8e4878c97..067d08234 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/Invariant.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/Invariant.scala @@ -1,7 +1,7 @@ package lore.dsl -import rescala.core.CreationTicket -import rescala.default.* +import reactives.core.CreationTicket +import reactives.default.* import scala.quoted.* diff --git a/Modules/Lore/src/main/scala/lore/dsl/UnboundInteraction.scala b/Modules/Lore/src/main/scala/lore/dsl/UnboundInteraction.scala index 11f254d3d..5c5ded33b 100644 --- a/Modules/Lore/src/main/scala/lore/dsl/UnboundInteraction.scala +++ b/Modules/Lore/src/main/scala/lore/dsl/UnboundInteraction.scala @@ -1,7 +1,8 @@ package lore.dsl -import rescala.core.ReSource -import rescala.default.BundleState +import reactives.core.ReSource +import reactives.operator.Interface.State as BundleState + import scala.quoted.{Expr, Quotes, Type} @@ -9,7 +10,7 @@ def constructUnboundInteractionWithRequires[S <: Tuple, A](interaction: Expr[Unb expr: Expr[(S, A) => Boolean]) (using Quotes, Type[S], Type[A]): Expr[UnboundInteraction[S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(requires = $interaction.requires :+ Requires(inputs, fun, ${ showPredicateCode(expr) })) } @@ -18,7 +19,7 @@ def constructUnboundInteractionWithEnsures[S <: Tuple, A](interaction: Expr[Unbo expr: Expr[(S, A) => Boolean]) (using Quotes, Type[S], Type[A]): Expr[UnboundInteraction[S, A]] = '{ val (inputs, fun, isStatic) = - rescala.macros.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], rescala.core.StaticTicket[BundleState], true]($expr) + reactives.macros.MacroLegos.getDependencies[(S, A) => Boolean, ReSource.of[BundleState], reactives.core.StaticTicket[BundleState], true]($expr) $interaction.copy(ensures = $interaction.ensures :+ Ensures(inputs, fun, ${ showPredicateCode(expr) })) } diff --git a/Modules/Lore/src/main/scala/rescala/Lul.scala b/Modules/Lore/src/main/scala/rescala/Lul.scala index 76eeef5e5..4fe5eaf7d 100644 --- a/Modules/Lore/src/main/scala/rescala/Lul.scala +++ b/Modules/Lore/src/main/scala/rescala/Lul.scala @@ -1,8 +1,10 @@ -package rescala +package reactives + +import reactives.core.{AdmissionTicket, ReevTicket, StaticTicket} +import reactives.default.* +import reactives.scheduler.Twoversion +import reactives.operator.Interface.State as BundleState -import rescala.core.{AdmissionTicket, ReevTicket, StaticTicket} -import rescala.default.* -import rescala.scheduler.Twoversion package object Lul extends Twoversion { def dynamicTicket(implicit at: AdmissionTicket[BundleState]): StaticTicket[BundleState] = diff --git a/Modules/Lore/src/test/scala/lore/calendar/calendar_vac_add_inv1.scala b/Modules/Lore/src/test/scala/lore/calendar/calendar_vac_add_inv1.scala index 343c51cb7..917602ad5 100644 --- a/Modules/Lore/src/test/scala/lore/calendar/calendar_vac_add_inv1.scala +++ b/Modules/Lore/src/test/scala/lore/calendar/calendar_vac_add_inv1.scala @@ -1,7 +1,7 @@ package lore.calendar import lore.dsl.* -import rescala.default.{Signal as Derived, Var as Source} +import reactives.default.{Signal as Derived, Var as Source} import scala.collection.immutable.Set as AWSet