Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Completely rework the properties of netzones
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 16 Dec 2016 08:15:24 +0000 (09:15 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 16 Dec 2016 16:18:49 +0000 (17:18 +0100)
- This changes some MSG functions, but I doubt that any users really
  used them. Even if someone did, there is no real loss of
  functionnality. The only missing thing would be if someone wants to
  traverse the whole set, but I don't have no good idea here since the
  data is stored in a C++ container. It's hard to let C code traverse
  it. I could add a _dump() method to just display it.
- the change in the tesh file denotes an old bug that this change
  fixes. The name property was not defined in the cluster tag, but in
  the previous one in the XML, so it should not have landed in the
  properties of the cluster's hosts.
- the code in the XML to stack the dictionnaries for each AS is simply
  gone. The AS is created in the STag function, so simply retrieve it
  by name and use it when we need it. No need for an additional storage.
- surf_routing is almost gone, now \o/

22 files changed:
ChangeLog
examples/msg/platform-properties/platform-properties.tesh
include/simgrid/msg.h
include/simgrid/s4u/NetZone.hpp
include/simgrid/simix.h
include/surf/surf_routing.h
src/include/surf/surf.h
src/kernel/routing/NetZoneImpl.hpp
src/msg/msg_environment.cpp
src/msg/msg_gos.cpp
src/s4u/s4u_host.cpp
src/s4u/s4u_netzone.cpp
src/simix/libsmx.cpp
src/simix/popping_accessors.h
src/simix/popping_bodies.cpp
src/simix/popping_enum.h
src/simix/popping_generated.cpp
src/simix/simcalls.in
src/simix/smx_global.cpp
src/surf/surf_interface.cpp
src/surf/surf_routing.cpp
src/surf/xml/surfxml_sax_cb.cpp

index e45415e..36ded83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,10 @@ SimGrid (3.14) UNRELEASED; urgency=low
    - MSG_storage_set_property_value()
  * VM properties. Since msg_vm_t are msg_host_t, just use
    MSG_host_get_property_value() and friends
+ * MSG_as_router_get_property_value() was redundent with
+   MSG_environment_as_get_property_value(). 
+   - Removed MSG_as_router_*propert*() functions
+   - Added MSG_environment_as_set_property_value() for consistency
  * xbt heterogeneous dictionnaries (created with xbt_dict_new()). 
    Well, they are still there for now, but deprecated with a warning. 
    Please switch to xbt_dict_new_homogeneous() before this is removed
index 7e26455..518a2db 100644 (file)
@@ -34,7 +34,6 @@ $ $SG_TEST_EXENV ${bindir:=.}/platform-properties$EXEEXT ${srcdir:=.}/prop.xml $
 > [  2.000000] (4:david@host2) == Print the properties of the host 'node-0.acme.org'
 > [  2.000000] (4:david@host2)   Host property: 'mem' -> '42'
 > [  2.000000] (4:david@host2)   Host property: 'bla' -> 'acme cluster'
-> [  2.000000] (4:david@host2)   Host property: 'name' -> 'AS2'
 > [  2.000000] (4:david@host2)   Host property: 'Hdd' -> '180'
 > [  2.000000] (4:david@host2) == Try to get a host property that does not exist
 > [  2.000000] (4:david@host2) == Try to get a host property that does exist
index 2cf2afd..59ce52e 100644 (file)
@@ -190,6 +190,7 @@ XBT_PUBLIC(const char*) MSG_environment_as_get_name(msg_netzone_t as);
 XBT_PUBLIC(msg_netzone_t) MSG_environment_as_get_by_name(const char* name);
 XBT_PUBLIC(xbt_dict_t) MSG_environment_as_get_routing_sons(msg_netzone_t as);
 XBT_PUBLIC(const char*) MSG_environment_as_get_property_value(msg_netzone_t as, const char* name);
+XBT_PUBLIC(void) MSG_environment_as_set_property_value(const char* asr, const char* name, char* value);
 XBT_PUBLIC(xbt_dynar_t) MSG_environment_as_get_hosts(msg_netzone_t as);
 
 /************************** File handling ***********************************/
@@ -225,10 +226,6 @@ XBT_PUBLIC(xbt_dict_t) MSG_storage_get_content(msg_storage_t storage);
 XBT_PUBLIC(sg_size_t) MSG_storage_get_size(msg_storage_t storage);
 XBT_PUBLIC(msg_error_t) MSG_storage_file_move(msg_file_t fd, msg_host_t dest, char* mount, char* fullname);
 XBT_PUBLIC(const char *) MSG_storage_get_host(msg_storage_t storage);
-/************************** AS Router handling ************************************/
-XBT_PUBLIC(const char *) MSG_as_router_get_property_value(const char* asr, const char *name);
-XBT_PUBLIC(xbt_dict_t) MSG_as_router_get_properties(const char* asr);
-XBT_PUBLIC(void) MSG_as_router_set_property_value(const char* asr, const char* name, char* value);
 
 /************************** Host handling ***********************************/
 XBT_PUBLIC(msg_host_t) MSG_host_by_name(const char *name);
index 3b3eb5f..bf96c02 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef SIMGRID_S4U_NETZONE_HPP
 #define SIMGRID_S4U_NETZONE_HPP
 
-#include <map>
 #include <string>
+#include <unordered_map>
 #include <utility>
 #include <vector>
 
@@ -50,6 +50,13 @@ public:
   xbt_dict_t children(); // Sub netzones
   xbt_dynar_t hosts();   // my content as a dynar
 
+  /** Get the properties assigned to a host */
+  std::unordered_map<std::string, std::string>* properties();
+
+  /** Retrieve the property value (or nullptr if not set) */
+  const char* property(const char* key);
+  void setProperty(const char* key, const char* value);
+
   /* Add content to the netzone, at parsing time. It should be sealed afterward. */
   virtual int addComponent(kernel::routing::NetCard * elm); /* A host, a router or a netzone, whatever */
   virtual void addRoute(sg_platf_route_cbarg_t route);
@@ -66,6 +73,7 @@ protected:
       vertices_; // our content, as known to our graph routing algorithm (maps vertexId -> vertex)
 
 private:
+  std::unordered_map<std::string, std::string> properties_;
   NetZone* father_ = nullptr;
   char* name_      = nullptr;
 
index 9b0c8e6..5e02fad 100644 (file)
@@ -398,10 +398,6 @@ XBT_PUBLIC(xbt_dict_t) simcall_storage_get_content(smx_storage_t storage);
 XBT_PUBLIC(const char*) SIMIX_storage_get_name(smx_storage_t storage);
 XBT_PUBLIC(sg_size_t) SIMIX_storage_get_size(smx_storage_t storage);
 XBT_PUBLIC(const char*) SIMIX_storage_get_host(smx_storage_t storage);
-/************************** AS router   **********************************/
-XBT_PUBLIC(xbt_dict_t) SIMIX_asr_get_properties(const char *name);
-/************************** AS router simcalls ***************************/
-XBT_PUBLIC(xbt_dict_t) simcall_asr_get_properties(const char *name);
 
 /************************** MC simcalls   **********************************/
 XBT_PUBLIC(int) simcall_mc_random(int min, int max);
index 181cd1f..2675a83 100644 (file)
@@ -17,7 +17,6 @@ XBT_PUBLIC_DATA(int) SIMIX_STORAGE_LEVEL; //Simix storage level
 
 XBT_PUBLIC_DATA(xbt_lib_t) as_router_lib;
 XBT_PUBLIC_DATA(int) ROUTING_ASR_LEVEL;  //Routing level
-XBT_PUBLIC_DATA(int) ROUTING_PROP_ASR_LEVEL; //Properties for AS and router
 
 XBT_PUBLIC_DATA(xbt_lib_t) storage_lib;
 XBT_PUBLIC_DATA(int) ROUTING_STORAGE_LEVEL;        //Routing storage level
index 4056ae5..67a61f1 100644 (file)
@@ -636,8 +636,6 @@ XBT_PUBLIC(void) parse_platform_file(const char *file);
 /* For the trace and trace:connect tag (store their content till the end of the parsing) */
 XBT_PUBLIC_DATA(xbt_dict_t) traces_set_list;
 
-XBT_PUBLIC(xbt_dict_t) get_as_router_properties(const char* name);
-
 /*
  * Returns the initial path. On Windows the initial path is the current directory for the current process in the other
  * case the function returns "./" that represents the current directory on Unix/Linux platforms.
index 9ecd0ae..4e1aa58 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef SIMGRID_ROUTING_NETZONEIMPL_HPP
 #define SIMGRID_ROUTING_NETZONEIMPL_HPP
 
+#include <map>
+
 #include "xbt/graph.h"
 
 #include "simgrid/s4u/NetZone.hpp"
index bf29367..9783390 100644 (file)
@@ -55,9 +55,9 @@ msg_netzone_t MSG_environment_get_routing_root()
   return simgrid::s4u::Engine::instance()->netRoot();
 }
 
-const char* MSG_environment_as_get_name(msg_netzone_t as)
+const char* MSG_environment_as_get_name(msg_netzone_t netzone)
 {
-  return as->name();
+  return netzone->name();
 }
 
 msg_netzone_t MSG_environment_as_get_by_name(const char* name)
@@ -65,21 +65,22 @@ msg_netzone_t MSG_environment_as_get_by_name(const char* name)
   return simgrid::s4u::Engine::instance()->netzoneByNameOrNull(name);
 }
 
-xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t as)
+xbt_dict_t MSG_environment_as_get_routing_sons(msg_netzone_t netzone)
 {
-  return as->children();
+  return netzone->children();
 }
 
-const char* MSG_environment_as_get_property_value(msg_netzone_t as, const char* name)
+const char* MSG_environment_as_get_property_value(msg_netzone_t netzone, const char* name)
 {
-  xbt_dict_t dict = static_cast<xbt_dict_t> (xbt_lib_get_or_null(as_router_lib, MSG_environment_as_get_name(as),
-                                                                 ROUTING_PROP_ASR_LEVEL));
-  if (dict==nullptr)
-    return nullptr;
-  return static_cast<const char*>(xbt_dict_get_or_null(dict, name));
+  return netzone->property(name);
 }
 
-xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t as)
+void MSG_environment_as_set_property_value(msg_netzone_t netzone, const char* name, char* value)
 {
-  return as->hosts();
+  netzone->setProperty(name, value);
+}
+
+xbt_dynar_t MSG_environment_as_get_hosts(msg_netzone_t netzone)
+{
+  return netzone->hosts();
 }
index 9e56db8..d7d6119 100644 (file)
@@ -916,39 +916,3 @@ const char *MSG_task_get_category (msg_task_t task)
 {
   return task->category;
 }
-
-/**
- * \brief Returns the value of a given AS or router property
- *
- * \param asr the name of a router or AS
- * \param name a property name
- * \return value of a property (or nullptr if property not set)
- */
-const char *MSG_as_router_get_property_value(const char* asr, const char *name)
-{
-  return static_cast<char*>(xbt_dict_get_or_null(MSG_as_router_get_properties(asr), name));
-}
-
-/**
- * \brief Returns a xbt_dict_t consisting of the list of properties assigned to
- * a the AS or router
- *
- * \param asr the name of a router or AS
- * \return a dict containing the properties
- */
-xbt_dict_t MSG_as_router_get_properties(const char* asr)
-{
-  return (simcall_asr_get_properties(asr));
-}
-
-/**
- * \brief Change the value of a given AS or router
- *
- * \param asr the name of a router or AS
- * \param name a property name
- * \param value what to change the property to
- */
-void MSG_as_router_set_property_value(const char* asr, const char* name, char* value)
-{
-  xbt_dict_set(MSG_as_router_get_properties(asr), name, value, nullptr);
-}
index 6ae075f..77057f2 100644 (file)
@@ -43,7 +43,7 @@ simgrid::xbt::signal<void(Host&)> Host::onStateChange;
 Host::Host(const char* name)
   : name_(name)
 {
-  xbt_assert(sg_host_by_name(name) == nullptr, "Refusing to create a second host named '%s'.", name);
+  xbt_assert(Host::by_name_or_null(name) == nullptr, "Refusing to create a second host named '%s'.", name);
   host_list[name_] = this;
 }
 
index ed4aa1d..84e10dd 100644 (file)
@@ -7,6 +7,7 @@
 
 #include "simgrid/s4u/NetZone.hpp"
 #include "simgrid/s4u/host.hpp"
+#include "simgrid/simix.hpp"
 #include "src/kernel/routing/NetCard.hpp"
 #include "src/surf/network_interface.hpp" // Link FIXME: move to proper header
 #include "src/surf/surf_routing.hpp"
@@ -40,6 +41,20 @@ NetZone::~NetZone()
   xbt_dict_free(&children_);
   xbt_free(name_);
 }
+std::unordered_map<std::string, std::string>* NetZone::properties()
+{
+  return simgrid::simix::kernelImmediate([&] { return &properties_; });
+}
+
+/** Retrieve the property value (or nullptr if not set) */
+const char* NetZone::property(const char* key)
+{
+  return properties_.at(key).c_str();
+}
+void NetZone::setProperty(const char* key, const char* value)
+{
+  simgrid::simix::kernelImmediate([&] { properties_[key] = value; });
+}
 
 xbt_dict_t NetZone::children()
 {
index 7ccc835..e1de859 100644 (file)
@@ -46,20 +46,6 @@ void simcall_call(smx_actor_t process)
   }
 }
 
-// ***** AS simcalls
-
-/**
- * \ingroup simix_host_management
- * \brief Returns a dict of the properties assigned to a router or AS.
- *
- * \param name The name of the router or AS
- * \return The properties
- */
-xbt_dict_t simcall_asr_get_properties(const char *name)
-{
-  return simcall_BODY_asr_get_properties(name);
-}
-
 /**
  * \ingroup simix_process_management
  * \brief Creates a synchro that executes some computation of an host.
index 4601e40..6635ff8 100644 (file)
@@ -1084,19 +1084,6 @@ static inline void simcall_storage_get_content__set__result(smx_simcall_t simcal
     simgrid::simix::marshal<xbt_dict_t>(simcall->result, result);
 }
 
-static inline const char* simcall_asr_get_properties__get__name(smx_simcall_t simcall) {
-  return simgrid::simix::unmarshal<const char*>(simcall->args[0]);
-}
-static inline void simcall_asr_get_properties__set__name(smx_simcall_t simcall, const char* arg) {
-    simgrid::simix::marshal<const char*>(simcall->args[0], arg);
-}
-static inline xbt_dict_t simcall_asr_get_properties__get__result(smx_simcall_t simcall){
-    return simgrid::simix::unmarshal<xbt_dict_t>(simcall->result);
-}
-static inline void simcall_asr_get_properties__set__result(smx_simcall_t simcall, xbt_dict_t result){
-    simgrid::simix::marshal<xbt_dict_t>(simcall->result, result);
-}
-
 static inline int simcall_mc_random__get__min(smx_simcall_t simcall) {
   return simgrid::simix::unmarshal<int>(simcall->args[0]);
 }
@@ -1188,5 +1175,4 @@ XBT_PRIVATE xbt_dynar_t simcall_HANDLER_file_get_info(smx_simcall_t simcall, smx
 XBT_PRIVATE int simcall_HANDLER_file_move(smx_simcall_t simcall, smx_file_t fd, const char* fullpath);
 XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_free_size(smx_simcall_t simcall, smx_storage_t storage);
 XBT_PRIVATE sg_size_t simcall_HANDLER_storage_get_used_size(smx_simcall_t simcall, smx_storage_t name);
-XBT_PRIVATE xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char* name);
 XBT_PRIVATE int simcall_HANDLER_mc_random(smx_simcall_t simcall, int min, int max);
\ No newline at end of file
index 8986295..7073743 100644 (file)
@@ -407,12 +407,6 @@ inline static xbt_dict_t simcall_BODY_storage_get_content(smx_storage_t storage)
     return simcall<xbt_dict_t, smx_storage_t>(SIMCALL_STORAGE_GET_CONTENT, storage);
   }
   
-inline static xbt_dict_t simcall_BODY_asr_get_properties(const char* name) {
-    /* Go to that function to follow the code flow through the simcall barrier */
-    if (0) simcall_HANDLER_asr_get_properties(&SIMIX_process_self()->simcall, name);
-    return simcall<xbt_dict_t, const char*>(SIMCALL_ASR_GET_PROPERTIES, name);
-  }
-  
 inline static int simcall_BODY_mc_random(int min, int max) {
     /* Go to that function to follow the code flow through the simcall barrier */
     if (0) simcall_HANDLER_mc_random(&SIMIX_process_self()->simcall, min, max);
index cd8d89d..37a4057 100644 (file)
@@ -80,7 +80,6 @@ typedef enum {
   SIMCALL_STORAGE_GET_USED_SIZE,
   SIMCALL_STORAGE_GET_PROPERTIES,
   SIMCALL_STORAGE_GET_CONTENT,
-  SIMCALL_ASR_GET_PROPERTIES,
   SIMCALL_MC_RANDOM,
   SIMCALL_SET_CATEGORY,
   SIMCALL_RUN_KERNEL,
index 43c6d26..d7e3514 100644 (file)
@@ -85,7 +85,6 @@ const char* simcall_names[] = {
   "SIMCALL_STORAGE_GET_USED_SIZE",
   "SIMCALL_STORAGE_GET_PROPERTIES",
   "SIMCALL_STORAGE_GET_CONTENT",
-  "SIMCALL_ASR_GET_PROPERTIES",
   "SIMCALL_MC_RANDOM",
   "SIMCALL_SET_CATEGORY",
   "SIMCALL_RUN_KERNEL",
@@ -393,11 +392,6 @@ case SIMCALL_STORAGE_GET_CONTENT:
       SIMIX_simcall_answer(simcall);
       break;
 
-case SIMCALL_ASR_GET_PROPERTIES:
-      simgrid::simix::marshal<xbt_dict_t>(simcall->result, simcall_HANDLER_asr_get_properties(simcall, simgrid::simix::unmarshal<const char*>(simcall->args[0])));
-      SIMIX_simcall_answer(simcall);
-      break;
-
 case SIMCALL_MC_RANDOM:
       simgrid::simix::marshal<int>(simcall->result, simcall_HANDLER_mc_random(simcall, simgrid::simix::unmarshal<int>(simcall->args[0]), simgrid::simix::unmarshal<int>(simcall->args[1])));
       SIMIX_simcall_answer(simcall);
index 1aa78dd..b0478e8 100644 (file)
@@ -109,7 +109,6 @@ sg_size_t  storage_get_used_size(smx_storage_t name);
 xbt_dict_t storage_get_properties(smx_storage_t storage) [[nohandler]];
 xbt_dict_t storage_get_content(smx_storage_t storage) [[nohandler]];
 
-xbt_dict_t asr_get_properties(const char* name);
 int        mc_random(int min, int max);
 void       set_category(smx_activity_t synchro, const char* category) [[nohandler]];
 
index dd1e268..95c67da 100644 (file)
@@ -693,14 +693,6 @@ void SIMIX_display_process_status()
   }
 }
 
-xbt_dict_t simcall_HANDLER_asr_get_properties(smx_simcall_t simcall, const char *name){
-  return SIMIX_asr_get_properties(name);
-}
-xbt_dict_t SIMIX_asr_get_properties(const char *name)
-{
-  return static_cast<xbt_dict_t>(xbt_lib_get_or_null(as_router_lib, name, ROUTING_PROP_ASR_LEVEL));
-}
-
 int SIMIX_is_maestro()
 {
   return simix_global==nullptr /*SimDag*/|| SIMIX_process_self() == simix_global->maestro_process;
index b0ac64c..dfd0799 100644 (file)
@@ -296,7 +296,6 @@ void surf_init(int *argc, char **argv)
   watched_hosts_lib = xbt_dict_new_homogeneous(nullptr);
 
   XBT_DEBUG("Add routing levels");
-  ROUTING_PROP_ASR_LEVEL = xbt_lib_add_level(as_router_lib, nullptr);
   ROUTING_ASR_LEVEL = xbt_lib_add_level(as_router_lib, [](void* p) {
     delete static_cast<simgrid::kernel::routing::NetCard*>(p);
   });
index 1292fde..b5f8acb 100644 (file)
@@ -13,4 +13,3 @@ int MSG_STORAGE_LEVEL = -1;          //Msg storage level
 
 xbt_lib_t as_router_lib;
 int ROUTING_ASR_LEVEL = -1;          //Routing level
-int ROUTING_PROP_ASR_LEVEL = -1;     //Where the properties are stored
index d36c014..a3fc7d9 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdarg.h> /* va_arg */
 
 #include "simgrid/link.h"
+#include "simgrid/s4u/engine.hpp"
 #include "simgrid/sg_config.h"
 #include "src/kernel/routing/NetCard.hpp"
 #include "src/surf/network_interface.hpp"
@@ -275,12 +276,7 @@ double surf_parse_get_speed(const char *string, const char *entity_kind, const c
 /* The default current property receiver. Setup in the corresponding opening callbacks. */
 xbt_dict_t current_property_set = nullptr;
 xbt_dict_t current_model_property_set = nullptr;
-xbt_dict_t as_current_property_set = nullptr;
-int AS_TAG = 0;
-char* as_name_tab[1024];
-void* as_dict_tab[1024];
-int as_prop_nb = 0;
-
+int AS_TAG                            = 0; // Whether we just opened an AS tag (to see what to do with the properties)
 
 /* dictionary of random generator data */
 xbt_dict_t random_data_list = nullptr;
@@ -460,23 +456,18 @@ void STag_surfxml_host(){
 
 void STag_surfxml_prop()
 {
-  if(AS_TAG){ // We need a stack here to retrieve the most recently opened AS
-    if (!as_current_property_set){
-      xbt_assert(as_prop_nb < 1024, "Number of AS property reach the limit!!!");
-      as_current_property_set = xbt_dict_new_homogeneous(xbt_free_f); // Maybe, it should raise an error
-      as_name_tab[as_prop_nb] = xbt_strdup(A_surfxml_AS_id);
-      as_dict_tab[as_prop_nb] = as_current_property_set;
-      XBT_DEBUG("PUSH prop set %p for AS '%s'",as_dict_tab[as_prop_nb],as_name_tab[as_prop_nb]);
-      as_prop_nb++;
-    }
-    XBT_DEBUG("add prop %s=%s into current AS property set", A_surfxml_prop_id, A_surfxml_prop_value);
-    xbt_dict_set(as_current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), nullptr);
+  if (AS_TAG) { // We need to retrieve the most recently opened AS
+    XBT_DEBUG("Set AS property %s -> %s", A_surfxml_prop_id, A_surfxml_prop_value);
+    simgrid::s4u::NetZone* netzone = simgrid::s4u::Engine::instance()->netzoneByNameOrNull(A_surfxml_AS_id);
+
+    netzone->setProperty(A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value));
   }
   else{
     if (!current_property_set)
       current_property_set = xbt_dict_new_homogeneous(&xbt_free_f); // Maybe, it should raise an error
     xbt_dict_set(current_property_set, A_surfxml_prop_id, xbt_strdup(A_surfxml_prop_value), nullptr);
-    XBT_DEBUG("add prop %s=%s into current property set", A_surfxml_prop_id, A_surfxml_prop_value);
+    XBT_DEBUG("add prop %s=%s into current property set %p", A_surfxml_prop_id, A_surfxml_prop_value,
+              current_property_set);
   }
 }
 
@@ -544,7 +535,7 @@ void STag_surfxml_router(){
 void ETag_surfxml_cluster(){
   s_sg_platf_cluster_cbarg_t cluster;
   memset(&cluster,0,sizeof(cluster));
-  cluster.properties = as_current_property_set;
+  cluster.properties = current_property_set;
 
   cluster.id          = A_surfxml_cluster_id;
   cluster.prefix      = A_surfxml_cluster_prefix;
@@ -620,6 +611,7 @@ void ETag_surfxml_cluster(){
 }
 
 void STag_surfxml_cluster(){
+  AS_TAG = 0;
   parse_after_config();
   xbt_assert(current_property_set == nullptr, "Someone forgot to reset the property set to nullptr in its closing tag (or XML malformed)");
 }
@@ -902,19 +894,9 @@ void STag_surfxml_AS(){
   AS_TAG                   = 1;
   s_sg_platf_AS_cbarg_t AS = { A_surfxml_AS_id, (int)A_surfxml_AS_routing};
 
-  as_current_property_set = nullptr;
-
   sg_platf_new_AS_begin(&AS);
 }
 void ETag_surfxml_AS(){
-  if(as_prop_nb){
-    char *name      = as_name_tab[as_prop_nb-1];
-    xbt_dict_t dict = (xbt_dict_t) as_dict_tab[as_prop_nb-1];
-    as_prop_nb--;
-    XBT_DEBUG("POP prop %p for AS '%s'",dict,name);
-    xbt_lib_set(as_router_lib, name, ROUTING_PROP_ASR_LEVEL, dict);
-    xbt_free(name);
-  }
   sg_platf_new_AS_seal();
 }
 
@@ -1066,12 +1048,3 @@ static int _surf_parse() {
 }
 
 int_f_void_t surf_parse = _surf_parse;
-
-/* Prop tag functions
- *
- * With XML parser
- */
-xbt_dict_t get_as_router_properties(const char* name)
-{
-  return (xbt_dict_t)xbt_lib_get_or_null(as_router_lib, name, ROUTING_PROP_ASR_LEVEL);
-}