This Small Business Innovation Research (SBIR) Phase I project aims to develop a software-based networking platform that allows computer networks to run more efficiently and to protect against cyber-attacks. The proposed declarative platform will enable network operators to rapidly create and compose new packet-processing functionality within software-based appliances, coordinate the distributed collection of network resources (e.g. routers and servers), and create rich Software-Defined Networking (SDN) applications on top of the platform to solve critical problems in network security, where real-time analytics and dynamic network reconfiguration are essential. The proposed work will result in a declarative SDN platform, and an SDN application that provides real-time threat detection and mitigation against network security attacks. The broader impact/commercial potential of this project results from the creation of an active network defense mechanism that can adapt quickly to new cyber-attacks. The proposed work addresses the next significant market for SDN technology: the development of applications that can leverage the SDN infrastructure in the telecommunications and enterprise market. The declarative platform will make it significantly easier to customize and deploy new SDN applications, and has wide applicability in network security, traffic analytics, and network traffic optimizations.